/* =============================================
   TIKTOK AVALIADOR — DESIGN SYSTEM PREMIUM v13
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --tt-red:       #FE2C55;
  --tt-red-soft:  rgba(254,44,85,0.08);
  --tt-red-glow:  rgba(254,44,85,0.25);
  --tt-cyan:      #69C9D0;
  --tt-black:     #111111;
  --tt-dark:      #1A1A1A;
  --tt-white:     #FFFFFF;
  --bg:           #F7F8FA;
  --modal-bg:     rgba(0, 0, 0, 0.75);
  --reward-color: #FE2C55;
  --text-secondary: #4A4A4A;
  --surface:      #FFFFFF;
  --surface-2:    #F2F3F5;
  --border:       #E8EAED;
  --border-soft:  #F0F1F3;
  --text-1:       #111111;
  --text-2:       #4A4A4A;
  --text-3:       #8A8A8A;
  --text-4:       #B0B0B0;
  --green:        #00C37A;
  --green-soft:   rgba(0,195,122,0.1);
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.14);
  --transition:   all 0.22s cubic-bezier(0.4,0,0.2,1);
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

html { scroll-behavior:smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-container {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ── SSL TOP BANNER ── */
.ssl-banner {
  background: var(--green-soft);
  border-bottom: 1px solid rgba(0,195,122,0.2);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #00904D;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* ── QUIZ HEADER ── */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tiktok-logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.balance-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.3px;
}

.withdraw-btn {
  background: var(--tt-red);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 30px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px var(--tt-red-glow);
}

.withdraw-btn:active { transform: scale(0.96); }

/* ── PROGRESS BAR ── */
.progress-bar-container {
  width: 100%;
  height: 3px;
  background: var(--border-soft);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--tt-red);
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  border-radius: 0 2px 2px 0;
}

/* ── MODAL SAQUE (quiz em andamento) ── */
.modal-saque-container {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-saque-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modalUp {
  from { opacity:0; transform:translateY(20px) scale(0.96); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

.modal-saque-header {
  background: var(--tt-red);
  color: #fff;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-saque-close {
  font-size: 22px;
  cursor: pointer;
  opacity: 0.9;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-saque-close:hover { background: rgba(255,255,255,0.2); }

.modal-saque-body {
  padding: 24px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── REWARD MODAL ── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active { display: flex; }

.modal-content {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  color: #fff;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  animation: modalUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(254,44,85,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.modal-content.final-content {
  background: linear-gradient(160deg, #1a0a2e 0%, #2d1b69 50%, #11998e 100%);
}

.reward-header {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.reward-message {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 6px;
}

.reward-amount {
  font-size: 52px;
  font-weight: 900;
  color: #FFD700;
  letter-spacing: -2px;
  line-height: 1;
  margin: 12px 0 16px;
  text-shadow: 0 0 30px rgba(255,215,0,0.4);
}

.reward-info {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  line-height: 1.5;
}

.continue-reward-btn {
  background: #fff;
  color: var(--tt-black);
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.continue-reward-btn:active { transform: scale(0.97); }

/* ── CONFETTI ── */
#confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
}

/* ── FOOTER ── */
footer {
  margin-top: auto;
  padding: 28px 20px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 10px;
  color: var(--text-4);
  background: var(--bg);
  line-height: 1.7;
}

footer p { margin-bottom: 6px; }
footer a { color: var(--text-3); text-decoration: none; font-weight: 600; }

/* ── RESPONSIVE ── */
@media (min-width: 481px) {
  body { align-items: center; background: #E8EAED; }
  .app-container {
    min-height: 860px;
    height: 92vh;
    margin: auto;
    border-radius: 40px;
    border: 8px solid #222;
    box-shadow: 0 40px 80px rgba(0,0,0,0.35);
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  body { display: block; background: var(--surface); }
  .app-container {
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}

@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 0 0 var(--tt-red-glow); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}

.fade-in-fast { animation: fadeInUp 0.3s ease both; }
.hover-pulse:hover { animation: pulse-glow 1.2s infinite; }
.transition-btn { transition: var(--transition); }
.transition-btn:active { transform: scale(0.96); }