/* Main Styles */
:root {
  --primary-color: #fe2c55;
  --primary-hover: #e0264c;
  --text-color: #111;
  --text-secondary: #6b7280;
  --background-color: #f5f5f7;
  --card-color: #ffffff;
  --border-color: #e5e7eb;
  --accent-cyan: #25f4ee;
  --accent-cyan-deep: #00c4cc;
  --success-color: #22c55e;
  --modal-bg: rgba(0, 0, 0, 0.4);
  --reward-color: #22c55e;
}

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

body {
  font-family: 'TikTok Sans', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 600px;
  margin: 0;
  background-color: var(--card-color);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

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

.tiktok-logo img {
  height: 24px;
  margin-right: 8px;
}

.balance-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.balance {
  background-color: #f3f4f6;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  color: #111;
}

.withdraw-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.withdraw-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.withdraw-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: auto;
}

.progress-bar-container {
  width: 100%;
  height: 3px;
  background-color: #f3f4f6;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary-color);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.terms-footer {
  padding: 14px 16px;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  border-top: 1px solid var(--border-color);
}

.terms-footer a {
  color: #6b7280;
  text-decoration: none;
}

#confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

@media (min-width: 481px) {
  .app-container {
    margin: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  }
}

@media (max-width: 480px) {
  .app-container {
    min-height: 100vh;
  }
}
