:root {
  --primary: #4ECDC4;
  --bg: #000a18;
  --text: #88aacc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { overflow: hidden; background: #000; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

[hidden] { display: none !important; }

#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  padding: 0 32px; text-align: center;
}
#splash-logo img { max-width: 140px; max-height: 80px; object-fit: contain; }
#splash h1 { color: var(--primary); font-size: 26px; }
#splash p  { color: var(--text); font-size: 14px; line-height: 1.5; }
#splash button {
  background: var(--primary); color: #000; font-size: 18px;
  font-weight: bold; padding: 18px 40px;
  border: none; border-radius: 12px; cursor: pointer;
}
#splash button:disabled { opacity: 0.5; }
#splash-note { font-size: 12px; opacity: 0.7; }

#scan-guide {
  position: fixed; bottom: 88px;
  left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.72); color: #fff;
  padding: 14px 18px; border-radius: 16px;
  z-index: 100; text-align: center;
  border: 1px solid var(--primary);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-width: 78vw;
}
#scan-thumb {
  max-width: 110px; max-height: 150px;
  border-radius: 6px; border: 1px solid rgba(255,255,255,0.35);
}
#hint { font-size: 14px; margin: 0; }
#fallback3d {
  background: none; border: 1px solid var(--primary);
  color: var(--primary); font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 18px; cursor: pointer;
}
#fallback3d.pulse { animation: pulse3d 1.2s ease-in-out infinite; }
@keyframes pulse3d {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); transform: scale(1); }
  50% { box-shadow: 0 0 14px 2px var(--primary); transform: scale(1.05); }
}

#cta-bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 100;
  max-width: 100vw; padding: 0 12px;
}
#cta-bar a {
  background: var(--primary); color: #000;
  font-size: 14px; font-weight: 600; text-decoration: none;
  padding: 12px 18px; border-radius: 24px;
  white-space: nowrap; box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

#error-panel {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  padding: 0 32px; text-align: center;
}
#error-panel h2 { color: #ff6b6b; font-size: 20px; }
#error-panel p { color: var(--text); font-size: 14px; line-height: 1.6; }
#error-panel button {
  background: var(--primary); color: #000; font-size: 16px;
  font-weight: bold; padding: 14px 32px;
  border: none; border-radius: 12px; cursor: pointer;
}
#error-panel button.secondary {
  background: none; border: 1px solid var(--primary); color: var(--primary);
}
