/* ==========================================================================
   PLATINUM WHEELS — LUXURY ANIMATED QR CODE PAGE STYLE
   ========================================================================== */

:root {
  --platinum: #E5E4E2;
  --platinum-dark: #C0C0C0;
  --platinum-light: #F0EFED;
  --accent: #4A90D9;
  --accent-light: #6AABF0;
  --accent-glow: rgba(74, 144, 217, 0.35);
  --dark-bg: #050508;
  --dark-card: rgba(18, 18, 26, 0.65);
  --glass-border: rgba(229, 228, 226, 0.08);
  --glass-border-glow: rgba(74, 144, 217, 0.2);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--dark-bg);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   MOVING BACKGROUND & GLOWS
   ========================================================================== */
.scene-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

/* Canvas for JS particles */
#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* CSS Animated Ambient Lights */
.ambient-glows {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  animation: driftGlow 20s ease-in-out infinite alternate;
}

.glow-sphere-1 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-duration: 25s;
}

.glow-sphere-2 {
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--platinum-dark) 0%, transparent 70%);
  bottom: -20%;
  right: -10%;
  animation-duration: 30s;
  animation-delay: -5s;
}

.glow-sphere-3 {
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, #D4A843 0%, transparent 70%);
  top: 40%;
  left: 30%;
  opacity: 0.05;
  animation-duration: 18s;
}

@keyframes driftGlow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 10%) scale(1.1); }
  100% { transform: translate(-5%, -5%) scale(0.95); }
}

/* Subtle carbon diagonal grid */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(45deg, rgba(255,255,255,0.002) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.002) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.002) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.002) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.4;
  z-index: -2;
}

/* ==========================================================================
   CENTRAL POSTER CARD
   ========================================================================== */
.card-perspective {
  perspective: 1000px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  width: 100%;
  max-width: 500px;
}

.poster-card {
  position: relative;
  width: 100%;
  background: var(--dark-card);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1.5px solid var(--glass-border);
  border-radius: 32px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(74, 144, 217, 0.04);
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.poster-card::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(229, 228, 226, 0.25) 0%, rgba(74, 144, 217, 0.1) 40%, transparent 60%, rgba(229, 228, 226, 0.15) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.poster-card:hover {
  border-color: rgba(74, 144, 217, 0.35);
  box-shadow: 
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 0 100px rgba(74, 144, 217, 0.18);
}

/* Back Link Button */
.back-btn {
  position: absolute;
  top: 32px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(229, 228, 226, 0.4);
  z-index: 20;
  transition: var(--transition-smooth);
  border: 1px solid rgba(229, 228, 226, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(18, 18, 26, 0.3);
}

.back-btn:hover {
  color: var(--platinum);
  border-color: var(--accent);
  background: rgba(74, 144, 217, 0.1);
  transform: translateX(-4px);
}

.back-btn svg {
  width: 14px;
  height: 14px;
}

/* Brand Header */
.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  transform: translateZ(40px);
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid rgba(229, 228, 226, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
}

.poster-card:hover .brand-logo {
  border-color: var(--accent);
  transform: scale(1.05) translateZ(10px);
  box-shadow: 0 12px 32px rgba(74, 144, 217, 0.25);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--platinum);
}

.brand-title span {
  color: var(--accent);
}

/* Slogan Block */
.slogan-block {
  margin-bottom: 36px;
  transform: translateZ(50px);
}

.scan-me {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 8px;
  display: block;
  animation: shineScan 3s linear infinite;
  background: linear-gradient(90deg, var(--accent-light) 0%, #fff 50%, var(--accent-light) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes shineScan {
  to { background-position: 200% center; }
}

.get-my-car {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--platinum);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   QR CODE DISPLAY & LASER SCANNER
   ========================================================================== */
.qr-outer-frame {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 0 auto 36px;
  background: rgba(10, 10, 15, 0.8);
  border: 1.5px solid rgba(229, 228, 226, 0.1);
  border-radius: 24px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.8);
  transform: translateZ(60px);
  transition: var(--transition-smooth);
}

.poster-card:hover .qr-outer-frame {
  border-color: rgba(74, 144, 217, 0.4);
  box-shadow: 
    inset 0 4px 20px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(74, 144, 217, 0.15);
}

/* Branded Corner Accents */
.qr-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--accent);
  border-style: solid;
  pointer-events: none;
}

.qr-corner-tl { top: -2px; left: -2px; border-width: 2px 0 0 2px; border-top-left-radius: 8px; }
.qr-corner-tr { top: -2px; right: -2px; border-width: 2px 2px 0 0; border-top-right-radius: 8px; }
.qr-corner-bl { bottom: -2px; left: -2px; border-width: 0 0 2px 2px; border-bottom-left-radius: 8px; }
.qr-corner-br { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; border-bottom-right-radius: 8px; }

.qr-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #FFF;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.poster-card:hover .qr-image {
  transform: scale(1.02);
}

/* Pulsing Laser Scan Line */
.scanner-laser {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, transparent, var(--accent-light) 15%, #FFF 50%, var(--accent-light) 85%, transparent);
  box-shadow: 0 0 15px var(--accent), 0 0 5px #FFF;
  z-index: 10;
  opacity: 0.85;
  animation: scanMotion 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scanMotion {
  0%, 100% {
    top: 5%;
  }
  50% {
    top: 95%;
  }
}

/* ==========================================================================
   CARD FOOTER INFO
   ========================================================================== */
.card-info {
  transform: translateZ(40px);
}

.url-display {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.poster-card:hover .url-display {
  color: var(--accent-light);
}

.location-display {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--dark-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  animation: pulseLoader 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(74, 144, 217, 0.3));
}

.preloader-spinner {
  width: 100px;
  height: 100px;
  position: absolute;
  border: 2px solid transparent;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--platinum-dark);
  border-radius: 50%;
  animation: spinLoader 1.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.preloader-text {
  margin-top: 28px;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(229, 228, 226, 0.4);
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes pulseLoader {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes spinLoader {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 480px) {
  .poster-card {
    padding: 32px 24px;
    border-radius: 28px;
  }
  .get-my-car {
    font-size: 32px;
  }
  .qr-outer-frame {
    width: 220px;
    height: 220px;
  }
  .back-btn {
    top: 16px;
    left: 16px;
    font-size: 10px;
    padding: 6px 12px;
  }
}
