/* ============================================================
   LUXURY MINIMALIST DESIGN — Ultra Clean, Ultra Fast
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --surface: #141418;
  --card: rgba(255,255,255,0.95);
  --gold: #d4a853;
  --gold-light: #f0d78c;
  --gold-glow: rgba(212,168,83,0.2);
  --accent: #5b6abf;
  --success: #2ecc71;
  --danger: #e74c3c;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --white: #ffffff;
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.08);
  --r: 14px;
  --r-full: 50px;
  --font: 'Poppins', system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.2);
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

html{scroll-behavior:smooth}
html,body{height:100%;width:100%;overflow-x:hidden}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  background-repeat: no-repeat;
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   STAGE — FULL SCREEN
   ============================================================ */
.stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,15,0.82) 0%,
    rgba(10,10,15,0.55) 45%,
    rgba(10,10,15,0.88) 100%
  );
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* ============================================================
   BUTTONS — CLEAN LUXURY
   ============================================================ */
.button-container {
  position: absolute;
  bottom: 35px;
  display: flex;
  gap: 12px;
  z-index: 10;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 16px;
}

.btn {
  padding: 13px 26px;
  border: none;
  border-radius: var(--r-full);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  color: var(--white);
  letter-spacing: 0.2px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font);
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(0); opacity: 0.9; }

.btn-blue { background: var(--accent); }
.btn-red { background: var(--danger); }
.btn-green { background: var(--success); }
.btn-orange { background: #e67e22; }
.btn-gold { background: linear-gradient(135deg, var(--gold), #b8912e); color: #1a1a2e; }

/* ============================================================
   IMAGES
   ============================================================ */
.main-image {
  width: 82%;
  max-width: 400px;
  height: auto;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,0.06);
}

.stage2-images {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.stage2-images .play-btn-wrapper {
  width: 45%;
  max-width: 240px;
}
.stage2-images img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ============================================================
   PLAY BUTTON
   ============================================================ */
.play-btn-wrapper { position: relative; display: inline-block; }
.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 48px; height: 48px;
  background: rgba(0,0,0,0.45);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.play-btn::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%,-50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid white;
}

/* ============================================================
   PROGRESS BAR — MINIMAL GLASS
   ============================================================ */
.progress-container {
  width: 85%;
  max-width: 480px;
  margin: 12px auto;
  background: var(--glass);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  padding: 3px;
}
.progress-bar {
  height: 8px;
  background: linear-gradient(90deg, var(--gold), var(--success));
  border-radius: 8px;
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 2.5s infinite;
}
@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

.progress-text {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 5px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ============================================================
   LIVE COUNTER — SUBTLE DARK
   ============================================================ */
.live-counter {
  background: var(--surface);
  color: rgba(255,255,255,0.75);
  text-align: center;
  font-weight: 500;
  padding: 7px 0;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.live-counter span#userCount { color: var(--gold); font-weight: 700; }
.blink-dot { animation: blink 1.5s ease-in-out infinite; font-size: 9px; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

/* ============================================================
   COUNTDOWN TIMER
   ============================================================ */
.countdown-timer {
  background: rgba(212,168,83,0.08);
  color: var(--gold);
  text-align: center;
  font-weight: 600;
  padding: 5px 0;
  font-size: 12px;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(212,168,83,0.1);
}
.countdown-timer span { font-weight: 800; font-size: 13px; }

/* ============================================================
   AD HEADER
   ============================================================ */
.ad-header {
  padding: 10px 0;
  position: relative;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}
.ad-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 6px;
  min-height: 250px;
}
@media(min-width:336px){ .ad-header-content{min-height:280px} }

/* ============================================================
   FORM — CLEAN WHITE CARD
   ============================================================ */
.form-container {
  background: var(--card);
  padding: 30px 24px;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 90%;
  text-align: center;
}
.form-container h2 {
  margin-top: 0;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 22px;
  font-size: 1.2em;
}
.form-group { margin-bottom: 18px; text-align: left; }
.form-group label { display: block; margin-bottom: 7px; font-weight: 600; color: var(--text-muted); font-size: 0.88em; }
.form-group select {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.92em;
  background: #fafafa;
  transition: border-color 0.2s;
  font-family: var(--font);
}
.form-group select:focus { border-color: var(--accent); outline: none; }

.radio-group { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.radio-group label {
  background: #f3f4f6;
  padding: 9px 16px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  color: var(--text-muted);
  flex-grow: 1;
  text-align: center;
  font-size: 0.88em;
  border: 1.5px solid transparent;
}
.radio-group input[type="radio"]:checked + label {
  background: var(--accent);
  color: white;
  border-color: transparent;
}
.radio-group input[type="radio"] { display: none; }

/* ============================================================
   CONNECTING CONTENT (STAGE 5)
   ============================================================ */
.connecting-content {
  text-align: center;
  background: var(--card);
  padding: 30px 22px;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 92%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.connecting-text { font-size: 2.2em; font-weight: 700; color: var(--accent); margin-bottom: 20px; letter-spacing: 1px; }
.connecting-images { display: flex; justify-content: center; gap: 14px; margin-bottom: 20px; width: 100%; flex-wrap: wrap; }
.connecting-images .play-btn-wrapper {
  width: 82%; max-width: 280px;
}
.connecting-images img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r);
  border: 2px solid var(--gold);
  box-shadow: 0 4px 16px var(--gold-glow);
  animation: borderPulse 2.5s infinite alternate ease-in-out;
}
@keyframes borderPulse {
  from { border-color: var(--gold); }
  to { border-color: var(--accent); }
}

/* ============================================================
   TOAST — MINIMAL DARK
   ============================================================ */
.toast-notification {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  width: auto;
  max-width: 300px;
  min-width: 200px;
  background: var(--surface);
  color: rgba(255,255,255,0.85);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.05);
}
.toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-icon {
  background: var(--success);
  color: white;
  width: 20px; height: 20px; min-width: 20px;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-size: 10px; font-weight: 800;
}

/* ============================================================
   EXIT MODAL — CLEAN
   ============================================================ */
.exit-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(6px);
}
.exit-modal-content {
  background: white;
  width: 88%;
  max-width: 360px;
  border-radius: var(--r);
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.exit-modal-content h2 { color: var(--danger); margin-top: 0; font-size: 1.4em; font-weight: 800; margin-bottom: 6px; }
.exit-modal-content p { color: var(--text); font-size: 0.95em; line-height: 1.5; margin-bottom: 18px; }

/* ============================================================
   REWARD MODAL
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.65);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: white;
  padding: 26px 22px;
  border-radius: var(--r);
  text-align: center;
  max-width: 320px;
  width: 85%;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.modal .btn { display: none; margin-top: 16px; }
.modal p { font-size: 1em; color: var(--text); margin-bottom: 4px; line-height: 1.5; }

/* ============================================================
   LOADER
   ============================================================ */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}
.loader-overlay.show { visibility: visible; opacity: 1; }
.spinner {
  border: 4px solid rgba(255,255,255,0.08);
  border-top: 4px solid var(--gold);
  border-radius: 50%;
  width: 40px; height: 40px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

/* ============================================================
   ARTICLE SECTION
   ============================================================ */
.article-section {
  padding: 40px 16px;
  background: #f8f9fa;
}
.article-container {
  background: white;
  border-radius: var(--r);
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  color: var(--text);
  max-width: 640px;
  margin: 0 auto;
  padding: 26px 20px;
  text-align: left;
}
.article-container h2 { color: var(--text); font-size: 1.4em; margin-top: 0; line-height: 1.35; font-weight: 700; }
.article-container h3 { color: var(--text); font-size: 1.1em; margin-top: 18px; font-weight: 600; }
.article-container p { font-size: 0.92em; line-height: 1.75; color: var(--text-muted); }
.article-container ul,.article-container ol { padding-left: 18px; color: var(--text-muted); line-height: 1.75; font-size: 0.92em; }
.article-container a { color: var(--accent); font-weight: 600; text-decoration: none; }
.article-container a:hover { text-decoration: underline; }
.article-container table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.88em; }
.article-container th,.article-container td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.article-container th { background: #f8f9fa; font-weight: 600; color: var(--text); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); box-shadow: 0 6px 20px var(--gold-glow); }
}
.btn-pulse { animation: pulse 1.2s ease-in-out infinite alternate; }

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.reward-status { color: var(--success); font-weight: 700; font-size: 1em; margin-top: 8px; }

/* ============================================================
   STAGE 3 FIX
   ============================================================ */
#stage3 .button-container { bottom: 75px; }

/* Call UI compat */
.call-ui-elements{display:flex;align-items:center;gap:20px;margin-top:16px}
.call-timer{font-size:1.3em;color:var(--text-muted);font-weight:500}
.hangup-btn{background:var(--danger);color:white;border:none;border-radius:50%;width:52px;height:52px;font-size:1.6em;display:flex;justify-content:center;align-items:center;cursor:not-allowed;box-shadow:0 4px 16px rgba(231,76,60,0.3)}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media(max-width:768px){
  .button-container{flex-direction:column;gap:10px;bottom:22px;align-items:center;padding:0 18px}
  .btn{width:84vw;max-width:310px;font-size:0.9em;padding:13px 18px}
  .overlay{background:linear-gradient(180deg,rgba(10,10,15,0.85) 0%,rgba(10,10,15,0.6) 45%,rgba(10,10,15,0.9) 100%)}
  .main-image{width:86%;max-width:360px;margin-bottom:16px}
  .stage2-images{flex-direction:column;align-items:center;width:100%;gap:12px}
  .stage2-images .play-btn-wrapper{width:88%;max-width:280px}
  .stage2-images img{width:100%;height:auto;display:block}
  .form-container{padding:20px 16px}
  .connecting-images .play-btn-wrapper{width:86%;max-width:240px}
  .connecting-images img{width:100%;height:auto;display:block}
  .article-container{padding:20px 16px}
  .article-container h2{font-size:1.2em}
}
@media(max-width:360px){
  .btn{font-size:0.82em;padding:11px 14px}
  .form-container{padding:16px 12px}
  .progress-container{width:92%}
}