:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-gradient: radial-gradient(circle at center, #1e1b4b 0%, #090514 100%);
  --accent-color: #8b5cf6;
  --accent-hover: #7c3aed;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --glass-bg: rgba(15, 10, 28, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  background-color: #05030a;
}

/* Base style for screen overlays */
.screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
  background: var(--bg-gradient);
}

.screen-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Glassmorphic Landing Card */
.glass-card {
  width: 90%;
  max-width: 440px;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 48px 32px;
  box-shadow: var(--glass-shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: var(--text-main);
  background: linear-gradient(135deg, #f8fafc 30%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 32px 0;
}

/* Pulsing Button */
.glow-button {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  border-radius: 16px;
  padding: 16px 36px;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.glow-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(139, 92, 246, 0.5);
}

.glow-button:hover::before {
  opacity: 1;
}

.glow-button span, .glow-button svg {
  position: relative;
  z-index: 2;
}

.glow-button svg {
  width: 20px;
  height: 20px;
}

.instructions-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  width: 100%;
}

.instructions-footer p {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

/* Loader Screen styles */
.loader-content {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  position: relative;
  margin: 0 auto 20px auto;
}

.double-bounce1, .double-bounce2 {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--accent-color);
  opacity: 0.6;
  position: absolute;
  top: 0;
  left: 0;
  animation: bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
  animation-delay: -1.0s;
  background-color: #6366f1;
}

@keyframes bounce {
  0%, 100% { 
    transform: scale(0.0);
  } 50% { 
    transform: scale(1.0);
  }
}

/* AR Container (covers whole screen behind UI) */
#ar-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Custom Scanner Reticle Overlay */
#scanner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.3s ease;
}

#scanner-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Frame outline centered - Responsive sizing for mobile layout */
.scanner-frame {
  width: 75vw;
  max-width: 320px;
  height: calc(75vw / 1.7);
  max-height: calc(320px / 1.7);
  position: relative;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55); /* Darkens region outside scanner */
  border-radius: 16px;
  transition: all 0.3s ease;
}

/* Futuristic Center Reticle Dot */
.scanner-frame::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: spinReticle 15s linear infinite;
}

@keyframes spinReticle {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Corners of scanning frame with Pulse effect */
.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 4px solid var(--accent-color);
  animation: corner-pulse 1.5s infinite alternate ease-in-out;
}

@keyframes corner-pulse {
  0% { opacity: 0.5; border-color: rgba(139, 92, 246, 0.5); }
  100% { opacity: 1; border-color: var(--accent-color); }
}

.top-left {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 12px;
}

.top-right {
  top: -2px;
  right: -2px;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 12px;
}

.bottom-left {
  bottom: -2px;
  left: -2px;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 12px;
}

.bottom-right {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 12px;
}

/* Moving scan line - Advanced Glow & Fading sweep */
.scan-line {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #818cf8 20%, #6366f1 50%, #818cf8 80%, transparent);
  position: absolute;
  left: 0;
  top: 0;
  box-shadow: 0 0 15px #6366f1, 0 0 30px rgba(99, 102, 241, 0.6);
  animation: scan 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scan {
  0% { top: 0%; opacity: 0.2; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0.2; }
}

.scanner-tip {
  margin-top: 32px;
  background: rgba(15, 10, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 24px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.scanner-tip p {
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 0;
  text-transform: uppercase;
}

/* Brand & Social Media Footer Styling */
.logo-container img {
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.2));
  transition: all 0.3s ease;
}

.logo-container img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4));
}

.social-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  width: 100%;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.social-icon {
  width: 20px;
  height: 20px;
}

/* Social link hover states */
#social-instagram:hover {
  color: #e1306c;
  border-color: rgba(225, 48, 108, 0.4);
  background: rgba(225, 48, 108, 0.08);
  box-shadow: 0 0 15px rgba(225, 48, 108, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

#social-youtube:hover {
  color: #ff0000;
  border-color: rgba(255, 0, 0, 0.4);
  background: rgba(255, 0, 0, 0.08);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

#social-whatsapp:hover {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.4);
  background: rgba(37, 211, 102, 0.08);
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.hidden {
  display: none !important;
}

/* Media Queries for Mobile Screensize Handling */
@media (max-width: 480px) {
  .glass-card {
    padding: 32px 20px;
    border-radius: 24px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  p {
    font-size: 0.88rem;
    margin-bottom: 24px;
  }
  
  .glow-button {
    padding: 14px 28px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .logo-container img {
    max-height: 60px;
  }

  .social-footer {
    gap: 12px;
    padding-top: 15px;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .social-icon {
    width: 18px;
    height: 18px;
  }

  .scanner-tip {
    margin-top: 24px;
    padding: 8px 18px;
  }

  .scanner-tip p {
    font-size: 0.75rem;
  }
}
