/* TikTok App Design System — V2 Redesign */

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 9%;
  --tiktok-red: 348 83% 47%;
  --tiktok-cyan: 174 100% 42%;
  --tiktok-red-glow: 348 83% 55%;
  --primary: 348 83% 47%;
  --primary-foreground: 0 0% 100%;
  --accent: 0 0% 96%;
  --accent-foreground: 0 0% 9%;
  --card: 0 0% 98%;
  --card-foreground: 0 0% 9%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 9%;
  --secondary: 0 0% 96%;
  --secondary-foreground: 0 0% 9%;
  --muted: 0 0% 96%;
  --muted-foreground: 0 0% 45%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 0 0% 90%;
  --input: 0 0% 90%;
  --ring: 348 83% 47%;
  --radius: 0.75rem;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media print { html, body { display: none !important; } }

* {
  border-color: hsl(var(--border));
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TikTok App Headers
   ======================================== */
.tiktok-header {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.tiktok-header-dark {
  background: #161823;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Conversion header — PRETO PURO */
.conv-header {
  background: #000000;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
}

/* ========================================
   SPLASH — PRETO PURO
   ======================================== */
.splash-screen {
  background: #000000;
  color: #fff;
}

/* ========================================
   LIVE Bar (card cinza claro, dot vermelho)
   ======================================== */
.live-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f0f0f2;
}

.live-dot-container {
  position: relative;
  display: flex;
  width: 10px;
  height: 10px;
}

.live-dot-ping {
  position: absolute;
  display: inline-flex;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: #FE2C55;
  opacity: 0.5;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.live-dot-red {
  position: relative;
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #FE2C55;
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* ========================================
   Main Reward Card (grande, branco, centralizado)
   ======================================== */
.main-reward-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.main-reward-card-accent {
  height: 4px;
  background: linear-gradient(90deg, #FE2C55, #25F4EE);
}

/* Seção selecionado dentro do card */
.selected-section {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #f0f0f0;
}

/* ========================================
   TikTok Style Cards
   ======================================== */
.card-tiktok {
  background: hsl(var(--card));
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
}

.card-elevated {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ========================================
   TikTok Gradients
   ======================================== */
.tiktok-gradient {
  background: linear-gradient(135deg, #FE2C55 0%, #25F4EE 100%);
}

.tiktok-gradient-text {
  background: linear-gradient(135deg, #FE2C55 0%, #FE2C55 60%, #25F4EE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tiktok-gradient-red {
  background: linear-gradient(135deg, #FE2C55 0%, #FF6B81 100%);
}

/* ========================================
   TikTok Buttons
   ======================================== */
.btn-tiktok {
  background-color: #FE2C55;
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-tiktok:hover {
  background-color: #E91E45;
  transform: translateY(-1px);
}

.btn-tiktok:active {
  transform: translateY(0) scale(0.98);
}

button:disabled, .btn-tiktok:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border: 1.5px solid hsl(var(--border));
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: #FE2C55;
  color: #FE2C55;
}

/* ========================================
   Quiz Option Cards — Consistent Size
   ======================================== */
.quiz-option-btn {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
  min-height: 64px;
}

.quiz-option-btn:hover {
  border-color: #d0d0d0;
  background: #fafafa;
}

.quiz-option-btn.selected {
  border-color: #FE2C55;
  background: #FFF5F7;
  box-shadow: 0 0 0 1px #FE2C55;
}

.quiz-option-btn .option-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quiz-option-btn .check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FE2C55;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.quiz-option-btn.selected .check-icon {
  opacity: 1;
}

/* ========================================
   Timer Boxes
   ======================================== */
.timer-box {
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--foreground));
}

/* ========================================
   Pill Badge
   ======================================== */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pill-badge-live {
  background: #FFF5F7;
  border: 1px solid rgba(254, 44, 85, 0.15);
  color: #FE2C55;
}

.pill-badge-cyan {
  background: #F0FFFE;
  border: 1px solid rgba(37, 244, 238, 0.2);
  color: #00B8B0;
}

/* ========================================
   Reward Popup — Clean TikTok Style
   ======================================== */
.reward-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.reward-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  width: calc(100% - 2rem);
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  text-align: center;
}

.reward-icon-container {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   Reward Month Popup
   ======================================== */
.reward-month-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.reward-month-overlay.hidden { display: none; }
.reward-month-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.reward-month-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #161823;
  margin-bottom: 8px;
  line-height: 1.3;
}
.reward-month-desc {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 20px;
}
.reward-month-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.reward-month-option {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
}
.rm-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rm-icon-cash {
  background: #FFF0F3;
  color: #FE2C55;
}
.rm-icon-time {
  background: #EEF2FF;
  color: #6366F1;
}
.rm-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rm-option-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #161823;
}
.rm-option-text span {
  font-size: 0.78rem;
  color: #888;
}

/* ========================================
   Abandon Popup
   ======================================== */
.abandon-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.abandon-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  width: calc(100% - 2rem);
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
}

.abandon-icon-container {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #FFF5F7;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.abandon-urgency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #FFF5F7;
  border: 1px solid rgba(254, 44, 85, 0.15);
  font-size: 0.8rem;
  font-weight: 600;
  color: #FE2C55;
}

/* ========================================
   Withdraw Method Card
   ======================================== */
.withdraw-method-btn {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
}

.withdraw-method-btn:hover {
  border-color: #d0d0d0;
  background: #fafafa;
}

.linked-card {
  background: #161823;
  color: #fff;
  border-radius: 16px;
  padding: 20px;
}

.linked-card .detail-text {
  color: #8A8B91;
  font-size: 0.875rem;
}

/* ========================================
   Withdraw Amount Button
   ======================================== */
.withdraw-amt-btn {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px;
  font-weight: 700;
  font-size: 1.125rem;
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.withdraw-amt-btn:hover {
  border-color: #d0d0d0;
}

.withdraw-amt-btn.selected {
  border-color: #FE2C55;
  background: #FFF5F7;
  color: #FE2C55;
  box-shadow: 0 0 0 1px #FE2C55;
}

/* ========================================
   Express Withdrawal Badge
   ======================================== */
.express-badge {
  background: #F0FFF4;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* ========================================
   Trust Badge
   ======================================== */
.trust-badge {
  background: #F0FFFE;
  border: 1px solid rgba(37, 244, 238, 0.15);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ========================================
   Form Inputs — TikTok Style
   ======================================== */
.tiktok-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1.5px solid #e8e8e8;
  background: #fff;
  color: hsl(var(--foreground));
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;
}

.tiktok-input:focus {
  border-color: #FE2C55;
  box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.tiktok-input::placeholder {
  color: #B0B0B8;
}

/* ========================================
   Footer
   ======================================== */
.tiktok-footer {
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  padding: 20px 16px;
  text-align: center;
}

.tiktok-footer p {
  color: #8A8B91;
  font-size: 0.75rem;
}

.tiktok-footer a {
  color: #FE2C55;
  font-size: 0.75rem;
  cursor: pointer;
}

.tiktok-footer a:hover {
  text-decoration: underline;
}

/* ========================================
   Conversion Prize — Gradient Text
   ======================================== */
.conversion-prize {
  background: linear-gradient(135deg, #FE2C55 0%, #FF6B81 50%, #25F4EE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   Progress Bar
   ======================================== */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #f0f0f0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #FE2C55;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-bar-container {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 9999px;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FE2C55, #25F4EE);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* ========================================
   Animations
   ======================================== */
@keyframes slide-up {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes scale-in {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-slide-up { animation: slide-up 0.4s ease-out forwards; }
.animate-fade-in { animation: fade-in 0.3s ease-out forwards; }
.animate-scale-in { animation: scale-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-pulse-soft { animation: pulse-soft 2s ease-in-out infinite; }
.animate-bounce-soft { animation: bounce-soft 2s ease-in-out infinite; }

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(254, 44, 85, 0.25); }
  50% { box-shadow: 0 4px 24px rgba(254, 44, 85, 0.4); }
}

.animate-cta-pulse {
  animation: cta-pulse 2s ease-in-out infinite;
}

/* ========================================
   Utility Overrides
   ======================================== */
.bg-background { background-color: hsl(var(--background)); }
.text-foreground { color: hsl(var(--foreground)); }
.bg-card { background-color: hsl(var(--card)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-primary { color: hsl(var(--primary)); }
.bg-primary { background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 640px) {
  .reward-card {
    padding: 24px 20px;
    margin: 0 16px;
  }
  .abandon-card {
    padding: 24px 20px;
    margin: 0 16px;
  }
}

.gpu-accelerate {
  transform: translateZ(0);
  will-change: transform;
}
