/* ==========================================================================
   CHAQMOQ STUDIOS (fandub.uz) — ROYAL CINEMA / IMAX GLOBAL DESIGN SYSTEM
   ========================================================================== */
:root {
  --bg: #0d0618;
  --bg2: #160c28;
  --card: #160c28;
  --field: #21123a;
  --ink: #faf5ff;
  --mute: #c4b5fd;
  --line: rgba(234, 179, 8, 0.26);
  --accent: #eab308;
  --accent-ink: #0d0618;
  --ticket: #eab308;
  --ticket-ink: #0d0618;
  --purple: #a855f7;
  --good: #4ade80;
  --bad: #f87171;
  --head: 'Montserrat', 'Bricolage Grotesque', 'Inter', sans-serif;
  --body: 'Plus Jakarta Sans', 'Manrope', 'Inter', system-ui, sans-serif;
}

html, body {
  background-color: #0d0618 !important;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.22) 0%, transparent 52%),
    radial-gradient(circle at 85% 30%, rgba(234, 179, 8, 0.08) 0%, transparent 42%) !important;
  color: var(--ink) !important;
  font-family: var(--body) !important;
  overflow-x: hidden;
  max-width: 100%;
}

/* Frosted Glass Royal Header */
.wrap > header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(13, 6, 24, 0.84) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(234, 179, 8, 0.28) !important;
  border-radius: 0 0 16px 16px;
  padding: 12px 18px !important;
  margin-bottom: 20px;
}

.wrap > header nav a {
  border-radius: 999px !important;
  transition: all 0.22s ease;
}

.wrap > header nav a:hover,
.wrap > header nav a[aria-current="page"] {
  color: #eab308 !important;
  background: rgba(234, 179, 8, 0.14) !important;
}

.wrap > header nav a.btn,
.btn {
  background: linear-gradient(135deg, #eab308, #facc15) !important;
  color: #0d0618 !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(234, 179, 8, 0.25);
}

.btn.alt {
  background: rgba(168, 85, 247, 0.16) !important;
  color: #faf5ff !important;
  border: 1px solid rgba(168, 85, 247, 0.5) !important;
  box-shadow: none !important;
}

.btn.bad {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  box-shadow: none !important;
}

/* Royal IMAX Centered Hero */
.hero {
  background: radial-gradient(circle at 50% 20%, rgba(168, 85, 247, 0.28) 0%, rgba(234, 179, 8, 0.08) 45%, #120822 90%) !important;
  border: 1px solid rgba(234, 179, 8, 0.4) !important;
  border-radius: 20px !important;
  padding: 36px 28px !important;
  box-shadow: 0 24px 60px rgba(5, 2, 14, 0.65), 0 0 70px rgba(168, 85, 247, 0.15) !important;
}

.hero h1 {
  font-family: var(--head) !important;
  background: linear-gradient(180deg, #ffffff 30%, #fde68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 16:10 Widescreen Royal Cards */
.dubs, .grid, .more {
  gap: 20px !important;
}

.dub, .more a {
  background: #160c28 !important;
  border: 1px solid rgba(234, 179, 8, 0.26) !important;
  border-radius: 14px !important;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease !important;
}

.dub:hover, .more a:hover {
  transform: translateY(-5px) !important;
  border-color: #eab308 !important;
  box-shadow: 0 18px 42px rgba(168, 85, 247, 0.32) !important;
}

.dub .poster, .dub .thumb, .dub i.scene, .more a .scene {
  aspect-ratio: 16 / 9 !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  overflow: hidden;
}

.dub .poster img, .dub .thumb img, .more a img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.dub .mode-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.22);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.45);
  margin-top: 6px;
}

.dub .mode-badge.movie {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.45);
}

/* Category Chips & Filter Pills */
.cat, .chip, .sub-chip {
  background: #160c28 !important;
  border: 1px solid rgba(234, 179, 8, 0.28) !important;
  color: #e9d5ff !important;
  border-radius: 999px !important;
}

.cat:hover, .chip[aria-pressed="true"], .sub-chip[aria-pressed="true"] {
  background: linear-gradient(135deg, #eab308, #facc15) !important;
  color: #0d0618 !important;
  border-color: transparent !important;
  font-weight: 800 !important;
}

/* Cards & Sections */
.ticket, .room, .tg, .card, .form-subbox, .teaser-box, .room-credits-box, .player-meta-bar, .upnext-strip {
  background: #160c28 !important;
  border-color: rgba(234, 179, 8, 0.28) !important;
  border-radius: 16px !important;
}

/* ==========================================================================
   FLOATING DYNAMIC FLAME PREMIERE TIMER WIDGET
   ========================================================================== */
.flame-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 260;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.flame-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(22, 12, 40, 0.94);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(234, 179, 8, 0.55);
  color: #faf5ff;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.flame-fab:hover {
  transform: translateY(-2px);
}

.flame-icon-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.flame-svg {
  width: 26px;
  height: 26px;
  transform-origin: 50% 85%;
}

/* 4 Dynamic Flame Intensity States */
.flame-widget.flame-calm .flame-svg {
  filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.4));
  animation: flameCalm 3.2s ease-in-out infinite;
}

.flame-widget.flame-warm .flame-svg {
  filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.65));
  animation: flameWarm 1.6s ease-in-out infinite;
}

.flame-widget.flame-urgent .flame-svg {
  filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.9));
  animation: flameUrgent 0.65s ease-in-out infinite;
}

.flame-widget.flame-urgent .flame-fab {
  border-color: #f97316;
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.45);
}

.flame-widget.flame-live .flame-svg {
  filter: drop-shadow(0 0 18px rgba(250, 204, 21, 1));
  animation: flameLive 0.4s ease-in-out infinite;
}

.flame-widget.flame-live .flame-fab {
  background: linear-gradient(135deg, #3b0764, #7e22ce);
  border-color: #facc15;
  box-shadow: 0 0 34px rgba(234, 179, 8, 0.55);
}

@keyframes flameCalm {
  0%, 100% { transform: scale(0.92) rotate(-1deg); opacity: 0.85; }
  50% { transform: scale(1) rotate(1deg); opacity: 1; }
}

@keyframes flameWarm {
  0%, 100% { transform: scale(1, 0.96) rotate(-2deg); }
  50% { transform: scale(1.08, 1.1) rotate(2deg); }
}

@keyframes flameUrgent {
  0%, 100% { transform: scale(1.05, 0.95) rotate(-4deg); }
  50% { transform: scale(1.18, 1.24) rotate(4deg); }
}

@keyframes flameLive {
  0%, 100% { transform: scale(1.12, 1.05) rotate(-5deg); }
  50% { transform: scale(1.26, 1.32) rotate(5deg); }
}

.flame-drawer {
  width: 340px;
  max-width: calc(100vw - 24px);
  max-height: 400px;
  overflow-y: auto;
  background: rgba(18, 8, 34, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.flame-drawer[hidden] {
  display: none;
}

.flame-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(234, 179, 8, 0.2);
}

.flame-drawer-head b {
  color: #eab308;
  font-size: 14px;
}

.flame-drawer-close {
  background: none;
  border: none;
  color: #c4b5fd;
  font-size: 18px;
  cursor: pointer;
}

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

.flame-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.25);
  text-decoration: none;
  color: #faf5ff;
  transition: border-color 0.2s, background 0.2s;
}

.flame-item:hover {
  border-color: #eab308;
  background: rgba(234, 179, 8, 0.08);
}

.flame-item-title {
  font-size: 13px;
  font-weight: 700;
  display: block;
}

.flame-item-date {
  font-size: 11px;
  color: #c4b5fd;
}

.flame-item-cd {
  font-family: var(--head);
  font-size: 12px;
  font-weight: 800;
  color: #eab308;
  white-space: nowrap;
}

.flame-item-cd.is-live {
  color: #4ade80;
}

/* ==========================================================================
   2-COLUMN ROYAL IMAX ADMIN DASHBOARD
   ========================================================================== */
.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 18px;
}

.admin-sidebar {
  position: sticky;
  top: 90px;
  background: #160c28;
  border: 1px solid rgba(234, 179, 8, 0.32);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #c4b5fd;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #faf5ff;
}

.admin-nav-btn.active {
  background: linear-gradient(135deg, #eab308, #facc15);
  color: #0d0618;
  box-shadow: 0 8px 22px rgba(234, 179, 8, 0.25);
}

.admin-main {
  min-width: 0;
}

.admin-tab-panel[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-nav-btn {
    white-space: nowrap;
    width: auto;
  }
}

@media (max-width: 600px) {
  .flame-widget {
    right: 12px;
    bottom: 12px;
  }
  .dubs, .grid {
    grid-template-columns: 1fr !important;
  }
}


/* === MARKAZLASHTIRISH VA ICHKI MASOFA (ROYAL IMAX LAYOUT) === */
main, .container, section {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(24px, 4vw, 56px) !important;
  padding-right: clamp(24px, 4vw, 56px) !important;
}
main > section {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.hero {
  margin-left: auto !important;
  margin-right: auto !important;
  padding: clamp(32px, 5vw, 60px) clamp(28px, 4.5vw, 64px) !important;
}
header {
  max-width: 1360px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(24px, 4vw, 56px) !important;
  padding-right: clamp(24px, 4vw, 56px) !important;
}




/* === ROYAL IMAX YAGONA RANG PALITRASI (OQ KARTOCHKA VA XIRA MATNLARNI TUZATISH) === */
:root {
  --bg: #080514 !important;
  --card: rgba(20, 14, 46, 0.94) !important;
  --field: rgba(14, 10, 34, 0.96) !important;
  --ink: #ffffff !important;
  --muted: #cbd5e1 !important;
  --line: rgba(250, 204, 21, 0.24) !important;
  --accent: #facc15 !important;
}
html, body {
  background-color: #080514 !important;
  color: #ffffff !important;
}
.card, .box, .panel, form, .modal-card, .poll-card, .opt, .option, .bar-wrap {
  background: rgba(20, 14, 46, 0.94) !important;
  color: #ffffff !important;
  border: 1px solid rgba(250, 204, 21, 0.22) !important;
}
h1, h2, h3, h4, b, strong, label, .t, .brand, .dub-title, .card-title {
  color: #ffffff !important;
  opacity: 1 !important;
}
p, span, li, small, .sub, .desc, .muted, footer, footer a {
  color: #e2e8f0 !important;
  opacity: 1 !important;
}
input, select, textarea {
  background: rgba(12, 8, 30, 0.96) !important;
  color: #ffffff !important;
  border: 1px solid rgba(250, 204, 21, 0.35) !important;
}
input::placeholder, textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}
.btn, button.btn, a.btn {
  background: linear-gradient(135deg, #facc15, #eab308) !important;
  color: #090514 !important;
  font-weight: 800 !important;
  border: none !important;
}
.btn.alt, a.btn.alt, button.alt, header nav a:not(.btn), .chip, .tab, .pill {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  border: 1px solid rgba(250, 204, 21, 0.32) !important;
}
.btn.bad {
  background: #dc2626 !important;
  color: #ffffff !important;
}
