/* ==========================================================================
   Grand Opening Ceremony — Vendo Corporate Luxury Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --font-title: 'Poppins', var(--font-sans);

  /* Vendo Corporate Brand Colors */
  --vendo-canvas: #080c14;
  --vendo-surface: rgba(15, 23, 42, 0.88);
  --vendo-border: #1e293b;
  --vendo-border-strong: #334155;
  --vendo-ink: #f1f5f9;
  --vendo-ink-soft: #cbd5e1;
  --vendo-muted: #94a3b8;
  --vendo-muted-soft: #64748b;

  --vendo-cyan: #06b6d4;
  --vendo-cyan-bright: #6adeed;
  --vendo-cyan-bg: rgba(6, 182, 212, 0.12);
  --vendo-teal: #10b981;
  --vendo-teal-soft: #34d399;
  --vendo-coral: #ef4444;
  --vendo-coral-bright: #d8636b;
  --vendo-coral-bg: rgba(239, 68, 68, 0.12);
  --vendo-amber: #f59e0b;
  --vendo-gold: #ffd700;

  --shadow-modal: 0 30px 90px -15px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 40px rgba(6, 182, 212, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--vendo-canvas);
  font-family: var(--font-sans);
  color: var(--vendo-ink);
  cursor: none;
}

/* Three.js Canvas Container */
#webgl-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

/* Ambient Radial Glow */
.gala-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 10%, rgba(6, 182, 212, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 90%, rgba(216, 99, 107, 0.05) 0%, transparent 70%),
    #080c14;
  pointer-events: none;
}

/* Luxury UI Overlay Layer */
.ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 3.5rem 2rem 2.8rem;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.celebrating .ui-overlay {
  opacity: 0;
  pointer-events: none;
}

/* Top Header */
.ceremony-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInDown 1.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.celebrating .ceremony-header {
  opacity: 0;
  transform: translateY(-20px);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(19, 29, 51, 0.85);
  border: 1px solid var(--vendo-border);
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  backdrop-filter: blur(16px);
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.vendo-logo-icon {
  width: 22px;
  height: 20px;
}

.brand-text {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-text span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--vendo-cyan-bright);
}

/* Live Global Cuts Stat Badge */
.live-cuts-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(106, 222, 237, 0.25);
  padding: 0.28rem 0.9rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--vendo-ink-soft);
  margin-bottom: 1.2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.live-cuts-badge strong {
  color: var(--vendo-cyan-bright);
  font-weight: 700;
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vendo-teal-soft);
  box-shadow: 0 0 8px var(--vendo-teal);
  animation: livePulse 2s ease-in-out infinite;
}

.gala-title {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(135deg, #ffffff 30%, var(--vendo-cyan-bright) 70%, var(--vendo-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 40px rgba(6, 182, 212, 0.25);
  margin-bottom: 0.6rem;
}

.gala-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 400;
  color: var(--vendo-muted);
  letter-spacing: 0.01em;
}

/* Call to action Prompt */
.center-prompt {
  pointer-events: none;
  text-align: center;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.cut-indicator {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(19, 29, 51, 0.90);
  padding: 0.75rem 2.0rem;
  border-radius: 9999px;
  border: 1px solid var(--vendo-border-strong);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(6, 182, 212, 0.15);
  backdrop-filter: blur(20px);
  animation: floatPulse 3s ease-in-out infinite;
}

.pulse-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--vendo-coral);
  box-shadow: 0 0 10px var(--vendo-coral), 0 0 20px var(--vendo-coral);
  animation: coralPulse 1.8s ease-in-out infinite;
}

.prompt-text {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vendo-ink);
}

/* Sound Toggle */
.sound-toggle-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  pointer-events: auto;
  cursor: none;
  background: rgba(19, 29, 51, 0.85);
  border: 1px solid var(--vendo-border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vendo-cyan-bright);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  z-index: 100;
}

.sound-toggle-btn:hover {
  background: rgba(19, 29, 51, 1);
  border-color: var(--vendo-cyan-bright);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.35);
  transform: scale(1.06);
}

/* ==========================================================================
   Post-Cut Ultra-Luxury Celebration Modal
   ========================================================================== */

.celebration-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
}

.celebration-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Luxury Announcement Card */
.luxury-launch-modal {
  width: min(540px, 92vw);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(106, 222, 237, 0.35);
  border-radius: 24px;
  box-shadow: var(--shadow-modal);
  padding: 40px 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.celebration-overlay.active .luxury-launch-modal {
  transform: scale(1) translateY(0);
}

/* Top Subtle Shimmer Highlight */
.luxury-launch-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(106, 222, 237, 0.8), rgba(216, 99, 107, 0.6), transparent);
}

/* Glowing Vendo Prism Emblem */
.modal-emblem-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.modal-emblem-halo {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 222, 237, 0.35) 0%, rgba(216, 99, 107, 0.15) 50%, transparent 70%);
  filter: blur(14px);
  animation: haloPulse 3s ease-in-out infinite alternate;
}

.modal-emblem-box {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(19, 29, 51, 0.95);
  border: 1px solid rgba(106, 222, 237, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(106, 222, 237, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Official Grand Opening Tag */
.modal-launch-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(106, 222, 237, 0.3);
  padding: 4px 14px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--vendo-cyan-bright);
  margin-bottom: 14px;
}

.tag-sparkle {
  color: var(--vendo-gold);
  font-size: 10px;
}

/* Hero Typography */
.modal-hero-title {
  font-family: var(--font-title);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 6px;
}

.modal-hero-desc {
  font-size: 13.5px;
  color: var(--vendo-muted);
  line-height: 1.5;
  max-width: 420px;
  margin-bottom: 20px;
}

/* Real-Time User Rank & Statistics Card */
.modal-rank-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(135deg, rgba(19, 29, 51, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(106, 222, 237, 0.35);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 16px rgba(6, 182, 212, 0.08);
  animation: glowPulse 3s ease-in-out infinite alternate;
}

.rank-trophy-badge {
  font-size: 28px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-info-content {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

.rank-headline {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.rank-headline strong {
  color: var(--vendo-cyan-bright);
}

.rank-subtext {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--vendo-muted);
}

.rank-subtext span {
  color: var(--vendo-gold);
  font-weight: 600;
}

/* Progress Countdown */
.modal-countdown-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.modal-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.modal-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--vendo-cyan-bright) 0%, var(--vendo-gold) 60%, var(--vendo-coral-bright) 100%);
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(106, 222, 237, 0.8);
}

.modal-status-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--vendo-cyan-bright);
  letter-spacing: 0.04em;
}

/* Action Primary CTA */
.modal-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #ffffff;
  padding: 13px 36px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: none;
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.45);
  transition: all 0.25s ease;
  width: 100%;
  max-width: 400px;
}

.modal-primary-btn:hover {
  background: linear-gradient(135deg, #0891b2 0%, #0369a1 100%);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.65);
  transform: translateY(-2px);
}

/* Keyframe Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes coralPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.65; }
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

@keyframes haloPulse {
  0% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

@keyframes glowPulse {
  0% { border-color: rgba(106, 222, 237, 0.3); }
  100% { border-color: rgba(255, 215, 0, 0.45); }
}
