/* TubeMe Components */

/* Section header */
.section {
  margin-top: var(--s-6);
  padding: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-4);
  margin-bottom: var(--s-3);
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.section-title::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--neon-gradient);
  border-radius: 4px;
  box-shadow: 0 0 8px var(--neon-blue);
}

.see-all {
  font-size: 12px;
  color: var(--neon-blue);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: rgba(0, 212, 255, 0.08);
  transition: all 0.2s var(--ease-out);
}
.see-all:active { background: rgba(0, 212, 255, 0.2); transform: scale(0.94); }

/* Carousel */
.carousel-row {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-4) var(--s-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--s-4);
  -webkit-overflow-scrolling: touch;
}

.carousel-row > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Video Card */
.v-card {
  width: 160px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  position: relative;
  transition: transform 0.25s var(--ease-spring);
  cursor: pointer;
}

.v-card:active { transform: scale(0.96); }

.v-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--surface-2);
  overflow: hidden;
}

.v-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out), opacity 0.4s;
  opacity: 0;
}

.v-card-thumb img.loaded { opacity: 1; }
.v-card:hover .v-card-thumb img { transform: scale(1.06); }

.v-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}

.v-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-full);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.v-card-rating {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #FFC700;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  gap: 2px;
  z-index: 2;
}

/* ============================================================
 *  Yurakcha (favorite) tugma — rasm ustida, yuqori-o'ng burchakda
 * ============================================================ */
.v-card-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.18s var(--ease-out), background 0.18s, color 0.18s;
}
.v-card-fav svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.v-card-fav:hover { transform: scale(1.08); background: rgba(0,0,0,0.7); }
.v-card-fav:active { transform: scale(0.92); }
.v-card-fav.active {
  color: #ff3b6b;
  background: rgba(255, 59, 107, 0.18);
  box-shadow: 0 0 14px rgba(255, 59, 107, 0.45);
}
.v-card-fav.active svg { animation: heart-pop 0.35s ease; }
@keyframes heart-pop {
  0%   { transform: scale(0.6); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* List-card uchun yurakchani biroz kichikroq qilamiz */
.list-card .v-card-fav {
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
}
.list-card .v-card-fav svg { width: 14px; height: 14px; }

.v-card-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  z-index: 2;
}

.v-card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s;
  background: rgba(0,0,0,0.4);
  z-index: 2;
}
.v-card-play svg {
  width: 40px;
  height: 40px;
  fill: #fff;
  filter: drop-shadow(0 0 12px var(--neon-blue));
}
.v-card:hover .v-card-play { opacity: 1; }

.v-card-meta {
  padding: var(--s-2) var(--s-3) var(--s-3);
}

.v-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v-card-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.v-card-sub span:not(:last-child)::after {
  content: '•';
  margin-left: 6px;
  opacity: 0.5;
}

/* Big card (for grid) */
.v-card.big { width: 100%; }
.v-card.big .v-card-title { font-size: 14px; }

/* Hero card */
.hero-card { width: 80%; max-width: 320px; }
.hero-card .v-card-thumb { aspect-ratio: 16/9; }

/* List card */
.list-card {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
}
.list-card:active { transform: scale(0.98); background: var(--surface-2); }
.list-card .v-card-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  flex-shrink: 0;
  border-radius: var(--r-sm);
}
.list-card .v-card-meta {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.list-card .v-card-title { -webkit-line-clamp: 2; font-size: 13px; }
.list-card .v-card-desc {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-card.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(123, 97, 255, 0.12));
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.18), 0 12px 30px rgba(0, 0, 0, 0.22);
}

.list-card.active .v-card-title {
  color: var(--neon-blue);
}

.list-card.active .v-card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.12), rgba(123, 97, 255, 0.3));
  z-index: 1;
}

.v-card-active-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  font-size: 10px;
  font-weight: 700;
  color: #06121a;
  background: linear-gradient(135deg, #00d4ff, #7b61ff);
  padding: 4px 8px;
  border-radius: var(--r-full);
  box-shadow: 0 8px 18px rgba(0, 212, 255, 0.28);
}

/* Stories */
.stories-row {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  overflow-x: auto;
}

.story {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 72px;
  cursor: pointer;
}

.story-thumb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--neon-gradient-3);
  position: relative;
  transition: transform 0.2s var(--ease-spring);
}
.story:active .story-thumb { transform: scale(0.92); }

.story-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--bg);
}

.story-title {
  font-size: 10px;
  color: var(--text-2);
  font-weight: 500;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hero slider */
.hero-slider {
  position: relative;
  width: 100%;
  margin: var(--s-2) 0 var(--s-2);
  padding: 0 var(--s-4);
}

.hero-track {
  display: flex;
  gap: var(--s-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-lg);
}

.hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  height: 220px;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s linear;
}
.hero-slide.in-view img { transform: scale(1.1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 30%, rgba(5,5,5,0.95) 100%),
    linear-gradient(90deg, rgba(5,5,5,0.6) 0%, transparent 50%);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--s-2);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  background: var(--neon-gradient);
  color: #000;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
  line-height: 1.1;
}

.hero-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

.hero-btn {
  padding: 9px 18px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s var(--ease-spring);
}

.hero-btn.play {
  background: #fff;
  color: #000;
}

.hero-btn.info {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
}

.hero-btn:active { transform: scale(0.94); }
.hero-btn svg { width: 14px; height: 14px; }

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: var(--s-3);
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.25s var(--ease-out);
}

.hero-dot.active {
  width: 22px;
  background: var(--neon-gradient);
  border-radius: var(--r-full);
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  padding: 0 var(--s-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  padding: 0 var(--s-4);
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: 0 var(--s-4);
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-sm);
}

.skel-card {
  width: 160px;
  flex-shrink: 0;
}
.skel-card .skel-img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-md);
}
.skel-card .skel-line {
  height: 12px;
  margin-top: 8px;
  border-radius: 4px;
}
.skel-card .skel-line.short { width: 60%; margin-top: 6px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast */
.toast-container {
  position: fixed;
  top: calc(var(--header-h) + var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100% - 24px);
}

.toast {
  background: rgba(20, 20, 20, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  padding: 10px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.35s var(--ease-spring);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(46, 204, 113, 0.4); }
.toast.error { border-color: rgba(255, 59, 92, 0.4); }
.toast.info { border-color: rgba(0, 212, 255, 0.4); }

/* Modal */
.modal-container {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: auto;
}

.modal-backdrop.show { opacity: 1; }

.modal {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 520px;
  background: rgba(16, 16, 16, 0.96);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border-top: 1px solid var(--border-strong);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--s-5) var(--s-4) calc(var(--s-5) + var(--safe-bottom));
  max-height: 85vh;
  overflow-y: auto;
  transition: transform 0.4s var(--ease-spring);
  pointer-events: auto;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.6);
}

.modal.show { transform: translateX(-50%) translateY(0); }

.modal-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--r-full);
  margin: 0 auto var(--s-4);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  transition: background 0.2s;
  cursor: pointer;
}
.modal-item:active { background: rgba(255, 255, 255, 0.06); }
.modal-item svg { width: 20px; height: 20px; color: var(--neon-blue); flex-shrink: 0; }
.modal-item .text { flex: 1; }
.modal-item .title { font-size: 14px; font-weight: 600; color: var(--text); }
.modal-item .desc { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* Notification modal cards */
.notif-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3);
  margin-bottom: var(--s-3);
  display: flex;
  gap: var(--s-3);
}

.notif-card img {
  width: 60px;
  height: 60px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.notif-card .meta { flex: 1; }
.notif-card .meta h5 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.notif-card .meta p { font-size: 11px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Chips */
.chip-row {
  display: flex;
  gap: var(--s-2);
  padding: 0 var(--s-4);
  overflow-x: auto;
  margin-bottom: var(--s-3);
}

.chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
}

.chip.active {
  background: var(--neon-gradient);
  color: #000;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.chip:not(.active):active { background: var(--surface-2); }

/* Search input */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 10px var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  margin: var(--s-3) var(--s-4);
  transition: border 0.2s;
}

.search-bar:focus-within {
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.search-bar svg { width: 18px; height: 18px; color: var(--text-2); }
.search-bar input {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: none;
}
.search-bar input::placeholder { color: var(--text-3); }

.search-clear {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  color: var(--text-2);
  cursor: pointer;
}
.search-clear svg { width: 12px; height: 12px; }

/* Empty state */
.empty-state {
  padding: var(--s-9) var(--s-4);
  text-align: center;
  color: var(--text-2);
}
.empty-state .icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--s-4);
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}
.empty-state .icon svg { width: 36px; height: 36px; color: var(--text-3); }
.empty-state h3 { color: var(--text); margin-bottom: 8px; font-size: 16px; }
.empty-state p { font-size: 13px; max-width: 280px; margin: 0 auto; }

/* Retry */
.retry-state {
  padding: var(--s-9) var(--s-4);
  text-align: center;
}
.retry-btn {
  margin-top: var(--s-4);
  padding: 10px 24px;
  border-radius: var(--r-full);
  background: var(--neon-gradient);
  color: #000;
  font-weight: 700;
  font-size: 13px;
}

/* Pull to refresh */
.ptr {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -40px);
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease-out);
  z-index: 10;
  box-shadow: var(--shadow-md);
}
.ptr svg { width: 18px; height: 18px; color: var(--neon-blue); transition: transform 0.3s; }
.ptr.show { transform: translate(-50%, 16px); }
.ptr.loading svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


/* Rasmlarda o‘ng tugmani va tortib olishni bloklash */
img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}

/* Rasmlarni sudrab olib ketishni bloklash */
img:active {
  pointer-events: none;
}
/* ========== KATEGORIYALAR BO'LIMI (Hero ostida) — GLASS BUTTON ========== */
.categories-section {
  margin-top: var(--s-3);
}

.categories-row {
  display: flex;
  gap: 10px;
  padding: 6px var(--s-4) var(--s-3);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.categories-row::-webkit-scrollbar { display: none; }

/* GLASS BUTTON — shisha tugma uslubi */
.category-btn.glass-btn {
  flex: 0 0 auto;
  /* Kichikroq o'lcham (avval 128x72 edi) */
  min-width: 96px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  /* Shisha (glass) effekti — yarim shaffof, blur va inner glow */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 40%, rgba(255,255,255,0.10) 100%),
    rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(255, 255, 255, 0.05);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

/* Shine — yuqori chiroq aks ettirish */
.glass-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0) 100%);
  border-radius: 10px 10px 50% 50% / 10px 10px 30% 30%;
  pointer-events: none;
  z-index: 1;
}

.category-btn.glass-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(255, 255, 255, 0.10);
}

.category-btn.glass-btn:active {
  transform: scale(0.96);
}

/* Aksent ranglari — ramka va glow */
.category-btn.glass-gold {
  border-color: rgba(255, 200, 60, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 150, 0.55),
    inset 0 -1px 0 rgba(255, 200, 60, 0.20),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(255, 180, 50, 0.35);
}
.category-btn.glass-gold:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 150, 0.70),
    inset 0 -1px 0 rgba(255, 200, 60, 0.25),
    0 6px 18px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(255, 180, 50, 0.50);
}

.category-btn.glass-silver {
  border-color: rgba(220, 230, 245, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 0 rgba(200, 215, 235, 0.20),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(200, 220, 255, 0.30);
}

.category-btn.glass-cyan {
  border-color: rgba(0, 212, 255, 0.80);
  box-shadow:
    inset 0 1px 0 rgba(150, 230, 255, 0.55),
    inset 0 -1px 0 rgba(0, 180, 230, 0.20),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(0, 200, 255, 0.45);
}

.category-btn.glass-magenta {
  border-color: rgba(255, 100, 220, 0.80);
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 240, 0.55),
    inset 0 -1px 0 rgba(220, 60, 200, 0.20),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(255, 100, 220, 0.40);
}

.category-btn.glass-emerald {
  border-color: rgba(80, 220, 160, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(160, 250, 210, 0.55),
    inset 0 -1px 0 rgba(50, 200, 140, 0.20),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(80, 220, 160, 0.40);
}

.category-btn.glass-violet {
  border-color: rgba(160, 120, 255, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(210, 190, 255, 0.55),
    inset 0 -1px 0 rgba(130, 90, 230, 0.20),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(160, 120, 255, 0.40);
}

.category-label {
  position: relative;
  z-index: 2;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.2;
  text-transform: uppercase;
}

/* ========== STORY VIEWER MODAL (Instagram-style) ========== */
.story-viewer-open {
  overflow: hidden;
}

.story-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.story-viewer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.story-viewer-overlay.closing {
  opacity: 0;
}

.story-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.story-viewer-modal {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 460px;
  max-height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 0;
}
@media (min-width: 480px) {
  .story-viewer-modal {
    border-radius: 14px;
    height: 92vh;
    max-height: 860px;
  }
}
.story-viewer-overlay.open .story-viewer-modal {
  transform: scale(1) translateY(0);
}
.story-viewer-overlay.closing .story-viewer-modal {
  transform: scale(0.92) translateY(20px);
}

/* Progress bars */
.story-progress-container {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  gap: 4px;
  pointer-events: none;
}
.story-progress-bar {
  flex: 1;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.30);
  border-radius: 2px;
  overflow: hidden;
}
.story-progress-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  border-radius: 2px;
}
.story-viewer-overlay.paused .story-progress-fill {
  /* Pauza holatida transitionni saqlash uchun JS ishlatadi */
}

/* Header */
.story-viewer-header {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.story-viewer-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  max-width: 75%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.story-viewer-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.story-viewer-close:hover { background: rgba(255, 255, 255, 0.22); }
.story-viewer-close:active { transform: scale(0.9); }

/* Media container */
.story-viewer-media {
  position: relative;
  flex: 1;
  width: 100%;
  background: #000;
  overflow: hidden;
}

.story-media-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.story-media-item.slide-in {
  animation: storySlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.story-media-item.slide-out {
  animation: storySlideOut 0.4s cubic-bezier(0.7, 0, 0.84, 0) both;
}
@keyframes storySlideIn {
  from { transform: translateX(40px); opacity: 0; filter: blur(8px); }
  to { transform: translateX(0); opacity: 1; filter: blur(0); }
}
@keyframes storySlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-30px); opacity: 0; }
}

.story-media-video,
.story-media-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Loader — blur shimmer holat */
.story-viewer-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 25, 0.65);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}
.story-viewer-loader.visible {
  opacity: 1;
}
.story-loader-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.08) 40%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.08) 60%,
    rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: storyShimmer 1.8s linear infinite;
}
@keyframes storyShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.story-loader-spinner {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
}
.story-spinner-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.95);
  animation: storySpin 0.9s linear infinite;
}
@keyframes storySpin {
  to { transform: rotate(360deg); }
}

/* Tap zones — chap (prev), o'ng (next) */
.story-tap-zone {
  position: absolute;
  top: 60px;
  bottom: 90px;
  width: 30%;
  z-index: 7;
  cursor: pointer;
}
.story-tap-prev { left: 0; }
.story-tap-next { right: 0; }

/* Footer — Videoga o'tish tugmasi */
.story-viewer-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.story-go-video-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.10) 100%),
    rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 14px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(255, 255, 255, 0.08);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.25s var(--ease-out);
  animation: storyBtnPulse 2.4s ease-in-out infinite;
}
.story-go-video-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 6px 18px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(255, 255, 255, 0.15);
}
.story-go-video-btn:active {
  transform: scale(0.96);
}
@keyframes storyBtnPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 14px rgba(0,0,0,0.45), 0 0 16px rgba(255,255,255,0.08); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 4px 14px rgba(0,0,0,0.45), 0 0 24px rgba(255,255,255,0.20); }
}
.story-go-video-btn svg {
  flex-shrink: 0;
}
