/* ============================================================================
   EZA PRO Mini App — 60 FPS Native-Standard Design System (iOS / Android / Web)
   Zero heavy scrolling backdrop-filter passes; GPU-accelerated transitions only
   ============================================================================ */
:root {
  --bg: #090b10;
  --surface: #121622;
  --surface-2: #191f2e;
  --surface-3: #22293d;
  --text: #f4f6fb;
  --muted: #8a94aa;
  --accent: #ff3366;
  --accent-2: #ff6257;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: calc(var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --app-vh: 100vh;
  --viewport-h: var(--tg-viewport-stable-height, var(--app-vh, 100vh));
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Kantumruy Pro", "Khmer OS Siemreap", "Noto Sans Khmer", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overscroll-behavior-y: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: clip;
}

body.sheet-open {
  overflow: hidden;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
  font-family: inherit;
}

/* Prevent iOS Safari auto-zoom when focusing any input on mobile touchscreens */
@media (pointer: coarse) {
  .search-wrap input,
  .field,
  .stepper-mid input,
  textarea {
    font-size: 16px;
  }
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--viewport-h);
  padding-top: calc(4px + var(--safe-top));
  padding-bottom: calc(82px + var(--safe-bottom));
  overflow-x: hidden;
  overflow-x: clip;
}

/* Announcement & Maintenance Top Banner */
.app-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(255, 51, 102, 0.2), rgba(245, 158, 11, 0.16));
  border-bottom: 1px solid rgba(255, 51, 102, 0.3);
  color: #fff;
}

.app-banner.maint {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.32), rgba(245, 158, 11, 0.22));
  border-bottom-color: rgba(239, 68, 68, 0.5);
}

.app-banner-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.app-banner-close {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== Main Content Container ===== */
.main-content {
  padding: 12px 14px 16px;
  max-width: 720px;
  margin: 0 auto;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: tabFade 0.16s var(--ease-out);
}

@keyframes tabFade {
  from { opacity: 0; transform: translate3d(0, 4px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.block {
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.section-head.compact {
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.sub-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* ===== Search Bar ===== */
.search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-wrap.compact-search {
  margin-bottom: 10px;
}

.search-wrap.compact-search input {
  padding-right: 84px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.search-wrap input:focus,
.field:focus {
  border-color: var(--accent);
  background: var(--surface-2);
}

.icon-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: var(--surface-3);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ===== Inputs & Standard Buttons (Min 40–44px Touch Targets) ===== */
.field {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

textarea.field {
  resize: vertical;
  min-height: 76px;
}

.btn {
  border: none;
  border-radius: 12px;
  min-height: 42px;
  padding: 0 15px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s var(--ease-out), opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.965);
}

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 51, 102, 0.25);
}

.btn-soft {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 10px;
}

.btn-xs {
  min-height: 31px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 9px;
}

.btn-icon-sq {
  width: 42px;
  padding: 0;
  flex-shrink: 0;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s var(--ease-out);
}

.icon-btn:active {
  transform: scale(0.93);
}

.icon-btn.active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.full-width { width: 100%; }
.flex-1 { flex: 1; min-width: 0; }

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row.wrap {
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== Pills & Filter Strips ===== */
.pill-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pill-row::-webkit-scrollbar { display: none; }

.pill {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.pill:active {
  transform: scale(0.96);
}

.pill.active {
  background: var(--text);
  color: #090b10;
  border-color: transparent;
}

.pill-row.subtle .pill.active {
  background: rgba(255, 51, 102, 0.18);
  color: #ff7a98;
  border-color: rgba(255, 51, 102, 0.4);
}

/* ===== Featured Spotlight Hero Banner (Compact so Endless Grid starts above the fold!) ===== */
.spotlight-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  margin: 2px 0 12px;
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(135deg, #1b2135 0%, #111522 65%, #1c1322 100%);
  border: 1px solid var(--border-strong);
  contain: layout style paint;
}

.spotlight-poster {
  position: relative;
  width: 68px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.spotlight-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spotlight-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spotlight-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #ff7a98;
}

.spotlight-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spotlight-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.spotlight-actions {
  display: flex;
  gap: 7px;
  margin-top: 2px;
}

/* ===== Continue Watching (Compact Horizontal Chips — keeps Endless Grid visible immediately!) ===== */
.continue-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.continue-row::-webkit-scrollbar { display: none; }

.continue-card {
  flex: 0 0 184px;
  width: 184px;
  min-width: 184px;
  max-width: 184px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  contain: layout style paint;
  transition: transform 0.12s var(--ease-out);
}

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

.continue-poster {
  position: relative;
  width: 44px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.continue-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.continue-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.continue-ep-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 51, 102, 0.16);
  color: #ff7a98;
}

.continue-title {
  margin-top: 0;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.28;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* ===== Poster Fallback & Smooth Image Reveal ===== */
img[data-poster-img] {
  opacity: 0;
  transition: opacity 0.18s ease;
}

img[data-poster-img].img-ready {
  opacity: 1;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
  background: linear-gradient(155deg, #1d2336 0%, #111522 100%);
  color: rgba(255, 255, 255, 0.72);
}

.poster-fallback-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 51, 102, 0.22);
  color: #ff6b8b;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.poster-fallback-txt {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Clean 3-Column Cinema Poster Grid (Zero Backdrop-Filter Lag!) ===== */
.drama-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 560px) {
  .drama-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

.drama-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  contain: layout style paint;
  content-visibility: auto;
  contain-intrinsic-size: 110px 210px;
  transition: transform 0.12s var(--ease-out);
}

.drama-card:active {
  transform: scale(0.965);
}

.drama-cover-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.drama-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drama-cover-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent);
  pointer-events: none;
}

.ep-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 2;
  background: rgba(9, 11, 16, 0.84);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.src-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: rgba(9, 11, 16, 0.84);
  color: #d6deed;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
}

.drama-card-title {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 31px;
}

/* YouTube-Style Endless Feed Inline Section Divider & Sentinel */
.feed-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.feed-divider::before,
.feed-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.feed-divider span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11.5px;
}

.feed-sentinel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 0 6px;
  gap: 8px;
}

.feed-loader {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.loader-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotBounce 0.9s infinite ease-in-out;
}

.loader-dot:nth-child(2) { animation-delay: 0.15s; }
.loader-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotBounce {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.75); }
  40% { opacity: 1; transform: scale(1.15); }
}

/* Zero-CLS Skeleton Loader (Exact Card Aspect Ratio + Title Placeholder) */
.skel-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skel-card {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

.skel-line {
  height: 12px;
  width: 82%;
  border-radius: 6px;
  background: var(--surface-2);
}

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

/* ===== Cards & Empty States ===== */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.panel-card.compact-card {
  padding: 12px 14px;
}

.empty-state-card {
  text-align: center;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 51, 102, 0.14);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
}

.panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 51, 102, 0.14);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.chip.ok { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.chip.warn { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.chip.err { background: rgba(239, 68, 68, 0.16); color: #f87171; }

/* ===== Native Slide-Up Drama Cinema Sheet (GPU 60 FPS Transform!) ===== */
.sheet {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  height: var(--viewport-h);
  z-index: 40;
  background: #07090e;
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 100%, 0);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  will-change: transform, opacity;
  transition: transform 0.28s var(--ease-out), opacity 0.2s ease, visibility 0s linear 0.28s;
}

.sheet.open {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: transform 0.28s var(--ease-out), opacity 0.2s ease, visibility 0s linear 0s;
}

.sheet-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  border-bottom: 1px solid var(--border);
  background: #0a0d14;
}

.sheet-title {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sticky Cinema Player pinned directly beneath Header (YouTube/Netflix pattern) */
.player-wrap {
  flex-shrink: 0;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: #05070c;
  border-bottom: 1px solid var(--border);
}

.video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 44vh;
  background: #05070c;
  overflow: hidden;
}

.player-poster-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transform: scale(1.1);
  filter: blur(14px);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(5, 7, 12, 0.28) 0%, rgba(5, 7, 12, 0.86) 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.video-stage video {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.video-stage.is-loading video,
.video-stage.is-error video {
  opacity: 0;
  pointer-events: none;
}

.video-stage.is-buffering video {
  opacity: 0.6;
}

.video-stage.is-ready .player-poster-bg,
.video-stage.is-ready .player-vignette {
  opacity: 0;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}

.player-overlay-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.player-overlay-sub {
  font-size: 12px;
  font-weight: 500;
  color: rgba(244, 246, 251, 0.82);
  max-width: 280px;
}

.cinema-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  animation: cinemaSpin 0.75s linear infinite;
  margin-bottom: 4px;
}

@keyframes cinemaSpin {
  to { transform: rotate(360deg); }
}

.player-bar,
.player-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.player-meta-bar {
  padding: 6px 14px;
  background: #0e121c;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  padding: 14px;
  padding-bottom: calc(44px + var(--safe-bottom));
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.drama-hero {
  display: flex;
  gap: 13px;
  margin-bottom: 14px;
}

.drama-hero img {
  width: 82px;
  height: 118px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.hero-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
}

.hero-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.quick-dl-drawer {
  margin-bottom: 12px;
  border-color: rgba(255, 51, 102, 0.3);
  background: linear-gradient(160deg, rgba(255, 51, 102, 0.08), var(--surface) 70%);
}

.quick-dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mini-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ===== Downloader & Merge Hub ===== */
.dl-subtabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 4px;
  margin-bottom: 12px;
}

.dl-subtab {
  border: none;
  border-radius: 9px;
  min-height: 36px;
  padding: 0 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dl-subtab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.dl-subpanel {
  display: none;
}

.dl-subpanel.active {
  display: block;
  animation: tabFade 0.14s var(--ease-out);
}

.dl-inline-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  border-radius: 8px;
  height: 32px;
  padding: 0 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dl-quick-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.dl-quick-row::-webkit-scrollbar { display: none; }

.dl-quick-chip {
  flex: 0 0 auto;
  max-width: 175px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dl-quick-chip.active {
  border-color: rgba(255, 51, 102, 0.55);
  background: rgba(255, 51, 102, 0.14);
}

.dl-quick-chip img {
  width: 26px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.dl-quick-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.dl-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.dl-search-item img {
  width: 36px;
  height: 48px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.dl-thumb {
  width: 56px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* 1-Tap Stepper & Segmented Quality Pills */
.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
}

.stepper-btn {
  width: 38px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.stepper-btn:active {
  background: rgba(255, 255, 255, 0.08);
}

.stepper-mid {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.stepper-mid input {
  width: 44px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.seg-group {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.seg-group.full-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.seg-btn {
  border: none;
  border-radius: 8px;
  min-height: 32px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.seg-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

/* ===== Episodes Grid ===== */
.episode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ep-btn {
  min-height: 42px;
  padding: 0 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s var(--ease-out), background-color 0.12s ease;
}

.ep-btn:active {
  transform: scale(0.94);
}

.ep-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.ep-btn.watched {
  border-color: rgba(34, 197, 94, 0.35);
}

.ep-btn.locked {
  opacity: 0.4;
}

.ep-btn .watched-dot {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  color: #4ade80;
}

.ep-btn .cached-dot {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 9px;
}

.ep-now-badge {
  font-size: 12.5px;
  font-weight: 700;
  padding: 0 4px;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.switch-label input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* ===== Jobs & Progress ===== */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.progress-track {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s var(--ease-out);
}

.social-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Floating Live Job Dock */
.live-job-dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(68px + var(--safe-bottom));
  z-index: 50;
  max-width: 696px;
  margin: 0 auto;
  background: #161b28;
  border: 1px solid rgba(255, 51, 102, 0.42);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.live-job-dock.done {
  border-color: rgba(34, 197, 94, 0.55);
}

.live-dock-title {
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Profile, Plans & Bakong Receipt / Slip ===== */
.profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.avatar-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-card.featured {
  border-color: rgba(255, 51, 102, 0.55);
  background: linear-gradient(160deg, rgba(255, 51, 102, 0.12), var(--surface) 60%);
}

.plan-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.plan-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 8px;
}

.plan-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.plan-days {
  font-size: 12px;
  color: var(--muted);
}

.plan-features {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  color: #c6d0e3;
}

/* Bakong KHQR, Receipt & Slip */
.khqr-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(225, 35, 46, 0.45);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.khqr-head {
  background: linear-gradient(135deg, #e1232e, #b91c1c);
  color: #fff;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.khqr-body {
  padding: 14px;
  text-align: center;
}

.khqr-merchant {
  font-size: 13px;
  font-weight: 700;
}

.khqr-amount {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 2px 0 10px;
}

.khqr-svg-wrap {
  width: 204px;
  height: 204px;
  margin: 0 auto 10px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.khqr-svg-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.khqr-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.khqr-status-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
  margin-bottom: 8px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  animation: pulseDot 1.3s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.receipt-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: var(--surface);
}

.receipt-head {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.receipt-body { padding: 14px; }

.receipt-amount-box {
  text-align: center;
  padding: 8px 8px 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
  margin-bottom: 10px;
}

.receipt-amount {
  font-size: 26px;
  font-weight: 700;
  color: #4ade80;
}

.receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
}

.receipt-row .r-key { color: var(--muted); flex-shrink: 0; }
.receipt-row .r-val { color: var(--text); font-weight: 600; text-align: right; word-break: break-all; }

.receipt-banner {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #86efac;
  text-align: center;
}

.slip-divider {
  margin: 12px 0 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 10px;
  text-align: left;
}

.slip-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1.5px dashed rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.slip-pending-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: var(--surface);
}

.slip-pending-head {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

/* ===== Admin Control Center ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
}

.stat-label { font-size: 11px; color: var(--muted); }
.stat-val { font-size: 18px; font-weight: 700; margin-top: 2px; }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.vps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 6px;
}

.status-dot.err { background: var(--danger); }

.manual-vip-box {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
}

.user-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-name { font-weight: 700; font-size: 13px; }
.user-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-subtabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.admin-subtabs::-webkit-scrollbar { display: none; }

.admin-subtab {
  flex: 1 0 auto;
  border: none;
  border-radius: 9px;
  min-height: 35px;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.admin-subtab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.admin-subtab.active .mini-badge,
.dl-subtab.active .mini-badge {
  background: rgba(0, 0, 0, 0.35);
}

.admin-subpanel { display: none; }
.admin-subpanel.active { display: block; animation: tabFade 0.14s var(--ease-out); }

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-action-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s var(--ease-out);
}

.quick-action-tile:active { transform: scale(0.97); }
.qa-title { font-size: 13px; font-weight: 700; }
.qa-sub { font-size: 11px; color: var(--muted); }

.maint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #2c3448;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease-out);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--danger);
  border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translate3d(20px, 0, 0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(5, 7, 12, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

/* ===== Native Bottom Tab Bar ===== */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  background: rgba(9, 11, 16, 0.97);
  border-top: 1px solid var(--border);
  padding: 6px 6px calc(8px + var(--safe-bottom));
}

.nav-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 2px;
  cursor: pointer;
  transition: color 0.14s ease;
}

.nav-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 28px;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.nav-btn.active {
  color: var(--accent);
}

.nav-btn.active .nav-icon-wrap {
  background: rgba(255, 51, 102, 0.14);
}

.nav-btn small {
  font-size: 10.5px;
  font-weight: 600;
}

.nav-badge,
.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
}

.nav-badge {
  position: absolute;
  top: -3px;
  right: 2px;
}

/* ===== Floating Back-to-Top Pill for Deep Endless Scrolling ===== */
.back-to-top {
  position: fixed;
  right: 14px;
  bottom: calc(82px + var(--safe-bottom));
  z-index: 28;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(18, 22, 34, 0.94);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 12px, 0);
  transition: opacity 0.18s ease, transform 0.2s var(--ease-out);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.back-to-top:active {
  transform: scale(0.92);
}

body.has-live-dock .back-to-top {
  bottom: calc(148px + var(--safe-bottom));
}

body.has-music-bar .app-shell {
  padding-bottom: calc(158px + var(--safe-bottom));
}

body.has-music-bar .back-to-top {
  bottom: calc(164px + var(--safe-bottom));
}

body.has-music-bar .live-job-dock {
  bottom: calc(152px + var(--safe-bottom));
}

body.has-music-bar .toast {
  bottom: calc(164px + var(--safe-bottom));
}

/* ============================================================================
   EZA AI MUSIC STUDIO — Senior-Friendly High-Contrast, Large Touch Target UI
   ============================================================================ */
.music-studio {
  font-size: 16px;
}

.music-wallet-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(245, 158, 11, 0.16) 55%, rgba(18, 22, 34, 0.96));
  border: 1.5px solid rgba(255, 120, 145, 0.34);
  margin-bottom: 14px;
}

.music-wallet-label {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.music-wallet-val {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: #fde047;
  margin-top: 2px;
}

.music-wallet-val small {
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  margin-left: 4px;
}

.music-wallet-sub {
  font-size: 13px;
  color: #cbd5e1;
  margin-top: 2px;
}

.music-topup-btn {
  min-height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.32);
  transition: transform 0.12s var(--ease-out);
}

.music-topup-btn:active {
  transform: scale(0.96);
}

.music-main-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  margin-bottom: 14px;
}

.music-main-tabs.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.music-main-tabs.three-col .music-main-tab {
  font-size: 14px;
  padding: 0 4px;
}

.music-main-tab {
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #cbd5e1;
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.music-main-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 51, 102, 0.32);
}

.music-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.music-view {
  display: none;
}

.music-view.active {
  display: block;
}

.music-active-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(255, 51, 102, 0.16));
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  margin-bottom: 14px;
}

.music-active-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #fef08a;
}

.music-active-sub {
  font-size: 13.5px;
  color: #f1f5f9;
  margin-top: 3px;
  line-height: 1.4;
}

.music-eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  flex-shrink: 0;
}

.music-eq-bars span {
  width: 5px;
  border-radius: 999px;
  background: #fbbf24;
  animation: eqPulse 0.9s ease-in-out infinite;
}

.music-eq-bars span:nth-child(1) { height: 12px; animation-delay: 0s; }
.music-eq-bars span:nth-child(2) { height: 24px; animation-delay: 0.18s; }
.music-eq-bars span:nth-child(3) { height: 16px; animation-delay: 0.36s; }
.music-eq-bars span:nth-child(4) { height: 22px; animation-delay: 0.54s; }

@keyframes eqPulse {
  0%, 100% { transform: scaleY(0.45); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}

.music-step-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}

.music-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.music-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.music-step-title {
  margin: 0;
  font-size: 17.5px;
  font-weight: 700;
  color: #fff;
}

.music-step-hint {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: #cbd5e1;
}

.music-styles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.music-style-tile {
  position: relative;
  min-height: 76px;
  padding: 12px 12px;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-2);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s var(--ease-out), border-color 0.15s ease, box-shadow 0.15s ease;
}

.music-style-tile:active {
  transform: scale(0.97);
}

.music-style-tile.active {
  border-color: #fde047;
  box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.25), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.music-style-tile .ms-emoji {
  font-size: 27px;
  line-height: 1;
  flex-shrink: 0;
}

.music-style-tile .ms-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.music-style-tile .ms-desc {
  font-size: 12.5px;
  color: #cbd5e1;
  margin-top: 2px;
  line-height: 1.25;
}

.music-style-tile .ms-check {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: none;
  place-items: center;
}

.music-style-tile.active .ms-check {
  display: grid;
}

.music-voice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.music-voice-btn {
  min-height: 68px;
  padding: 10px 6px;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--surface-2);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.12s var(--ease-out), border-color 0.15s ease, background-color 0.15s ease;
}

.music-voice-btn:active {
  transform: scale(0.96);
}

.music-voice-btn.active {
  border-color: #fde047;
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.28), rgba(245, 158, 11, 0.22));
  color: #fff;
}

.music-voice-btn .mv-emoji {
  font-size: 24px;
  line-height: 1;
}

.music-voice-btn .mv-label {
  font-size: 14.5px;
  font-weight: 700;
}

.music-ideas-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.music-idea-chip {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: var(--surface-2);
  color: #f8fafc;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}

.music-idea-chip:active {
  transform: scale(0.96);
}

.music-idea-chip.active {
  background: rgba(255, 51, 102, 0.22);
  border-color: var(--accent);
  color: #fff;
}

.music-big-textarea,
.music-big-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: #1a2133;
  color: #fff;
  font-size: 17px;
  line-height: 1.55;
  outline: none;
}

.music-big-textarea:focus,
.music-big-input:focus {
  border-color: #fde047;
  background: #1f273d;
}

.music-optional-toggle {
  width: 100%;
  margin-top: 12px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 13px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.music-custom-drawer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: #e2e8f0;
}

.music-lyrics-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.music-ai-lyrics-btn {
  min-height: 48px;
  width: 100%;
  border-radius: 13px;
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(234, 88, 12, 0.22));
  color: #fef08a;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
}

.music-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.music-tag-pill {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.music-cta-wrap {
  margin: 4px 0 18px;
}

.music-generate-btn {
  width: 100%;
  min-height: 60px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff3366, #ff6b35 65%, #f59e0b);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 51, 102, 0.38);
  transition: transform 0.12s var(--ease-out), opacity 0.15s ease;
}

.music-generate-btn:active {
  transform: scale(0.98);
}

.music-generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.music-cta-note {
  text-align: center;
  font-size: 13.5px;
  color: #cbd5e1;
  margin-top: 8px;
}

/* My Songs Senior-Friendly Cards */
.music-task-group {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 15px;
}

.music-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.music-track-card {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 15px;
  padding: 13px;
  margin-top: 10px;
}

.music-track-card.is-playing {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.music-track-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.music-track-cover {
  width: 68px;
  height: 68px;
  border-radius: 13px;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ff3366, #f59e0b);
  display: grid;
  place-items: center;
  font-size: 28px;
}

.music-track-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.music-track-meta {
  font-size: 13.5px;
  color: #cbd5e1;
  margin-top: 3px;
}

.music-track-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.music-act-btn {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 13px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: var(--surface-3);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: transform 0.12s var(--ease-out), background-color 0.15s ease;
}

.music-act-btn:active {
  transform: scale(0.96);
}

.music-act-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.music-act-btn.playing {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
}

.music-act-btn.tg {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
}

.music-act-btn.tiktok {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fef3c7;
}

.music-lyrics-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(9, 11, 16, 0.65);
  border: 1px solid var(--border);
  font-size: 15.5px;
  line-height: 1.7;
  color: #f1f5f9;
  white-space: pre-wrap;
}

/* Sticky Mini Audio Player Bar */
.music-player-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(68px + var(--safe-bottom));
  z-index: 48;
  max-width: 700px;
  margin: 0 auto;
  background: #141a2a;
  border: 1.5px solid rgba(34, 197, 94, 0.55);
  border-radius: 16px;
  padding: 10px 12px 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.72);
}

.mp-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-cover {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.mp-cover-fallback {
  background: linear-gradient(135deg, var(--accent), var(--warn));
  display: grid;
  place-items: center;
  font-size: 20px;
}

.mp-info {
  flex: 1;
  min-width: 0;
}

.mp-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-time {
  font-size: 12.5px;
  color: #cbd5e1;
}

.mp-play-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.mp-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.mp-karaoke-btn {
  min-height: 38px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1.5px solid rgba(253, 224, 71, 0.55);
  background: rgba(245, 158, 11, 0.22);
  color: #fef08a;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.mp-lyric-bar {
  margin-top: 7px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(9, 11, 16, 0.6);
  border: 1px solid rgba(253, 224, 71, 0.22);
  overflow: hidden;
  cursor: pointer;
}

.mp-lyric-ticker {
  font-size: 14px;
  font-weight: 600;
  color: #fde047;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.18s ease;
}

.mp-lyric-ticker.is-marquee {
  display: inline-block;
  padding-left: 100%;
  text-overflow: clip;
  animation: ezaMarquee 15s linear infinite;
}

@keyframes ezaMarquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Full-Screen Senior-Friendly Karaoke Running Lyrics Sheet */
.karaoke-sheet {
  position: fixed;
  inset: 0;
  z-index: 62;
  background: #0a0d16;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  overflow: hidden;
}

.karaoke-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(36px) brightness(0.28) saturate(1.3);
  transform: scale(1.12);
  pointer-events: none;
  z-index: 0;
}

.karaoke-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(9, 11, 16, 0.72);
  border-bottom: 1px solid var(--border);
}

.karaoke-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.karaoke-sync-badge {
  font-size: 12.5px;
  color: #fde047;
  margin-top: 2px;
}

.karaoke-font-btn {
  min-width: 42px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.karaoke-marquee-ribbon {
  position: relative;
  z-index: 2;
  overflow: hidden;
  white-space: nowrap;
  padding: 7px 0;
  background: linear-gradient(90deg, rgba(255, 51, 102, 0.25), rgba(245, 158, 11, 0.24));
  border-bottom: 1px solid rgba(253, 224, 71, 0.28);
}

.karaoke-marquee-track {
  display: inline-block;
  padding-left: 100%;
  font-size: 14.5px;
  font-weight: 700;
  color: #fef08a;
  animation: ezaMarquee 16s linear infinite;
}

.karaoke-body {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 28px 18px 46vh;
  scroll-behavior: smooth;
}

.karaoke-lines-wrap {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.karaoke-line {
  width: 100%;
  border: none;
  background: transparent;
  text-align: center;
  padding: 12px 14px;
  border-radius: 16px;
  color: rgba(226, 232, 240, 0.72);
  font-size: var(--karaoke-font, 22px);
  font-weight: 600;
  line-height: 1.65;
  cursor: pointer;
  transition: transform 0.22s var(--ease-out), color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.karaoke-line.past {
  color: rgba(148, 163, 184, 0.52);
}

.karaoke-line.active {
  color: #fde047;
  font-weight: 700;
  background: rgba(253, 224, 71, 0.14);
  box-shadow: 0 0 0 1.5px rgba(253, 224, 71, 0.42), 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: scale(1.05);
}

.karaoke-footer {
  position: relative;
  z-index: 2;
  padding: 12px 16px 14px;
  background: rgba(9, 11, 16, 0.88);
  border-top: 1px solid var(--border-strong);
}

.karaoke-time {
  font-size: 13.5px;
  font-weight: 600;
  color: #cbd5e1;
}

.karaoke-controls {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 10px;
}

.karaoke-skip-btn {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.karaoke-play-btn {
  min-height: 52px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
}

.music-act-btn.karaoke {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.24), rgba(245, 158, 11, 0.22));
  border-color: rgba(253, 224, 71, 0.55);
  color: #fef08a;
  grid-column: 1 / -1;
}

.mp-seek {
  width: 100%;
  margin: 7px 0 0;
  accent-color: #22c55e;
  height: 22px;
  cursor: pointer;
}

/* Music Top-Up Modal */
.music-modal-card {
  max-height: 86vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.music-packs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-pack-btn {
  width: 100%;
  min-height: 70px;
  padding: 13px 15px;
  border-radius: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: var(--surface-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.music-pack-btn.featured {
  border-color: rgba(253, 224, 71, 0.65);
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(245, 158, 11, 0.16));
}

.music-pack-price {
  font-size: 20px;
  font-weight: 700;
  color: #4ade80;
  white-space: nowrap;
}

/* Senior-Friendly Voice-to-Idea Speak Button */
.music-speak-wrap {
  margin-bottom: 12px;
}

.music-voice-speak-btn {
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 15px;
  border: 2px solid rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(59, 130, 246, 0.22));
  color: #e0f2fe;
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s var(--ease-out), background-color 0.15s ease, border-color 0.15s ease;
}

.music-voice-speak-btn:active {
  transform: scale(0.97);
}

.music-voice-speak-btn.recording {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(220, 38, 38, 0.85));
  color: #fff;
  animation: recPulse 1.1s ease-in-out infinite;
}

@keyframes recPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* Custom Family Photo TikTok Video Modal */
.music-video-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  border-radius: 15px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.music-video-preview-img {
  width: 148px;
  height: 148px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(253, 224, 71, 0.55);
}

.music-video-preview-fallback {
  width: 148px;
  height: 148px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--warn));
  display: grid;
  place-items: center;
  font-size: 48px;
}

.music-photo-pick-btn {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px dashed rgba(253, 224, 71, 0.65);
  background: rgba(245, 158, 11, 0.16);
  color: #fef08a;
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

/* AI Album Cover Studio */
.cover-upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cover-source-thumb,
.cover-source-placeholder {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  flex-shrink: 0;
  border: 1.5px solid rgba(253, 224, 71, 0.45);
}

.cover-source-thumb {
  object-fit: cover;
}

.cover-source-placeholder {
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 32px;
}

.cover-canvas-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(253, 224, 71, 0.45);
  background: #0a0d16;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.cover-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================================================
   STANDALONE WEBSITE (music.moneoez.com) — Clean Responsive PC + Mobile Shell
   ============================================================================ */
.studio-web-body {
  background: radial-gradient(circle at top, #171c2f 0%, #090b10 48%);
}

.studio-shell {
  min-height: 100vh;
  padding-bottom: calc(120px + var(--safe-bottom));
}

.studio-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 11, 16, 0.94);
  border-bottom: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
}

.studio-topbar-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--warn));
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 6px 18px rgba(255, 51, 102, 0.35);
}

.studio-brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}

.studio-brand-sub {
  font-size: 12px;
  color: #cbd5e1;
}

.studio-auth-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(253, 224, 71, 0.55);
  background: rgba(245, 158, 11, 0.18);
  color: #fef08a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.studio-auth-btn.is-logged-in {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.studio-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 14px 28px;
}

.studio-hero-banner {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.15), rgba(56, 189, 248, 0.12));
  border: 1px solid var(--border-strong);
  margin-bottom: 14px;
  text-align: center;
}

.studio-hero-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.studio-hero-sub {
  font-size: 13.5px;
  color: #cbd5e1;
  margin-top: 4px;
}

.studio-player-bar {
  bottom: calc(14px + var(--safe-bottom));
}

.studio-login-tg-btn {
  width: 100%;
  min-height: 54px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2aabee, #229ed9);
  color: #fff;
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(34, 158, 217, 0.35);
}

.studio-google-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.studio-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

.studio-or-divider::before,
.studio-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

.studio-footer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 375px) {
  .music-styles-grid { grid-template-columns: 1fr; }
  .music-track-actions { grid-template-columns: 1fr; }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-bottom));
  transform: translate3d(-50%, 0, 0);
  z-index: 60;
  background: #1a2030;
  color: #fff;
  border: 1px solid var(--border-strong);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

@media (max-width: 390px) {
  .main-content { padding: 10px 12px 14px; }
  .stepper-btn { width: 34px; height: 38px; }
  .stepper-mid input { width: 38px; }
  .seg-btn { padding: 0 8px; font-size: 11.5px; }
  .player-bar { padding: 7px 10px; gap: 6px; }
  .player-meta-bar { padding: 6px 10px; }
  .spotlight-actions .btn { padding: 0 10px; font-size: 12px; }
}

@media (max-width: 360px) {
  .main-content { padding: 8px 10px 14px; }
  .drama-grid { gap: 8px; }
  .plans-grid { grid-template-columns: 1fr; }
  .khqr-svg-wrap { width: 184px; height: 184px; }
  .hero-actions .btn { padding: 0 10px; font-size: 12.5px; }
  .ep-now-badge { font-size: 11.5px; }
}

@media (max-width: 340px) {
  .episode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .drama-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.hidden { display: none !important; }
