/* ==========================================================================
   Tool Genzy KH - Telegram Drama Mini App
   Design System: Masterpiece Global Production (Pristine Light / Clean White)
   ========================================================================== */

:root {
  /* Global Typography */
  --font-khmer: 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-en: 'Outfit', sans-serif;

  /* Layout Dimensions */
  --header-height: 60px;
  --nav-height: 68px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Primary Gold VIP Palette */
  --gold-primary: #d97706;
  --gold-secondary: #f59e0b;
  --gold-light: #fef3c7;
  --gold-dark: #b45309;
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --gold-glow: rgba(245, 158, 11, 0.25);

  --accent-red: #ef4444;
  --accent-blue: #2563eb;
  --accent-green: #10b981;
  --accent-purple: #7c3aed;
}

/* ==========================================================================
   THEME: Pristine Luxury Light (Default "Background ស")
   ========================================================================== */
body.theme-light, :root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-input: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.94);
  --bg-nav: rgba(255, 255, 255, 0.96);
  --bg-glass: rgba(255, 255, 255, 0.85);

  --text-primary: #0f172a;       /* Slate 900 */
  --text-secondary: #1e293b;     /* Slate 800 - crisp and high contrast */
  --text-normal: #1e293b;        /* Slate 800 */
  --text-muted: #475569;         /* Slate 600 - sharp and easy to read */
  --text-inverse: #ffffff;

  --border-subtle: #cbd5e1;      /* Slate 300 - clear borders */
  --border-card: #cbd5e1;
  --border-focus: #f59e0b;
  --border-gold: rgba(217, 119, 6, 0.35);

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  --shadow-gold: 0 6px 22px -2px rgba(217, 119, 6, 0.28);
  --shadow-nav: 0 -4px 24px rgba(15, 23, 42, 0.06);

  --chip-bg: #f8fafc;
  --chip-border: #e2e8f0;
  --chip-text: #475569;
}

/* ==========================================================================
   THEME: Optional Dark Stream (Togglable)
   ========================================================================== */
body.theme-dark {
  --bg-primary: #0b0f17;
  --bg-secondary: #131924;
  --bg-card: #18202e;
  --bg-card-hover: #1f2a3c;
  --bg-elevated: #26334a;
  --bg-input: #1a2233;
  --bg-header: rgba(11, 15, 23, 0.92);
  --bg-nav: rgba(11, 15, 23, 0.94);
  --bg-glass: rgba(19, 25, 36, 0.88);

  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-normal: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0b0f17;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: #fbbf24;
  --border-gold: rgba(245, 158, 11, 0.35);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 12px 28px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 4px 22px rgba(245, 158, 11, 0.28);
  --shadow-nav: 0 -4px 24px rgba(0, 0, 0, 0.4);

  --chip-bg: #131924;
  --chip-border: rgba(255, 255, 255, 0.08);
  --chip-text: #cbd5e1;
}

/* ==========================================================================
   Global Base Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-khmer);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  user-select: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* App Container Wrapper (Mobile First with Desktop Frame) */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--bg-primary);
  box-shadow: 0 0 50px rgba(15, 23, 42, 0.08);
}

/* Vector SVG Icon System */
.icon-svg {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-svg-xs {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-svg-sm {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-svg-lg {
  width: 26px;
  height: 26px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==========================================================================
   Header Navigation Bar (Apple Style Frosted Glass)
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 16px;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.brand-logo-icon svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: normal;
  line-height: 1.35;
}

.brand-sub {
  font-size: 9.5px;
  color: var(--gold-primary);
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 0.8px;
}

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

/* Theme Toggle Button */
.btn-theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-theme-toggle:active {
  transform: scale(0.92);
}

/* VIP Pill Badge in Header */
.vip-status-pill-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.8) 0%, rgba(253, 230, 138, 0.6) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  color: #b45309;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-en);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

body.theme-dark .vip-status-pill-badge {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.38);
  color: var(--gold-secondary);
}

.vip-status-pill-badge:active {
  transform: scale(0.95);
}

.crown-gold-icon {
  width: 14px;
  height: 14px;
  color: var(--gold-secondary);
}

.header-avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.header-avatar-btn:active {
  transform: scale(0.92);
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-avatar-initial {
  font-size: 14px;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 14px 16px calc(var(--nav-height) + env(safe-area-inset-bottom) + 36px) 16px;
}

/* View Transition Animations */
.view-panel {
  display: none;
  animation: panelSlideFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes panelSlideFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Search Box Container in Home */
.search-box-wrap {
  margin-bottom: 14px;
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-box:hover,
.search-input-box:active {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.search-icon {
  color: var(--text-muted);
}

.search-placeholder {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
  font-weight: 400;
}

.search-shortcut {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

/* Section Header Bar */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

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

.fire-icon-wrap {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fire-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-red);
}

.section-title h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.section-subtitle-text {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-text-more {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--gold-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  transition: opacity 0.2s;
}

.btn-text-more:active {
  opacity: 0.7;
}

/* Desktop Frame & Multi-Platform Media Query */
@media (min-width: 768px) {
  body {
    background-color: #f1f5f9;
  }
  body.theme-dark {
    background-color: #060910;
  }
  .app-container {
    max-width: 960px !important;
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    box-shadow: 0 0 60px rgba(15, 23, 42, 0.1);
  }
  .app-header {
    max-width: 960px;
    margin: 0 auto;
  }
  .bottom-nav {
    max-width: 960px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 16px 16px 0 0;
  }
  .dramas-grid, .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)) !important;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  body {
    background-color: #f1f5f9;
  }
  body.theme-dark {
    background-color: #060910;
  }
  .app-container {
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    box-shadow: 0 0 60px rgba(15, 23, 42, 0.1);
  }
}

/* Utilities */
.hidden {
  display: none !important;
}


/* Khmer Typography Optimization: Prevent glyph collision & overlap */
html, body, button, input, select, textarea, p, span, h1, h2, h3, h4, h5, h6 {
  letter-spacing: normal;
}


/* ==========================================================================
   DESKTOP COMPUTER & MULTI-PLATFORM RESPONSIVE MASTER STYLES
   ========================================================================== */

/* Mobile: Hide desktop top navigation */
.desktop-nav-menu {
  display: none;
}

/* ==========================================================================
   DESKTOP SCREEN (min-width: 768px): FULL-FEATURED COMPUTER WEB APP
   ========================================================================== */
@media (min-width: 768px) {
  body {
    background-color: #0b0f19 !important;
  }
  body.theme-light {
    background-color: #f1f5f9 !important;
  }

  /* Full Width Expansive Container on Computer */
  .app-container {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    background-color: var(--bg-primary) !important;
    border-left: 1px solid var(--border-subtle) !important;
    border-right: 1px solid var(--border-subtle) !important;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.25) !important;
    min-height: 100vh !important;
  }

  /* Wide Cinema Header on Computer */
  .app-header {
    height: 70px !important;
    padding: 0 32px !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    background: var(--bg-header) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
  }

  .header-brand {
    gap: 12px !important;
  }
  .brand-logo-img {
    width: 44px !important;
    height: 44px !important;
  }
  .brand-title {
    font-size: 16px !important;
  }
  .brand-sub {
    font-size: 10.5px !important;
  }

  /* Desktop Top Navigation Menu Bar */
  .desktop-nav-menu {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 auto 0 28px !important;
  }

  .desktop-nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 8px 14px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 20px !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-khmer) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .desktop-nav-btn svg {
    width: 15px !important;
    height: 15px !important;
    color: var(--text-muted) !important;
    transition: color 0.2s ease !important;
  }

  .desktop-nav-btn:hover {
    color: var(--text-primary) !important;
    background: var(--bg-input) !important;
  }

  .desktop-nav-btn.active {
    background: rgba(245, 158, 11, 0.15) !important;
    color: var(--gold-secondary) !important;
    font-weight: 700 !important;
  }

  .desktop-nav-btn.active svg {
    color: var(--gold-secondary) !important;
  }

  .desktop-nav-btn.vip-link {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.25)) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #f59e0b !important;
  }

  /* Computer does NOT use Mobile Bottom Bar */
  .bottom-nav {
    display: none !important;
  }

  /* Main Content: No huge bottom padding on computer */
  .main-content {
    padding: 24px 32px 40px 32px !important;
  }

  /* Expansive Hero 3D Slider on Computer */
  .hero-slider-wrap {
    height: 360px !important;
    margin-bottom: 32px !important;
  }
  .hero-slide-card {
    width: 680px !important;
    height: 330px !important;
  }

  /* Drama Grid on Computer: 5-6 cards per row! */
  .dramas-grid,
  .catalog-grid,
  .drama-grid,
  #dramasGrid,
  #donghuaGrid,
  #aiKhmerGrid,
  #searchGrid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)) !important;
    gap: 20px !important;
  }

  /* Drama Card Styling on Computer */
  .drama-card {
    border-radius: 14px !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  }
  .drama-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.3) !important;
  }
  .card-poster-wrap {
    aspect-ratio: 3 / 4.3 !important;
  }

  /* Tools / Services Grid on Computer */
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
  }

  /* Watch Page on Computer */
  .player-wrapper {
    max-width: 1050px !important;
    margin: 0 auto !important;
  }
  .video-container {
    max-height: 580px !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
  }
  .episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)) !important;
    gap: 8px !important;
  }

  /* VIP Plans Grid on Computer */
  .vip-plans-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }
  .vip-plan-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 22px !important;
    height: 100% !important;
  }
  .plan-price {
    margin-top: 16px !important;
  }

  /* Search Bar on Computer */
  .search-box-wrap {
    max-width: 650px !important;
    margin: 0 auto 24px auto !important;
  }
}


/* ==========================================================================
   Dedicated Desktop Navigation Bar (PC & Wide Screens)
   ========================================================================== */
.desktop-nav-bar {
  display: none;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 54px;
  z-index: 95;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.desktop-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.desktop-nav-inner::-webkit-scrollbar {
  display: none;
}

.desktop-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.desktop-nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.desktop-nav-item.active {
  color: #fbbf24;
  border-bottom-color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  font-weight: 700;
}

.desktop-nav-icon {
  font-size: 16px;
}

.desktop-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.desktop-badge.free {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.desktop-badge.new {
  background: rgba(220, 38, 38, 0.2);
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.4);
}
.desktop-badge.iq {
  background: rgba(0, 220, 90, 0.2);
  color: #00dc5a;
  border: 1px solid rgba(0, 220, 90, 0.4);
}
.desktop-badge.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.btn-pc-login {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  transition: transform 0.15s ease;
}
.btn-pc-login:hover {
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .desktop-nav-bar {
    display: block !important;
  }
  .app-header {
    height: 58px;
    padding: 0 24px;
  }
  .main-content {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 24px !important;
  }
  .drama-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 18px !important;
  }
  .search-box-wrap {
    max-width: 700px;
    margin: 0 auto 20px auto;
  }
}


/* ==========================================================================
   DESKTOP MASTERPIECE RESPONSIVE & THEME PERFECTION
   ========================================================================== */

/* Light Theme Navigation Styling */
body.light-mode .desktop-nav-bar,
[data-theme="light"] .desktop-nav-bar {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}
body.light-mode .desktop-nav-item,
[data-theme="light"] .desktop-nav-item {
  color: #334155 !important;
}
body.light-mode .desktop-nav-item:hover,
[data-theme="light"] .desktop-nav-item:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}
body.light-mode .desktop-nav-item.active,
[data-theme="light"] .desktop-nav-item.active {
  color: #d97706 !important;
  border-bottom-color: #d97706 !important;
  background: rgba(217, 119, 6, 0.1) !important;
  font-weight: 700 !important;
}

/* Dark Theme Navigation Styling */
body:not(.light-mode) .desktop-nav-bar {
  background: rgba(15, 23, 42, 0.97) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}
body:not(.light-mode) .desktop-nav-item {
  color: #94a3b8 !important;
}
body:not(.light-mode) .desktop-nav-item:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
body:not(.light-mode) .desktop-nav-item.active {
  color: #fbbf24 !important;
  border-bottom-color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.12) !important;
  font-weight: 700 !important;
}

/* Desktop Full Width Layout (Netflix / YouTube Style) */
@media (min-width: 768px) {
  body {
    background-color: var(--bg-primary) !important;
  }
  .app-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background-color: var(--bg-primary) !important;
  }
  .app-header {
    max-width: 100% !important;
    height: 64px !important;
    padding: 0 36px !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    background: var(--bg-card) !important;
  }
  .desktop-nav-bar {
    display: block !important;
    position: sticky !important;
    top: 64px !important;
    z-index: 95 !important;
  }
  .desktop-nav-inner {
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 36px !important;
    gap: 10px !important;
  }
  .main-content {
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 28px 36px 60px 36px !important;
  }
  .drama-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
    gap: 24px !important;
  }
  .search-box-wrap {
    max-width: 820px !important;
    margin: 0 auto 28px auto !important;
  }
  .genre-chips-scroll {
    justify-content: center !important;
    margin-bottom: 24px !important;
  }
}


/* ==========================================================================
   GLOBAL CINEMA STANDARD: LUXURY UNIFIED NAVBAR & DESKTOP STYLING (Netflix/iQIYI)
   ========================================================================== */

.global-navbar {
  height: 68px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

body.theme-dark .global-navbar {
  background: rgba(11, 14, 20, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
}

body.theme-light .global-navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

.global-navbar-container {
  max-width: 1560px !important;
  margin: 0 auto !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 20px !important;
  gap: 16px !important;
}

/* Nav Icons & Labels */
.nav-svg-icon {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, stroke 0.2s ease, fill 0.2s ease !important;
}

@media (max-width: 767px) {
  #desktopNavBar {
    display: none !important;
  }
  .nav-search-btn {
    display: none !important;
  }
}

@media (min-width: 768px) {
  #desktopNavBar {
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    margin: 0 16px !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .desktop-nav-inner {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .desktop-nav-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 8px 12px !important;
    border-radius: 9px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
  }

  body.theme-dark .desktop-nav-item:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-1px) !important;
  }

  body.theme-light .desktop-nav-item:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-1px) !important;
  }

  .desktop-nav-item.active {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.12) !important;
    font-weight: 700 !important;
  }

  .desktop-nav-item.active .nav-svg-icon {
    stroke: #f59e0b !important;
    color: #f59e0b !important;
    transform: scale(1.1) !important;
  }

  /* Desktop Badges */
  .desktop-badge {
    font-size: 9.5px !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
    line-height: 1 !important;
  }
  .desktop-badge.free {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
  }
  .desktop-badge.new {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
  }
  .desktop-badge.iq {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
  }
  .desktop-badge.gold {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #000 !important;
    font-weight: 900 !important;
  }

  /* Nav Quick Search */
  .nav-search-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 14px !important;
    border-radius: 20px !important;
    background: var(--bg-input) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
  }
  .nav-search-btn:hover {
    border-color: var(--gold-secondary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15) !important;
  }

  /* Global Layout on PC */
  .main-content {
    max-width: 1560px !important;
    margin: 0 auto !important;
    padding: 24px 28px 70px 28px !important;
    width: 100% !important;
  }

  /* Cinematic Responsive Grid */
  .drama-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)) !important;
    gap: 20px !important;
  }

  .drama-card {
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s ease !important;
    border-radius: 14px !important;
  }
  .drama-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(245, 158, 11, 0.2) !important;
  }
}

/* ==========================================================================
   PRO DOWNLOAD MODAL & FOLDER PICKER STYLING
   ========================================================================== */

.download-modal-card {
  max-width: 520px !important;
  width: 92% !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6) !important;
  animation: modalPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dl-choice-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.dl-choice-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 12px 8px !important;
  border-radius: 12px !important;
  background: var(--bg-input) !important;
  border: 1.5px solid var(--border-subtle) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.dl-choice-card:hover {
  border-color: rgba(245, 158, 11, 0.5) !important;
  transform: translateY(-2px) !important;
}

.dl-choice-card.active {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.12) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2) !important;
}

.dl-choice-icon {
  font-size: 20px !important;
  margin-bottom: 4px !important;
}

.dl-choice-title {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
}

.dl-choice-sub {
  font-size: 10px !important;
  color: var(--text-muted) !important;
  margin-top: 2px !important;
}

.dl-range-box {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  margin-bottom: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.dl-range-input {
  width: 75px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: center !important;
  outline: none !important;
}

.dl-folder-box {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  margin-bottom: 16px !important;
}

.dl-folder-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-top: 6px !important;
}

.dl-folder-path {
  font-size: 12px !important;
  font-family: monospace !important;
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  padding: 6px 10px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  flex: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.btn-pick-folder {
  padding: 6px 12px !important;
  border-radius: 7px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
}

.btn-pick-folder:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
}

.btn-execute-dl {
  width: 100% !important;
  padding: 14px !important;
  border-radius: 12px !important;
  border: none !important;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #000 !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35) !important;
  transition: all 0.2s ease !important;
}

.btn-execute-dl:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5) !important;
}

/* Strict SVG Sizing Guarantee across all modals */
.tool-modal-features svg,
.tool-modal-features li svg,
.modal-card svg.icon-svg-sm,
.modal-card svg.icon-svg-xs {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0 !important;
}

/* Brand Logo Guarantee (Strict 36px on Mobile, 42px on Desktop) */
.brand-logo-img {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  border-radius: 9px !important;
  object-fit: cover !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  border: 1.5px solid var(--border-gold) !important;
  flex-shrink: 0 !important;
  display: block !important;
}
.header-brand {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

/* ==========================================================================
   OFFICIAL BAKONG KHQR LUXURY FINTECH CARD WITH LASER SCANNER
   ========================================================================== */

.khqr-luxury-modal {
  background: var(--bg-card) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(225, 29, 72, 0.25) !important;
  animation: modalScaleUp 0.26s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.khqr-official-header {
  position: relative;
  overflow: hidden;
}

.khqr-official-header::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

/* High-tech Scanner Card Container */
.khqr-scanner-card {
  position: relative;
  border: 2px solid rgba(225, 29, 72, 0.3) !important;
  overflow: hidden !important;
}

/* High-tech Neon Corner Brackets */
.corner-bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #e11d48;
  border-style: solid;
  pointer-events: none;
  z-index: 5;
}
.corner-bracket.top-left {
  top: 6px;
  left: 6px;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 4px;
}
.corner-bracket.top-right {
  top: 6px;
  right: 6px;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 4px;
}
.corner-bracket.bottom-left {
  bottom: 6px;
  left: 6px;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 4px;
}
.corner-bracket.bottom-right {
  bottom: 6px;
  right: 6px;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 4px;
}

/* Laser Scanline Animation */
.khqr-laser-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e11d48 30%, #ef4444 50%, #f43f5e 70%, transparent);
  box-shadow: 0 0 12px #e11d48, 0 0 20px rgba(225, 29, 72, 0.8);
  border-radius: 50%;
  z-index: 4;
  animation: laserScan 2.4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes laserScan {
  0% { top: 12px; opacity: 0.7; }
  50% { opacity: 1; }
  100% { top: calc(100% - 15px); opacity: 0.7; }
}

/* Central Watermark Emblem */
.khqr-center-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #e11d48;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 3;
}

/* Live Radar Pulsing Dot */
.live-radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: radarPulse 1.6s infinite;
  flex-shrink: 0;
}

@keyframes radarPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Mini Bank Pills */
.bank-pill-mini {
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-secondary) !important;
}

/* Clear Downloads Button */
.btn-clear-downloads {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  border-radius: 9px !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.btn-clear-downloads:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
}

/* Logout Account Button */
.btn-profile-logout {
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 18px !important;
  border-radius: 12px !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.35) !important;
  color: #ef4444 !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.btn-profile-logout:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.25) !important;
}

/* Direct Bakong 1-Tap Pay Button Hover */
.btn-bakong-tap:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.5) !important;
}

/* ==========================================================================
   LUXURY GLOBAL CINEMA HEADER CONTROLS (Pixel-Perfect Alignment & No-Wrap)
   ========================================================================== */

.header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

/* Luxury PC Login Button */
.btn-pc-login {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

body.theme-light .btn-pc-login {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}

.btn-pc-login:hover {
  background: rgba(2, 132, 199, 0.18) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
}

.btn-pc-login span {
  white-space: nowrap !important;
}

/* Luxury VIP Pill Badge */
.vip-status-pill-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  color: #f59e0b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15) !important;
}

.vip-status-pill-badge:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.2) 100%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35) !important;
  transform: translateY(-1px) !important;
}

.vip-status-pill-badge span,
#headerVipLabel {
  white-space: nowrap !important;
  line-height: 1 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.vip-status-pill-badge svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  flex-shrink: 0 !important;
  color: #f59e0b !important;
}

/* Luxury Avatar Button */
.header-avatar-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  border: 1.5px solid var(--border-gold) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  cursor: pointer !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.header-avatar-btn:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4) !important;
}

.header-avatar-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: var(--text-secondary) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

body.theme-light .btn-theme-toggle {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.btn-theme-toggle:hover {
  color: var(--gold-secondary) !important;
  border-color: var(--gold-secondary) !important;
  transform: scale(1.05) !important;
}


/* ==========================================================================
   PERFECT MOBILE & TELEGRAM MINI APP HEADER (ZERO OVERFLOW, LUXURY LOOK)
   ========================================================================== */

@media (max-width: 767px) {
  /* Enforce compact height & zero horizontal scroll */
  .app-header.global-navbar {
    height: 54px !important;
    padding: 0 10px !important;
    overflow: hidden !important;
  }

  .global-navbar-container {
    padding: 0 4px !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  /* Compact Brand */
  .header-brand {
    gap: 7px !important;
    flex-shrink: 0 !important;
  }

  .brand-logo-img {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 8px !important;
  }

  .brand-title {
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: -0.2px !important;
    line-height: 1.1 !important;
  }

  .brand-sub {
    font-size: 8px !important;
    letter-spacing: 0.3px !important;
    line-height: 1 !important;
  }

  /* Header Right Actions */
  .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  /* CRITICAL: HIDE PC Login & Desktop Search on Mobile Mini App! */
  #btnPcLogin,
  .btn-pc-login,
  .nav-search-btn,
  #desktopNavBar {
    display: none !important;
  }

  /* Compact Theme Toggle */
  .btn-theme-toggle {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    padding: 0 !important;
  }
  .btn-theme-toggle svg {
    width: 13px !important;
    height: 13px !important;
  }

  /* Ultra-Sleek Mobile VIP Pill Badge */
  .vip-status-pill-badge {
    height: 28px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    border-radius: 14px !important;
    gap: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .vip-status-pill-badge svg,
  .crown-gold-icon {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
  }

  .vip-status-pill-badge span,
  #headerVipLabel {
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }

  /* Mobile Avatar (Always visible, NEVER clipped) */
  .header-avatar-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--border-gold) !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
  }

  .header-avatar-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
  }
}

/* Light Theme Perfection for Header */
body.theme-light .global-navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .brand-title {
  color: #0f172a !important;
}

body.theme-light .vip-status-pill-badge {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 1.2px solid #f59e0b !important;
  color: #b45309 !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15) !important;
}

body.theme-light .btn-theme-toggle {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

body.theme-dark .vip-status-pill-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
  border: 1.2px solid rgba(245, 158, 11, 0.6) !important;
  color: #f59e0b !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
}

/* ==========================================================================
   PROFILE CARD LOGOUT & DESKTOP HEADER LOGOUT BUTTONS
   ========================================================================== */

.profile-card-pro {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  padding: 16px 20px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  margin-bottom: 16px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.profile-card-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  flex: 1 !important;
  min-width: 220px !important;
}

.profile-card-right {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.btn-profile-logout-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 9px 18px !important;
  border-radius: 20px !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1.2px solid rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
}

.btn-profile-logout-pill:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #ef4444 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}

/* Header Logout Button on Desktop */
.btn-header-logout {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 16px !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.btn-header-logout:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 767px) {
  .btn-header-logout {
    display: none !important;
  }
}
