/* Modern Google Fonts & License Plate Fonts */
@import url('https://fonts.cdnfonts.com/css/alte-din-1451-mittelschrift');
@import url('https://fonts.cdnfonts.com/css/mandatory');
@import url('https://fonts.cdnfonts.com/css/fe-schrift');

@font-face {
  font-family: 'FE-Schrift';
  font-style: normal;
  font-weight: 400 700;
  src: url('https://fonts.cdnfonts.com/s/15443/FESchrift.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'KSA Plate Font';
  src: url('fonts/KSAPlateFont.woff2') format('woff2'),
       url('fonts/KSAPlateFont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DIN 1451 Mittelschrift';
  src: url('fonts/DIN1451Mittelschrift.woff2') format('woff2'),
       url('fonts/DIN1451Mittelschrift.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ================================================================
   Design Tokens & CSS Variables - Premium Luxury White Mode
   Inspired by: Apple, Porsche, Stripe — Clean & Minimal Aesthetic
================================================================ */
:root {
  /* === Core Backgrounds === */
  --bg-primary:    #F8FAF9;   /* Crisp white with fresh emerald whisper */
  --bg-secondary:  #FFFFFF;   /* Pure white card surface */
  --bg-tertiary:   #F0FDF4;   /* Light emerald/mint tint for inputs & rows */

  /* === Brand / Accent Palette (الأخضر الفاتح المائل للغامق & الأبيض) === */
  --accent-brand:       #059669;   /* Light-tending-to-dark Emerald Green */
  --accent-brand-hover: #047857;   /* Deeper emerald for hover & active states */
  --accent-gold:        #059669;   /* Saudi Emerald Green across all highlights */
  --accent-gold-light:  #34D399;   /* Bright jade/mint for subtle highlights */
  --accent-gold-hover:  #047857;
  --accent-gold-glow:   rgba(5, 150, 105, 0.18);
  --accent-blue:        #0284C7;
  --accent-blue-hover:  #0369A1;
  --accent-green:       #059669;
  --accent-green-hover: #047857;
  --accent-red:         #DC2626;

  /* === Text Hierarchy === */
  --text-primary:   #064E3B;   /* Deep emerald near-black — prestigious headings */
  --text-secondary: #334155;   /* Slate body text */
  --text-muted:     #94A3B8;   /* Light muted placeholders */

  /* === Borders & Glass === */
  --border-color:  rgba(5, 150, 105, 0.16);
  --border-strong: rgba(5, 150, 105, 0.35);
  --glass-bg:      rgba(255, 255, 255, 0.96);
  --glass-border:  rgba(5, 150, 105, 0.28);

  /* === Typography === */
  --font-ar: 'Tajawal', 'Cairo', 'Almarai', Tahoma, sans-serif;
  --font-en: 'Outfit', 'Roboto Condensed', 'Oswald', Arial, sans-serif;
  --font-plate-ar: 'Noto Naskh Arabic', 'Reem Kufi', 'Noto Kufi Arabic', 'Cairo', Tahoma, sans-serif;
  --font-plate-en: 'FE-Schrift', 'FE-Schrift', 'Oswald', 'Roboto Condensed', 'Impact', Arial, sans-serif;

  /* === Real Saudi Plate Colors === */
  --plate-bg:        #FFFFFF;    /* Pure white — all categories body */
  --plate-border:    #111111;    /* Near-black stamped frame */
  --plate-text:      #0A0A0A;    /* Near-black embossed characters */
  --plate-strip-private:   #FFFFFF;   /* Private: white strip */
  --plate-strip-transport: #1A4FC4;   /* Commercial: royal blue strip */
  --plate-strip-taxi:      #F5C518;   /* Taxi: yellow strip */
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ar);
  line-height: 1.6;
  direction: rtl; /* Default Arabic RTL */
  min-height: 100vh;
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* GPU Acceleration for Smooth Mobile Scrolling & Animations */
.plate-card, .vip-ticker-card, .glass-card, .live-viewer-card, .license-plate {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Language Specific Overrides */
body.lang-en {
  direction: ltr;
  font-family: var(--font-en);
}

body.lang-en .ar-only {
  display: none !important;
}

body:not(.lang-en) .en-only {
  display: none !important;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography & Headers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
}

/* Background Gradients */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(181, 148, 16, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  top: -100px;
  right: -100px;
  z-index: -1;
  pointer-events: none;
}

.bg-glow-2 {
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(11, 76, 56, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  bottom: -100px;
  left: -100px;
  z-index: -1;
  pointer-events: none;
}

/* Main Container Layout */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Header Component */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--accent-brand) 0%, #062f22 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(11, 76, 56, 0.3);
}

.logo-text h1 {
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  background: linear-gradient(to left, var(--text-primary), var(--accent-brand-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

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

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Grid Sections */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.sell-plate-grid {
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .main-grid, .sell-plate-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* Glass Card — Clean Minimal White Surface */
.glass-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Preview Section Container */
.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  position: relative;
  min-height: 180px;
}

.preview-title {
  align-self: flex-start;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ========================================================
   LICENSE PLATE DESIGN SYSTEM
   Based 100% on real Saudi plates (Wikipedia Commons reference)
   
   SHORT PLATE (305×155mm) real layout:
   ┌────────────────────────────────────────────────┐
   │  Arabic digits    │ Arabic letters  │  ██████  │
   │  (large, bold)    │  (large, bold)  │  ██ SA ██│
   ├───────────────────┼─────────────────│  ██████  │
   │  Latin digits     │ Latin letters   │  ██████  │
   │  (smaller, bold)  │ (smaller, bold) │   ●/▼/▲  │
   └───────────────────┴─────────────────┴──────────┘
   
   LONG PLATE (520×110mm) real layout:
   ┌───────────────────┬──────────┬──────────────────┐
   │  Arabic digits    │  ██████  │  Arabic letters  │
   │  (large, bold)    │  ██ SA ██│  (large, bold)   │
   ├───────────────────│  ██████  ├──────────────────┤
   │  Latin digits     │  ██████  │  Latin letters   │
   │  (smaller, bold)  │   ●/▼/▲  │  (smaller, bold) │
   └───────────────────┴──────────┴──────────────────┘
   ======================================================== */

/* ================================================================
   SAUDI LICENSE PLATE DESIGN SYSTEM — PIXEL-PERFECT REAL PLATES
   Reference: Official Saudi Traffic Authority + Wikipedia Commons

   SHORT PLATE real layout (305×155 mm):
   ┌────────────────────────────────────────────────────────────┐
   │  ████ أرقام عربية (RTL) ████  │ حروف (3 أعمدة) │ شريط KSA│
   │        62% of width           │   28% of width   │  10%    │
   ├──────── horizontal divider line ───────────────────────────┤
   │  ████ English digits (LTR) ████ │ Eng letters     │        │
   └────────────────────────────────────────────────────────────┘

   LONG PLATE real layout (520×110 mm):
   ┌─────────────────┬──────────┬─────────────────────────────┐
   │  Arabic digits  │  شريط   │  Arabic letters (3 cols)    │
   │   (45% width)   │  KSA    │       (45% width)           │
   ├─────────────────│ (10%)   ├─────────────────────────────┤
   │  English digits │         │  English letters            │
   └─────────────────┴─────────┴─────────────────────────────┘
================================================================ */

/* === BASE PLATE === */
.license-plate {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  direction: ltr !important;
  user-select: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  font-family: Arial, sans-serif;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  /* CORRECTED: Pure white body, exactly like real Saudi plates */
  background: #FFFFFF;
  /* CORRECTED: 4-layer embossed metallic rim */
  border: 3px solid #111111;
  border-radius: 7px;
  box-shadow:
    0 8px 28px rgba(0,0,0,0.20),
    0 2px 6px rgba(0,0,0,0.10),
    inset 0 0 0 2px rgba(255,255,255,0.95),
    inset 0 0 0 4px rgba(0,0,0,0.08);
}

/* Aluminum light sheen overlay */
.license-plate::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(128deg,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.20) 48%,
    rgba(255,255,255,0.30) 50%,
    rgba(255,255,255,0.20) 52%,
    rgba(255,255,255,0) 70%);
  pointer-events: none;
  z-index: 9;
}

.license-plate * {
  direction: ltr !important;
  box-sizing: border-box;
}

/* Inner stamped groove (debossed inner border ring) */
.plate-inner-border {
  position: absolute;
  top: 7px; left: 7px; right: 7px; bottom: 7px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  box-shadow:
    inset 0.5px 0.5px 0 rgba(255,255,255,0.85),
    0.5px 0.5px 0 rgba(255,255,255,0.85);
  pointer-events: none;
  z-index: 10;
}

/* Realistic metallic bolt screws */
.plate-bolt {
  position: absolute;
  width: 9px;
  height: 9px;
  background: radial-gradient(circle at 33% 33%, #e8f0f8 0%, #9ab0c8 55%, #4a6070 100%);
  border: 1px solid #2a3a44;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.55), inset 0 0.5px 1px rgba(255,255,255,0.5);
  z-index: 11;
}

/* =====================================================
   SHORT PLATE — 335×155mm (Official Saudi Short Plate)
   Layout: [Digits 62%] [Letters 28%] [KSA Strip 10%]
   ===================================================== */
.license-plate.format-short {
  width: 335px;
  height: 155px;
}

/* Short plate bolt positions (avoid KSA strip area on right) */
.format-short .plate-bolt.bolt-tl { top: 11px; left: 12px; }
.format-short .plate-bolt.bolt-bl { bottom: 11px; left: 12px; }
.format-short .plate-bolt.bolt-tr { top: 11px; right: 54px; }
.format-short .plate-bolt.bolt-br { bottom: 11px; right: 54px; }

/* === NUMBERS BLOCK (Digits Column) === */
.plate-numbers {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-items: stretch;
}

.plate-numbers .quad-num-ar,
.plate-numbers .quad-num-en {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0A0A0A;
  white-space: nowrap;
  padding: 0 6px;
  letter-spacing: 4px;
}

/* Arabic numbers: Real Kufi geometric font */
.plate-numbers .quad-num-ar {
  font-family: var(--font-plate-ar);
  font-weight: 800;
  /* Horizontal divider between Arabic and English rows */
  border-bottom: 2px solid #111111;
  /* Silver highlight under the stamped line */
  box-shadow: 0 1.5px 0 rgba(255,255,255,0.85);
}

/* English numbers: condensed block font */
.plate-numbers .quad-num-en {
  font-family: 'FE-Schrift', var(--font-plate-en), 'Oswald', 'Roboto Condensed', 'Impact', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 5px;
}

/* Short plate numbers: take balanced width (approx 45%) */
.format-short .plate-numbers {
  flex: 1;
  min-width: 0;
  border-right: 2.5px solid #111111;
  box-shadow: 1.5px 0 0 rgba(255,255,255,0.85);
}
.format-short .plate-numbers .quad-num-ar,
.format-short .plate-numbers .quad-num-en {
  font-size: 2.25rem;
  letter-spacing: 3px;
  margin-right: 0;
}

/* Long plate numbers: take 45% of plate width */
.format-long .plate-numbers {
  flex: 0 0 45%;
  border-right: 2.5px solid #111111;
  box-shadow: 1.5px 0 0 rgba(255,255,255,0.85);
}
.format-long .plate-numbers .quad-num-ar,
.format-long .plate-numbers .quad-num-en {
  font-size: 2.15rem;
  letter-spacing: 6px;
  margin-right: -6px;
}

/* === LETTERS BLOCK (3 equal columns) === */
.plate-letters {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-items: stretch;
}

/* Short plate letters: take balanced width (approx 45%) */
.format-short .plate-letters {
  flex: 1;
  min-width: 0;
}

/* Long plate letters: take the remaining 45% */
.format-long .plate-letters {
  flex: 1;
}

/* Letters Columns Partitioning (Three equal columns side by side) */
.plate-letters-cols {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
}

.letter-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  text-align: center;
}

.letter-ar, .letter-en {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 800;
  color: #0A0A0A;
}

/* Arabic letters: standard Naskh/Kufi font */
.letter-ar {
  font-family: var(--font-plate-ar);
  font-weight: 800;
  /* Horizontal divider between Arabic and English rows */
  border-bottom: 2px solid #111111;
  box-shadow: 0 1.5px 0 rgba(255,255,255,0.85);
}

/* English letters: block condensed font */
.letter-en {
  font-family: 'FE-Schrift', var(--font-plate-en), 'Oswald', 'Roboto Condensed', 'Impact', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 1.5px;
}

/* Short plate letter font sizes */
.format-short .plate-letters .letter-ar,
.format-short .plate-letters .letter-en {
  font-size: 1.85rem;
}

/* Long plate letter font sizes */
.format-long .plate-letters .letter-ar,
.format-long .plate-letters .letter-en {
  font-size: 1.75rem;
}

/* === KSA STRIP — Short plate (right side, vertical) ===
   Real dimensions: ~34px wide, pure white background,
   black Saudi emblem, "المملكة" text rotated, "KSA" horizontal */
.format-short .plate-strip {
  flex: 0 0 34px;
  width: 34px;
  max-width: 34px;
  flex-shrink: 0;
  border-left: 2.5px solid #111111;
  box-shadow: -1.5px 0 0 rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  /* Private category: white strip */
  background: #FFFFFF;
}

/* =====================================================
   LONG PLATE — 520×110 mm (Official Saudi Long Plate)
   Layout: [Digits 45%] [KSA Strip 10%] [Letters 45%]
   ===================================================== */
.license-plate.format-long {
  width: 520px;
  height: 110px;
}

/* Bolt positions — long (centered vertically on left/right edges) */
.format-long .plate-bolt.bolt-tl { top: 50%; left: 14px; transform: translateY(-50%); }
.format-long .plate-bolt.bolt-tr { top: 50%; right: 14px; transform: translateY(-50%); }

/* KSA center strip — long plate: between digits and letters */
.format-long .plate-strip {
  flex: 0 0 10%;  /* Exactly 10% of 520px = ~52px */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 5px 0;
  border-left: 2.5px solid #111111;
  border-right: 2.5px solid #111111;
  box-shadow: -1.5px 0 0 rgba(255,255,255,0.85), 1.5px 0 0 rgba(255,255,255,0.85);
  background: #FFFFFF;
}

/* Layout partitioning for long slogan plates */
.format-long.has-slogan .plate-left-section {
  display: flex;
  flex: 1;
  height: 100%;
}

.format-long.has-slogan .plate-left-section .plate-numbers {
  flex: 1;
  height: 100%;
  border-right: none !important;
  border-left: none !important;
}

.format-long.has-slogan .plate-right-section {
  display: flex;
  flex: 1;
  height: 100%;
  flex-direction: row;
}

.format-long.has-slogan .plate-right-section .plate-letters {
  flex: 1;
  height: 100%;
  border-right: none !important;
  border-left: none !important;
}

/* Strip position when slogan is active on long plate */
.format-long.has-slogan .plate-strip {
  width: 36px;
  border-right: none !important;
  border-left: none !important;
  background: transparent;
}

/* Remove vertical dividers for slogan plates */
.format-long.has-slogan .plate-numbers,
.format-short.has-slogan .plate-numbers,
.format-long.has-slogan .plate-center-logo,
.format-short.has-slogan .plate-center-logo,
.format-long.has-slogan .plate-letters,
.format-short.has-slogan .plate-letters,
.format-long.has-slogan .plate-strip,
.format-short.has-slogan .plate-strip,
.format-long.has-slogan .plate-left-section,
.format-long.has-slogan .plate-right-section {
  border-right: none !important;
  border-left: none !important;
}

.format-long.has-slogan .plate-center-logo {
  width: 80px; /* Make the centered logo look larger and clearer */
}

.format-short.has-slogan .plate-center-logo {
  width: 55px; /* Fit nicely on short plate */
}

/* Remove horizontal dividers (the line in the middle) for slogan plates */
.format-long.has-slogan .quad-num-ar,
.format-short.has-slogan .quad-num-ar,
.format-long.has-slogan .letter-ar,
.format-short.has-slogan .letter-ar {
  border-bottom: none !important;
}

/* Adjust vertical strip for long slogan plates (height 112px) to prevent cutoff */
.format-long.has-slogan .plate-strip.strip-vertical {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.format-long.has-slogan .plate-strip.strip-vertical .strip-emblem {
  width: 14px;
  height: 14px;
  margin-bottom: 1px;
}
.format-long.has-slogan .plate-strip.strip-vertical .strip-country-ar {
  font-size: 0.45rem;
  letter-spacing: 0px;
  margin: 1px 0;
  height: 38px;
}
.format-long.has-slogan .plate-strip.strip-vertical .strip-country-en {
  font-size: 0.5rem;
  line-height: 0.95;
  margin: 1px 0;
}
.format-long.has-slogan .plate-strip.strip-vertical .strip-category {
  width: 10px;
  height: 10px;
  margin-top: 1px;
}
.format-long.has-slogan .plate-strip.strip-vertical .strip-category::after {
  width: 10px;
  height: 10px;
}
/* Downward triangle for transport category in long slogan plate */
.format-long.has-slogan.cat-transport .plate-strip.strip-vertical .strip-category::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid #ffffff;
}
/* Upward triangle for taxi category in long slogan plate */
.format-long.has-slogan.cat-taxi .plate-strip.strip-vertical .strip-category::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid #111111;
}

/* =====================================================
   STRIP INTERNALS (shared for short & long)
   ===================================================== */
.strip-country-ar {
  font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
  font-weight: 900;
  font-size: 0.5rem;
  line-height: 1;
  text-align: center;
  color: #0a0a0a;
  white-space: nowrap;
}

.strip-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.format-long .strip-emblem {
  width: 28px;
  height: 28px;
}

.strip-emblem img,
.strip-emblem svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.strip-country-en {
  font-family: 'Arial Black', Impact, Arial, sans-serif;
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  line-height: 1;
  text-align: center;
  color: #0a0a0a;
}

.strip-category {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

/* Hologram and category footer container inside KSA strip */
.strip-bottom-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: auto;
  padding-bottom: 4px;
}

.strip-hologram {
  width: 15px;
  height: 11px;
  background: linear-gradient(135deg, #a1a8ba 0%, #cbd5e1 50%, #94a3b8 100%);
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  border-radius: 1.5px;
  box-shadow: inset 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.strip-hologram::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: holo-shine 2.5s infinite linear;
}

@keyframes holo-shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Small adjustments for vertical/short strip bottom info */
.format-short .strip-bottom-info {
  gap: 3px;
  padding-bottom: 2px;
}

.format-short .strip-hologram {
  width: 11px;
  height: 8px;
}

/* Vertical text layout for vertical strips (short and slogan plates) */
/* Base vertical strip settings */
.plate-strip.strip-vertical {
  width: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.plate-strip.strip-vertical .strip-country-ar {
  writing-mode: horizontal-tb;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-90deg);
  transform-origin: center;
  white-space: nowrap;
}

.plate-strip.strip-vertical .strip-country-en {
  font-family: 'Arial Black', Impact, sans-serif;
}

.plate-strip.strip-vertical .strip-emblem img,
.plate-strip.strip-vertical .strip-emblem svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Sizing specific for short plate format */
.format-short .plate-strip.strip-vertical {
  padding: 8px 0;
}
.format-short .plate-strip.strip-vertical .strip-emblem {
  width: 18px;
  height: 18px;
  margin-bottom: 2px;
}
.format-short .plate-strip.strip-vertical .strip-country-ar {
  font-size: 0.52rem;
  letter-spacing: 0.5px;
  margin: 2px 0;
  height: 55px;
}
.format-short .plate-strip.strip-vertical .strip-country-en {
  font-size: 0.65rem;
  line-height: 1.0;
  margin: 2px 0;
}
.format-short .plate-strip.strip-vertical .strip-category {
  width: 12px;
  height: 12px;
  margin-top: 2px;
}
.format-short .plate-strip.strip-vertical .strip-category::after {
  width: 12px;
  height: 12px;
}
.format-short.cat-transport .plate-strip.strip-vertical .strip-category::after {
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid #ffffff;
}
.format-short.cat-taxi .plate-strip.strip-vertical .strip-category::after {
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #111111;
}

.quad-num-ar, .quad-let-ar, .quad-num-en, .quad-let-en,
.plate-numbers div, .plate-letters div,
.plate-body-slogan div {
  text-shadow: 
    -1px -1.5px 0.5px rgba(0, 0, 0, 0.8),
    1px 1.5px 0.5px rgba(255, 255, 255, 0.95),
    1px -1px 0.5px rgba(0, 0, 0, 0.5),
    -1px 1px 0.5px rgba(255, 255, 255, 0.5),
    2px 2.5px 2px rgba(0, 0, 0, 0.35);
}

/* =====================================================
   CATEGORY THEMING
   Based exactly on real plates:
   - Private:    white strip  + filled black circle
   - Commercial: BLUE strip   + white downward triangle
   - Taxi:       YELLOW strip + black upward triangle
   ===================================================== */

/* === خصوصي — Private (white strip) === */
.license-plate.cat-private {
  background: #ffffff;
}
.license-plate.cat-private .plate-strip {
  background: #ffffff;
}
.license-plate.cat-private .strip-country-ar,
.license-plate.cat-private .strip-country-en {
  color: #0a0a0a;
}
/* Filled black circle */
.license-plate.cat-private .strip-category::after {
  content: '';
  width: 14px;
  height: 14px;
  background: #111111;
  border-radius: 50%;
}

/* === نقل تجاري — Commercial (BLUE strip only, body stays white) === */
.license-plate.cat-transport {
  background: #ffffff;
}
.license-plate.cat-transport .plate-strip {
  background: #1a56c4;
  border-color: #0d3a8a;
}
.license-plate.cat-transport .strip-country-ar,
.license-plate.cat-transport .strip-country-en {
  color: #ffffff;
}
/* White downward solid triangle */
.license-plate.cat-transport .strip-category::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 13px solid #ffffff;
}

/* === أجرة — Taxi (YELLOW strip only, body stays white) === */
.license-plate.cat-taxi {
  background: #ffffff;
}
.license-plate.cat-taxi .plate-strip {
  background: #f5c518;
  border-color: #c9a200;
}
.license-plate.cat-taxi .strip-country-ar,
.license-plate.cat-taxi .strip-country-en {
  color: #0a0a0a;
}
/* Black upward solid triangle */
.license-plate.cat-taxi .strip-category::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 13px solid #111111;
}

/* =====================================================
   SLOGAN CENTER LOGO (optional column between nums & letters)
   ===================================================== */
.plate-center-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 2;
  padding: 2px;
  border-left: 2.5px solid #111;
}

.format-short .plate-center-logo { width: 50px; }
.format-long .plate-center-logo { width: 56px; }

.plate-center-logo img,
.plate-center-logo svg {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

/* Slogan short plate adjustments (flexible sizing) */
.format-short.has-slogan .plate-numbers {
  flex: 1;
  min-width: 0;
}
.format-short.has-slogan .plate-letters {
  flex: 1;
  min-width: 0;
}

/* Builder Forms Grid Styling */
.builder-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.builder-controls-grid .control-group {
  margin-bottom: 0;
}

.builder-controls-grid .span-2 {
  grid-column: span 2;
}

@media (max-width: 480px) {
  .builder-controls-grid {
    grid-template-columns: 1fr;
  }
  .builder-controls-grid .span-2 {
    grid-column: span 1;
  }
}

/* === Form and Builder Controls Organization === */
.builder-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control-group.span-2 {
  grid-column: span 2;
}

.control-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.input-row > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--accent-gold-glow);
}

.form-input.digits-input {
  letter-spacing: 2px;
  font-size: 1.1rem;
  text-align: center;
  font-family: var(--font-en);
}

.form-input.letters-input {
  letter-spacing: 4px;
  font-size: 1.1rem;
  text-align: center;
}

/* Filter Toggles */
.toggle-group {
  display: flex;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.toggle-btn {
  flex: 1;
  text-align: center;
  padding: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.toggle-btn.active {
  background: var(--accent-brand);
  color: #fff;
}

/* Slogan Grid Selector */
.slogan-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  width: 100%;
}

.slogan-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 72px;
}

.slogan-opt.active {
  border-color: var(--accent-gold);
  background: rgba(181, 148, 16, 0.08);
}

.slogan-opt img, .slogan-opt svg {
  width: 24px;
  height: 24px;
  margin-bottom: 0.35rem;
}

.slogan-opt span {
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 600;
}

.slogan-opt.active span {
  color: var(--accent-gold);
}

/* ========================================================
   MARKETPLACE SECTION
   ======================================================== */

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 3px;
  background: var(--accent-brand-hover);
  border-radius: 2px;
}

body.lang-en .section-title::after {
  right: auto;
  left: 0;
}

/* Filters Bar Container */
.filters-bar {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
  background: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  align-items: end;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-item label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.filter-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 140px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-brand-hover);
}

.search-input-wrapper {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

body.lang-en .search-icon {
  right: auto;
  left: 12px;
}

.search-input {
  padding-right: 2.5rem;
  width: 100%;
}

body.lang-en .search-input {
  padding-right: 1rem;
  padding-left: 2.5rem;
}

/* Plate Cards Grid */
.plates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0.75rem !important;
  }
  header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    text-align: center;
  }
  .logo-container {
    justify-content: center;
  }
  .nav-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .btn {
    min-height: 44px;
    padding: 0.6rem 1rem;
  }
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }
  .filter-item, .search-input-wrapper {
    width: 100%;
  }
  .filter-select {
    width: 100%;
    min-height: 44px;
  }
  .plates-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }
  .plate-card {
    padding: 1.1rem 0.85rem;
    border-radius: 16px;
  }
  .plate-card-preview {
    min-height: 95px !important;
    margin: 0.35rem 0 !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .plate-card .license-plate {
    transform: scale(0.42) !important;
    transform-origin: center center !important;
    margin: 0 auto !important;
  }
  .plate-card .license-plate.format-long {
    transform: scale(0.27) !important;
    transform-origin: center center !important;
    margin: 0 auto !important;
  }
  .plate-card h4, .plate-card .plate-city-header {
    font-size: 0.95rem !important;
  }
  .plate-price-val {
    font-size: 1.05rem !important;
  }
  .builder-controls {
    flex-direction: column;
    align-items: stretch !important;
  }
  .control-group {
    width: 100%;
  }
}

/* Plate Listing Card */
.plate-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.plate-card:hover, .plate-card:active {
  transform: translateY(-6px);
  border-color: var(--accent-gold);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.25);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(212, 175, 55, 0.05) 100%);
}

.plate-card.premium {
  border-color: rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(212, 175, 55, 0.06) 100%);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.12);
}

.plate-card-preview {
  margin: 0.75rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 130px;
  overflow: visible;
}

.plate-card-preview .license-plate {
  transform: scale(0.78);
  transform-origin: center center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: 0;
}

.plate-card-preview .license-plate.format-long {
  transform: scale(0.58);
  margin: 0;
}

.plate-card:hover .plate-card-preview .license-plate {
  transform: scale(0.83);
}

.plate-card:hover .plate-card-preview .license-plate.format-long {
  transform: scale(0.62);
}

.plate-card-details {
  width: 100%;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plate-price-tag {
  display: flex;
  flex-direction: column;
}

.plate-price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.plate-price-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.plate-type-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.plate-type-badge.cat-private {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.plate-type-badge.cat-transport {
  background: rgba(29, 78, 216, 0.08);
  color: #1d4ed8;
  border: 1px solid rgba(29, 78, 216, 0.2);
}

/* ========================================================
   MODAL WINDOW & DETAIL DIALOGS
   ======================================================== */

.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.show,
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-backdrop.show .modal-content,
.modal-backdrop.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  align-items: center;
}

/* Plate details specific layout inside modal */
.modal-plate-view {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  width: 100%;
}

@media (max-width: 576px) {
  .modal-plate-view .license-plate {
    transform: scale(0.75);
    transform-origin: center center;
    margin: -20px 0;
  }
  .modal-plate-view .license-plate.format-long {
    transform: scale(0.55);
    transform-origin: center center;
    margin: -25px 0;
  }
}

.info-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.info-row-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.info-row-value {
  color: var(--text-primary);
  font-weight: 700;
}

.info-row-value.gold {
  color: var(--accent-gold);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-brand-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  z-index: 200;
  transform: translateY(150px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.lang-en .toast-msg {
  right: auto;
  left: 24px;
  border-left: none;
  border-right: 4px solid var(--accent-brand-hover);
}

.toast-msg.show {
  transform: translateY(0);
}

/* Footer Section */
footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer span {
  color: var(--accent-brand-hover);
  font-weight: 600;
}

/* Helpers */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gap-sm {
  gap: 0.5rem;
}

.mt-lg {
  margin-top: 1.5rem;
}

/* Snapchat Button Styling */
.btn-snapchat {
  background-color: #fffc00 !important;
  color: #000000 !important;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.btn-snapchat:hover {
  background-color: #e6e300 !important;
  transform: translateY(-2px);
}

/* Bidding Portal Container inside Modal */
.bidding-portal-box {
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  width: 100%;
}
.bidding-portal-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bidding-portal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Bid Price Tags on Marketplace Cards */
.plate-card-bids-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(0,0,0,0.06);
}
.plate-bid-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.plate-bid-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-blue);
}

/* Notification Dashboard Tabs */
.notifications-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.notifications-tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
.notifications-tab-btn.active {
  background: var(--accent-brand);
  color: #ffffff;
  border-color: var(--accent-brand);
}

/* Notification Bid Item Card */
.bid-notification-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}
.bid-notification-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}
.bid-notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bid-notification-plate-info {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}
.bid-notification-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.bid-notification-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}
.bid-notification-price {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-blue);
}
.bid-notification-phone {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.bid-notification-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   FULL-SCREEN CONTROL CENTER & SUPER ADMIN CONSOLE
   ========================================================================== */
.control-center-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.control-center-backdrop.show {
  display: flex;
  opacity: 1;
}

.control-center-container {
  width: 100%;
  height: 100%;
  display: flex;
  background: var(--bg-primary);
  overflow: hidden;
}

/* Sidebar */
.control-center-sidebar {
  width: 290px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  z-index: 10;
}

html[dir="ltr"] .control-center-sidebar {
  border-left: none;
  border-right: 1px solid var(--border-color);
}

.sidebar-header {
  padding: 1.5rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sidebar-nav {
  flex: 1;
  padding: 1.2rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.sidebar-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: inherit;
}

.sidebar-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateX(-3px);
}

html[dir="ltr"] .sidebar-nav-btn:hover {
  transform: translateX(3px);
}

.sidebar-nav-btn.active {
  background: var(--accent-blue);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.sidebar-nav-btn.admin-btn {
  border: 1px dashed rgba(234, 179, 8, 0.4);
  color: #facc15;
  background: rgba(234, 179, 8, 0.04);
}

.sidebar-nav-btn.admin-btn:hover {
  background: rgba(234, 179, 8, 0.12);
}

.sidebar-nav-btn.admin-btn.active {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  color: #000;
  border: none;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4);
}

.sidebar-badge {
  margin-inline-start: auto;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.sidebar-nav-btn.active .sidebar-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.8rem 0.4rem;
}

.sidebar-footer {
  padding: 1.2rem;
  border-top: 1px solid var(--border-color);
}

/* Main Content Area */
.control-center-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

.control-center-header {
  padding: 1.2rem 2.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
}

.mobile-sidebar-toggle {
  display: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.control-center-body {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem;
}

/* Stats Cards Grid */
.overview-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card-vip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card-vip:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.25);
}

.stat-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.stat-card-info h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card-info .stat-num {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 4px;
  color: var(--text-primary);
}

/* Super Admin Table & Cards */
.admin-plate-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.admin-plate-card:hover {
  border-color: rgba(255,255,255,0.2);
}

.admin-badge-verified {
  background: rgba(14, 161, 117, 0.15);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-badge-vip {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(202, 138, 4, 0.2));
  color: #facc15;
  border: 1px solid #facc15;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Responsive Control Center */
@media (max-width: 900px) {
  .control-center-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    transform: translateX(100%);
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
  }
  
  html[dir="ltr"] .control-center-sidebar {
    right: auto;
    left: 0;
    transform: translateX(-100%);
  }

  .control-center-sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-sidebar-toggle {
    display: flex;
  }

  .control-center-header {
    padding: 1rem 1.5rem;
  }

  .control-center-body {
    padding: 1.5rem;
  }
}

/* VIP Moving Ticker / Carousel */
.vip-carousel-box {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(212, 175, 55, 0.04) 100%);
  border: 1.5px solid var(--accent-gold);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.15), 0 4px 10px -5px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.vip-carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vip-carousel-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.vip-ticker-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1.25rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-gold) rgba(0,0,0,0.1);
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.vip-ticker-track::-webkit-scrollbar {
  height: 6px;
}
.vip-ticker-track::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 4px;
}

.vip-ticker-card {
  flex: 0 0 270px;
  scroll-snap-align: center;
  background: var(--bg-secondary);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  padding: 1.15rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}

.vip-ticker-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
  box-shadow: 0 15px 25px -5px rgba(212, 175, 55, 0.25);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(212, 175, 55, 0.06) 100%);
}

.vip-ticker-card .plate-card-preview {
  margin: 0.25rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 90px;
  overflow: hidden;
}

.vip-ticker-card .plate-card-preview .license-plate {
  transform: scale(0.68);
  transform-origin: center center;
  margin: 0 auto;
}

.vip-ticker-card .plate-card-preview .license-plate.format-long {
  transform: scale(0.44);
}

.vip-scroll-btn {
  background: var(--bg-secondary);
  color: var(--accent-gold);
  border: 1.5px solid var(--accent-gold);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s;
}
.vip-scroll-btn:hover {
  background: var(--accent-gold);
  color: #000;
  transform: scale(1.1);
}

/* Print Styles for Official Contract */
@media print {
  body * {
    visibility: hidden !important;
  }
  #printable-contract-view, #printable-contract-view * {
    visibility: visible !important;
  }
  #printable-contract-view {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 20px !important;
    margin: 0 !important;
    direction: rtl !important;
    z-index: 999999 !important;
  }
}

/* Mobile App Safe Area & Ultra Compact Screens Calibration */
body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

@media (max-width: 640px) {
  /* TikTok Live Section Mobile Optimization */
  .live-viewer-card {
    padding: 1rem !important;
    border-radius: 16px !important;
    margin-bottom: 1.25rem !important;
  }
  .live-viewer-card h2 {
    font-size: 1.1rem !important;
  }
  .live-viewer-card p {
    font-size: 0.82rem !important;
    margin-bottom: 1rem !important;
  }
  #live-registration-form-area > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }
  .live-viewer-status-indicator {
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
    margin-bottom: 0.5rem !important;
  }
  #live-letters-input, #live-digits-input {
    font-size: 0.95rem !important;
  }
}

@media (max-width: 480px) {
  /* Marketplace Grid: 2 Columns Side-by-Side on Mobile */
  .plates-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }
  .plate-card {
    padding: 0.85rem 0.55rem !important;
    border-radius: 14px !important;
  }
  .plate-card-preview {
    min-height: 95px !important;
    margin: 0.35rem 0 !important;
    overflow: visible !important; /* Prevent WebKit from pre-clipping the unscaled plate shape */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
  }
  .plate-card .license-plate {
    transform: scale(0.48) !important;
    transform-origin: center center !important;
    margin: 0 auto !important;
  }
  .plate-card .license-plate.format-long {
    transform: scale(0.32) !important;
    transform-origin: center center !important;
    margin: 0 auto !important;
  }
  /* Compact card typography for 2-column layout */
  .plate-card h4, .plate-card .plate-city-header {
    font-size: 0.82rem !important;
  }
  .plate-price-val {
    font-size: 0.92rem !important;
  }
  .plate-card .btn {
    font-size: 0.75rem !important;
    padding: 0.45rem 0.5rem !important;
    border-radius: 8px !important;
  }
  .plate-card-details {
    padding-top: 0.5rem !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
  }

  .glass-card {
    padding: 1rem !important;
    border-radius: 16px !important;
  }
  .preview-container {
    padding: 0.75rem !important;
    min-height: 120px !important;
  }

  /* Interactive Builder Preview Scaling */
  #preview-area {
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 130px !important;
  }
  #preview-area .license-plate {
    transform: scale(0.66) !important;
    transform-origin: center center !important;
  }
  #preview-area .license-plate.format-long {
    transform: scale(0.44) !important;
    transform-origin: center center !important;
  }

  /* VIP Ticker Carousel Mobile Scaling */
  .vip-ticker-card {
    min-width: 255px !important;
    flex: 0 0 255px !important;
    padding: 0.85rem !important;
    scroll-snap-align: center !important;
  }
  .vip-ticker-card .plate-card-preview {
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 75px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .vip-ticker-card .plate-card-preview .license-plate {
    transform: scale(0.66) !important;
    transform-origin: center center !important;
    margin: 0 auto !important;
  }
  .vip-ticker-card .plate-card-preview .license-plate.format-long {
    transform: scale(0.44) !important;
    transform-origin: center center !important;
    margin: 0 auto !important;
  }

  /* Compact builder controls & form inputs on mobile */
  .builder-controls, .builder-controls-grid {
    gap: 0.65rem !important;
  }
  .form-input, .filter-select, select.form-input {
    padding: 0.6rem 0.8rem !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
  }
  .control-label, .form-label {
    font-size: 0.8rem !important;
    margin-bottom: 0.35rem !important;
  }
  .control-group {
    margin-bottom: 0.5rem !important;
  }
  .sell-preview-box {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    padding: 1rem !important;
    min-height: 140px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .sell-preview-box #list-preview-area .license-plate {
    transform: scale(0.66) !important;
    transform-origin: center center !important;
  }
  .sell-preview-box #list-preview-area .license-plate.format-long {
    transform: scale(0.44) !important;
    transform-origin: center center !important;
  }
}

@media (max-width: 380px) {
  /* Extra Small Screens (iPhone SE / narrow devices) */
  .plate-card-preview {
    min-height: 85px !important;
    overflow: visible !important; /* Allow layout scale without WebKit pre-clipping on small screens */
  }
  .plate-card .license-plate {
    transform: scale(0.43) !important;
    transform-origin: center center !important;
    margin: 2px auto !important;
  }
  .plate-card .license-plate.format-long {
    transform: scale(0.29) !important;
    transform-origin: center center !important;
    margin: 2px auto !important;
  }
  #preview-area .license-plate {
    transform: scale(0.58) !important;
  }
  #preview-area .license-plate.format-long {
    transform: scale(0.38) !important;
  }
  .vip-ticker-card {
    min-width: 235px !important;
    flex: 0 0 235px !important;
  }
  .vip-ticker-card .plate-card-preview .license-plate {
    transform: scale(0.58) !important;
  }
  .vip-ticker-card .plate-card-preview .license-plate.format-long {
    transform: scale(0.38) !important;
  }
  .sell-preview-box #list-preview-area .license-plate {
    transform: scale(0.58) !important;
  }
  .sell-preview-box #list-preview-area .license-plate.format-long {
    transform: scale(0.38) !important;
  }
}

/* ==========================================================================
   TIKTOK LIVE STREAMING MODE STYLES
   ========================================================================== */

body.live-mode-active {
  background: #050505 !important;
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  overscroll-behavior: none !important;
  touch-action: pan-y !important;
}

body.live-mode-active header,
body.live-mode-active #pwa-install-banner,
body.live-mode-active main > *:not(#tiktok-live-layout),
body.live-mode-active section:not(#tiktok-live-layout),
body.live-mode-active footer,
body.live-mode-active .vip-ticker-section,
body.live-mode-active .container > *:not(#tiktok-live-layout) {
  display: none !important;
}

#tiktok-live-layout {
  display: none;
  width: 100% !important;
  max-width: 100vw !important;
  height: 100vh;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.2) 0%, rgba(15, 23, 42, 0.95) 55%, #050505 100%) !important;
  color: #ffffff !important;
  font-family: 'Cairo', sans-serif;
  box-sizing: border-box !important;
  padding: 12px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-x: none !important;
  touch-action: pan-y !important;
}

body.live-mode-active #tiktok-live-layout {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start !important;
  align-items: center;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px;
}

body.live-mode-active #tiktok-live-layout * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Chroma Key Green Background option */
body.live-mode-active.chroma-bg-active {
  background: #00ff00 !important;
}
body.live-mode-active.chroma-bg-active #tiktok-live-layout {
  background: #00ff00 !important;
  color: #000000 !important;
}
body.live-mode-active.chroma-bg-active .bg-glow,
body.live-mode-active.chroma-bg-active .bg-glow-2 {
  display: none !important;
}

/* Stream Layout Components */
.live-stream-header {
  width: 100%;
  max-width: 540px;
  text-align: center;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
body.live-mode-active.chroma-bg-active .live-stream-header {
  background: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.2);
  color: #000;
}

.live-stream-main-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 6px;
  overflow-y: auto !important;
  margin: 2px 0;
  padding-right: 2px;
}

.live-plate-presentation {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  flex-shrink: 0;
}

/* Big scaled plate specifically for live streams */
.live-plate-presentation .license-plate {
  transform-origin: center center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

/* DESKTOP SPLIT-SCREEN BROADCAST STUDIO MODE (For PC / Wide Screens >= 1024px) */
@media (min-width: 1024px) {
  body.live-mode-active #tiktok-live-layout {
    display: grid !important;
    grid-template-columns: minmax(520px, 1.3fr) minmax(420px, 1fr) !important;
    grid-template-rows: auto 1fr auto !important;
    column-gap: 24px !important;
    row-gap: 16px !important;
    padding: 16px 32px !important;
    align-items: start !important;
    max-width: 100% !important;
  }

  /* Header spans full width across top */
  body.live-mode-active #tiktok-live-layout .live-stream-header {
    grid-column: 1 / -1 !important;
    max-width: 100% !important;
    margin-bottom: 4px !important;
  }

  /* Main Stage Column (Right side of wide screen in RTL: Plate + Auction Box + CTA) */
  body.live-mode-active #tiktok-live-layout .live-stream-main-content {
    display: contents !important;
  }

  body.live-mode-active #tiktok-live-layout #live-showcase-sticky-top {
    grid-column: 1 / 2 !important;
    grid-row: 2 / 4 !important;
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: 20px !important;
    border: 2px solid #10B981 !important;
    padding: 20px !important;
    overflow-y: auto !important;
  }

  body.live-mode-active #tiktok-live-layout #live-plate-render-target {
    transform: scale(0.95) !important;
  }

  /* Queue & Registration Column (Left side of wide screen in RTL: على يسار المزاد) */
  body.live-mode-active #tiktok-live-layout .live-stream-split-row {
    grid-column: 2 / 3 !important;
    grid-row: 2 / 3 !important;
    max-width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  body.live-mode-active #tiktok-live-layout .live-stream-split-row .live-queue-container,
  body.live-mode-active #tiktok-live-layout .live-stream-split-row .live-customer-cta,
  body.live-mode-active #tiktok-live-layout .live-stream-split-row .live-app-qr-card {
    max-width: 100% !important;
  }

  /* Host Control Bar placed on the left side below the queue (على يسار المزاد) */
  body.live-mode-active #tiktok-live-layout .live-host-footer-controls {
    grid-column: 2 / 3 !important;
    grid-row: 3 / 4 !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    padding: 14px 18px !important;
    border-radius: 16px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1.5px solid var(--accent-gold) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6) !important;
  }
  
  body.live-mode-active #tiktok-live-layout #host-controls-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  body.live-mode-active #tiktok-live-layout #host-controls-row .live-control-buttons-row {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
  }
}

.live-plate-presentation {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  position: relative !important;
  padding: 8px 0 !important;
  box-sizing: border-box !important;
}

/* Default Short Plate Scale in Live */
.live-plate-presentation .license-plate.format-short {
  transform: scale(1.08) !important;
  transform-origin: center center !important;
  margin: 14px auto !important;
}

/* Default Long Plate Scale in Live (smaller to prevent overflow) */
.live-plate-presentation .license-plate.format-long {
  transform: scale(0.68) !important;
  transform-origin: center center !important;
  margin: 4px auto !important;
}

@media (max-width: 480px) {
  .live-plate-presentation .license-plate.format-short {
    transform: scale(0.92) !important;
    transform-origin: center center !important;
    margin: 8px auto !important;
  }
  .live-plate-presentation .license-plate.format-long {
    transform: scale(0.60) !important;
    transform-origin: center center !important;
    margin: -10px auto !important;
  }
}

@media (max-width: 380px) {
  .live-plate-presentation .license-plate.format-short {
    transform: scale(0.82) !important;
  }
  .live-plate-presentation .license-plate.format-long {
    transform: scale(0.52) !important;
  }
}

body.live-mode-active.chroma-bg-active .live-plate-presentation .license-plate {
  box-shadow: none !important;
}

.live-queue-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  box-sizing: border-box;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  color: #ffffff;
}
body.live-mode-active.chroma-bg-active .live-queue-container {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.3);
  color: #000;
}

.live-queue-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
  color: #ffffff;
}
body.live-mode-active.chroma-bg-active .live-queue-title {
  border-color: rgba(0,0,0,0.2);
}

.live-queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.live-queue-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  color: #ffffff;
  margin-bottom: 12px;
}
body.live-mode-active.chroma-bg-active .live-queue-item {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.15);
}

.live-queue-item.active-request {
  background: rgba(14, 161, 117, 0.18);
  border: 1.5px solid var(--accent-green);
  box-shadow: 0 0 18px rgba(14, 161, 117, 0.4);
  font-weight: bold;
  animation: livePulse 2s infinite ease-in-out;
}
body.live-mode-active.chroma-bg-active .live-queue-item.active-request {
  background: rgba(14, 161, 117, 0.3);
  box-shadow: none;
  animation: none;
}

@keyframes livePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 0 16px rgba(14, 161, 117, 0.5); }
  100% { transform: scale(1); }
}

.live-queue-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-queue-item-badge {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}
.live-queue-item.active-request .live-queue-item-badge {
  background: var(--accent-green);
  color: #fff;
}

.live-host-footer-controls {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 10px;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  color: #ffffff;
  flex-shrink: 0;
  margin-top: 2px;
}
body.live-mode-active.chroma-bg-active .live-host-footer-controls {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.3);
  color: #000;
}

.live-control-buttons-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.live-control-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.live-control-btn.btn-open {
  background: var(--accent-green);
  color: #fff;
}
.live-control-btn.btn-close {
  background: #ef4444;
  color: #fff;
}
.live-control-btn.btn-next {
  background: var(--accent-gold);
  color: #000;
}
.live-control-btn.btn-secondary-live {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
body.live-mode-active.chroma-bg-active .live-control-btn.btn-secondary-live {
  background: rgba(0,0,0,0.1);
  color: #000;
  border-color: rgba(0,0,0,0.3);
}

.live-control-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* User Live Registration Widget */
.live-viewer-card {
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(14, 161, 117, 0.05) 0%, rgba(0, 0, 0, 0.4) 100%);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.live-viewer-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.status-indicator-open {
  background: rgba(14, 161, 117, 0.15);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}
.status-indicator-closed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.live-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-indicator-open .live-indicator-dot {
  animation: dotPulse 1.5s infinite ease-in-out;
}

@keyframes dotPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* Real-time Auction Box in Live Stream */
.live-auction-container {
  width: 100%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(10, 10, 10, 0.8) 100%);
  border-radius: 18px;
  border: 1.5px solid var(--accent-gold);
  padding: 16px;
  box-sizing: border-box;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
  transition: all 0.3s ease;
  margin-bottom: 12px;
}
body.live-mode-active.chroma-bg-active .live-auction-container {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #000 !important;
  box-shadow: none !important;
  color: #000 !important;
}

.live-auction-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.live-auction-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1.5px solid #ef4444;
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  animation: dotPulseLive 1.5s infinite ease-in-out;
}
body.live-mode-active.chroma-bg-active .live-auction-badge {
  border-color: #ef4444 !important;
  animation: none !important;
}

@keyframes dotPulseLive {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.live-auction-plate-info {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--accent-gold);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
body.live-mode-active.chroma-bg-active .live-auction-plate-info {
  color: #000 !important;
}

.live-auction-price-section {
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease-in-out;
}
body.live-mode-active.chroma-bg-active .live-auction-price-section {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}

/* Pulsing effect when a new bid arrives */
.live-auction-price-section.gold-flash-active {
  animation: goldFlash 0.8s ease-out;
}

@keyframes goldFlash {
  0% { background: rgba(212, 175, 55, 0); box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
  30% { background: rgba(212, 175, 55, 0.45); box-shadow: 0 0 25px var(--accent-gold); }
  100% { background: rgba(255, 255, 255, 0.03); box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
}

.live-auction-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  margin: 4px 0;
}
body.live-mode-active.chroma-bg-active .live-auction-price {
  color: #000 !important;
  text-shadow: none !important;
}

.live-auction-bidder {
  font-size: 0.85rem;
  color: var(--accent-green);
  font-weight: bold;
}
body.live-mode-active.chroma-bg-active .live-auction-bidder {
  color: #15803d !important;
}

.live-auction-recent-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 4px;
}
body.live-mode-active.chroma-bg-active .live-auction-recent-title {
  color: #333 !important;
  border-color: rgba(0,0,0,0.1) !important;
}

.live-auction-recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.live-auction-recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}
body.live-mode-active.chroma-bg-active .live-auction-recent-item {
  background: rgba(0,0,0,0.03) !important;
  border-color: rgba(0,0,0,0.08) !important;
}

/* ================================================================
   SCROLL TO TOP BUTTON
   ================================================================ */
#scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--accent-brand), #0ea175);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(11, 76, 56, 0.4);
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

body.lang-en #scroll-top-btn {
  left: auto;
  right: 2rem;
}

#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#scroll-top-btn:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 30px rgba(11, 76, 56, 0.5);
}

#scroll-top-btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(14, 161, 117, 0.5);
  animation: ping-ring 2s ease-out infinite;
}

@keyframes ping-ring {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ================================================================
   ENHANCED PLATE CARD TOP ACCENT LINE
   ================================================================ */
.plate-card {
  position: relative;
  overflow: hidden;
}

.plate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s ease;
  border-radius: 18px 18px 0 0;
}

.plate-card:hover::before {
  transform: scaleX(1);
}

/* Premium card persistent gold accent */
.plate-card.premium::before {
  transform: scaleX(1);
  background: linear-gradient(90deg, transparent, #f4d03f, var(--accent-gold), #f4d03f, transparent);
  background-size: 300%;
  animation: gold-sweep 3s linear infinite;
}

@keyframes gold-sweep {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ================================================================
   STATS STRIP POP ANIMATION
   ================================================================ */
@keyframes stat-pop {
  0%  { transform: scale(1); }
  50% { transform: scale(1.15); color: #22c55e; }
  100%{ transform: scale(1); }
}

.stat-updated {
  animation: stat-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================================
   RESPONSIVE STATS STRIP — Horizontal Scroll on Mobile
   ================================================================ */
@media (max-width: 900px) {
  #market-stats-strip {
    gap: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none !important;
  }
  #market-stats-strip::-webkit-scrollbar {
    display: none;
  }
}

/* ==========================================================================
   WORLD-CLASS 4-ICON PORTAL DASHBOARD SYSTEM (نظام البوابة والأيقونات الأربعة)
   ========================================================================== */
.portal-icons-section {
  margin-bottom: 2rem;
}

.portal-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.portal-icon-card {
  background: #FFFFFF;
  border: 1.5px solid rgba(5, 150, 105, 0.18);
  border-radius: 20px;
  padding: 1.6rem 1.35rem;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.portal-icon-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10B981, #047857, #10B981);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s ease;
}

.portal-icon-card:hover {
  transform: translateY(-5px);
  border-color: #059669;
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.15), 0 3px 8px rgba(0, 0, 0, 0.03);
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
}

.portal-icon-card:hover::before {
  transform: scaleX(1);
}

/* Active Portal Card Glow & Border */
.portal-icon-card.active-portal {
  border: 2px solid #047857;
  background: linear-gradient(180deg, #FFFFFF 0%, #ECFDF5 100%);
  box-shadow: 0 8px 30px rgba(5, 150, 105, 0.22), inset 0 0 16px rgba(5, 150, 105, 0.05);
  transform: translateY(-3px);
}

.portal-icon-card.active-portal::before {
  transform: scaleX(1);
  background: linear-gradient(90deg, #34D399, #047857, #34D399);
}

.portal-card-text {
  flex: 1;
}

.portal-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #064E3B;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  transition: color 0.2s;
}

.portal-icon-card:hover .portal-title,
.portal-icon-card.active-portal .portal-title {
  color: #047857;
}

.portal-desc {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
  font-weight: 600;
}

.portal-active-indicator {
  margin-top: 1.25rem;
  padding: 0.4rem 0.85rem;
  background: #ECFDF5;
  border: 1.5px solid #059669;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #047857;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.portal-icon-card.active-portal .portal-active-indicator {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   LIVE MODE LAUNCHER BANNER IN PORTAL 1
   ========================================================================== */
.live-mode-launcher-banner {
  background: #FFFFFF;
  border: 1.5px solid rgba(5, 150, 105, 0.3);
  border-radius: 20px;
  padding: 1.35rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(5, 150, 105, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-mode-launcher-banner:hover {
  transform: translateY(-3px);
  border-color: #059669;
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.16);
}

.launcher-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.launcher-icon {
  width: 54px; height: 54px;
  background: #ECFDF5;
  border: 1.5px solid #059669;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #047857;
  flex-shrink: 0;
  animation: pulse-dot 1.5s infinite;
}

.btn-live-enter {
  background: linear-gradient(135deg, #059669, #047857);
  color: #FFFFFF;
  border: none;
  padding: 0.8rem 1.6rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.25);
  transition: transform 0.2s, background 0.2s;
}

.btn-live-enter:hover {
  background: linear-gradient(135deg, #10B981, #059669);
  transform: scale(1.04);
}

/* ==========================================================================
   PORTAL RESPONSIVE CALIBRATION (دقة الأبعاد وحجم اللوحات لجميع الشاشات)
   ========================================================================== */
@media (max-width: 1024px) {
  .portal-icons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .portal-icons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .portal-icon-card {
    padding: 1.2rem 0.95rem;
    border-radius: 16px;
  }
  .portal-title {
    font-size: 0.96rem;
    margin-bottom: 0.25rem;
  }
  .portal-desc {
    font-size: 0.74rem;
    line-height: 1.45;
  }
  .portal-active-indicator {
    margin-top: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.68rem;
  }
  .live-mode-launcher-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.1rem;
    gap: 1rem;
  }
  .launcher-left {
    flex-direction: column;
    gap: 0.75rem;
  }
  .btn-live-enter {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .portal-icons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }
  .portal-icon-card {
    padding: 0.9rem 0.7rem;
  }
  .portal-icon-circle {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }
  .portal-title {
    font-size: 0.88rem;
  }
  .portal-desc {
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   TIKTOK LIVE CHAT & FLOATING REACTIONS ANIMATIONS (POINT 6)
   ========================================================================== */
@keyframes floatUpReaction {
  0% { transform: translateY(0) scale(0.6); opacity: 1; }
  50% { transform: translateY(-110px) scale(1.15) rotate(10deg); opacity: 0.95; }
  100% { transform: translateY(-220px) scale(1.3) rotate(-15deg); opacity: 0; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.45; }
}

/* ==========================================================================
   LIVE TV VIP APP QR & DOWNLOAD OVERLAYS (SLEEK AESTHETIC)
   ========================================================================== */
@keyframes qrGlowPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(251, 191, 36, 0.4), 0 0 30px rgba(16, 185, 129, 0.3); border-color: #FBBF24; }
  50% { box-shadow: 0 0 25px rgba(251, 191, 36, 0.8), 0 0 45px rgba(16, 185, 129, 0.6); border-color: #34D399; }
}

@keyframes cardFloatPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Top Floating Pill Banner inside Live Showcase Sticky Header */
.live-app-qr-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(212, 175, 55, 0.25));
  border: 1.5px solid #34D399;
  border-radius: 12px;
  padding: 6px 12px;
  margin: 4px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  animation: qrGlowPulse 3s infinite ease-in-out;
}
.live-app-qr-banner:hover {
  transform: scale(1.02);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(212, 175, 55, 0.4));
}
.live-app-qr-banner .banner-text {
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-app-qr-banner .banner-cta {
  background: #FBBF24;
  color: #000;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
}

/* Inline VIP App QR & Download Card in Split Grid */
.live-app-qr-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(8, 14, 26, 0.98));
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), inset 0 0 15px rgba(251, 191, 36, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.live-app-qr-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.live-app-qr-card .qr-image-wrapper {
  background: #ffffff;
  padding: 6px;
  border-radius: 12px;
  border: 2px solid #FBBF24;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}
.live-app-qr-card .qr-image-wrapper:hover {
  transform: scale(1.08) rotate(-1deg);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.7);
}
.live-app-qr-card img.qr-img {
  width: 105px;
  height: 105px;
  display: block;
  border-radius: 6px;
  object-fit: contain;
}
.live-app-qr-card .qr-title {
  font-size: 0.86rem;
  font-weight: 900;
  color: #FBBF24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
  line-height: 1.3;
}
.live-app-qr-card .qr-subtext {
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.3;
}
.live-app-qr-card .store-buttons {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
}
.live-app-qr-card .btn-store {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 5px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.live-app-qr-card .btn-store:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #34D399;
  transform: translateY(-1px);
}
.live-app-qr-card .btn-install-direct {
  width: 100%;
  background: linear-gradient(135deg, #FBBF24, #d97706);
  color: #000;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
  transition: all 0.2s;
}
.live-app-qr-card .btn-install-direct:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.6);
}

/* Persistent Side / Corner Floating Live TV QR Widget & Center Modal */
.live-qr-spotlight-modal {
  position: fixed;
  top: 88px;
  left: 12px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: fadeIn 0.3s ease-out;
}
.live-qr-spotlight-modal.pos-right {
  left: auto;
  right: 12px;
}
.live-qr-spotlight-modal.center-mode {
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.94) 0%, rgba(3, 7, 18, 0.98) 100%);
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(12px);
}
.live-qr-spotlight-content {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(8, 14, 26, 0.98));
  border: 2px solid #FBBF24;
  border-radius: 16px;
  padding: 10px;
  width: 156px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.8), 0 0 25px rgba(251, 191, 36, 0.35);
  position: relative;
  animation: cardFloatPulse 4s infinite ease-in-out;
}
.live-qr-spotlight-modal.center-mode .live-qr-spotlight-content {
  max-width: 420px;
  width: 90%;
  padding: 28px 24px;
  border-width: 3px;
  border-radius: 28px;
}
.live-qr-spotlight-content h3 {
  font-size: 0.8rem;
  font-weight: 900;
  color: #FBBF24;
  margin: 0 0 6px;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
  line-height: 1.3;
}
.live-qr-spotlight-modal.center-mode .live-qr-spotlight-content h3 {
  font-size: 1.4rem;
  margin: 0 0 8px;
}
.live-qr-spotlight-content p {
  display: none;
}
.live-qr-spotlight-modal.center-mode .live-qr-spotlight-content p {
  display: block;
  font-size: 0.95rem;
  color: #e2e8f0;
  margin: 0 0 18px;
  line-height: 1.5;
  font-weight: 700;
}
.live-qr-spotlight-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 12px;
  display: inline-block;
  border: 2px solid #10B981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  margin-bottom: 8px;
  cursor: pointer;
}
.live-qr-spotlight-modal.center-mode .live-qr-spotlight-box {
  padding: 14px;
  border-radius: 20px;
  border-width: 3px;
  margin-bottom: 20px;
}
.live-qr-spotlight-box img {
  width: 118px;
  height: 118px;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}
.live-qr-spotlight-modal.center-mode .live-qr-spotlight-box img {
  width: 210px;
  height: 210px;
  border-radius: 10px;
}
.live-qr-side-actions {
  display: flex;
  gap: 4px;
  width: 100%;
  justify-content: space-between;
  margin-top: 4px;
}
.live-qr-side-btn {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 5px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.live-qr-side-btn:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: #FBBF24;
}
.live-qr-spotlight-close-btn {
  background: #ef4444;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid #f87171;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  transition: all 0.2s;
}
.live-qr-spotlight-close-btn:hover {
  transform: scale(1.05);
  background: #dc2626;
}


