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

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface-hover: #252540;
  --primary: #6c63ff;
  --primary-hover: #5a52d5;
  --correct: #2ecc71;
  --incorrect: #e74c3c;
  --text: #f0f0f0;
  --text-muted: #8888aa;
  --border: #2a2a45;
  --radius: 12px;
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
}

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

.game-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding-top: 20px;
}

.screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== START SCREEN ===== */

.game-logo {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 24px;
  object-fit: cover;
}

.game-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.stats-display {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
  min-height: 1.4em;
}

.stats-display .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stats-display .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.stats-display .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.start-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.hint-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.5);
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.btn-skip {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  padding: 10px 20px;
}

.btn-skip:hover {
  background: var(--surface);
}

.btn-skip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-next {
  flex: 1;
}

.hidden {
  display: none !important;
}

/* ===== GAME SCREEN ===== */

.game-header {
  margin-bottom: 20px;
}

.round-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#round-counter {
  font-weight: 600;
  font-size: 0.95rem;
}

.category-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timer-container {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 100%;
  transition: width 0.1s linear, background 0.3s ease;
}

.timer-bar.warning {
  background: #f39c12;
}

.timer-bar.danger {
  background: var(--incorrect);
}

.timer-text {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===== STATEMENT CARDS ===== */

.statements-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.statement-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
  text-align: left;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.statement-card:hover:not(.disabled) {
  border-color: var(--primary);
  background: var(--surface-hover);
}

.statement-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.5);
}

.statement-card:active:not(.disabled) {
  transform: scale(0.98);
}

.statement-card.disabled {
  cursor: default;
  opacity: 0.7;
}

.statement-card.selected {
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.1);
}

.statement-card.correct-lie {
  border-color: var(--correct);
  background: rgba(46, 204, 113, 0.12);
  opacity: 1;
}

.statement-card.wrong-pick {
  border-color: var(--incorrect);
  background: rgba(231, 76, 60, 0.12);
  opacity: 1;
}

.statement-card.truth {
  opacity: 0.5;
}

.card-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.card-text {
  flex: 1;
  padding-top: 3px;
}

@keyframes cardPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.statement-card.pop {
  animation: cardPop 0.25s ease;
}

/* ===== FEEDBACK ===== */

.feedback-area {
  min-height: 60px;
  margin-bottom: 12px;
}

.feedback-msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

.feedback-msg.correct {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: var(--correct);
}

.feedback-msg.incorrect {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: var(--incorrect);
}

.feedback-msg.skipped {
  background: rgba(136, 136, 170, 0.12);
  border: 1px solid rgba(136, 136, 170, 0.3);
  color: var(--text-muted);
}

.feedback-msg.timeout {
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: #f39c12;
}

.feedback-bonus {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* ===== SCORE ROW ===== */

.score-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.score-value {
  font-size: 1.3rem;
  font-weight: 700;
}

/* ===== ACTION BUTTONS ===== */

.action-buttons {
  display: flex;
  gap: 10px;
}

/* ===== RESULTS SCREEN ===== */

.results-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.result-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.result-card-wide {
  grid-column: 1 / -1;
}

.result-value {
  font-size: 1.8rem;
  font-weight: 800;
}

.results-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-toast {
  text-align: center;
  margin-top: 12px;
  padding: 10px;
  background: var(--correct);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease;
}

/* ===== DAILY DONE SCREEN ===== */

#screen-daily-done {
  text-align: center;
}

#screen-daily-done h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.daily-done-msg {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.daily-result {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.6;
}

.comeback-text {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
}

/* ===== RESPONSIVE ===== */

@media (min-width: 600px) {
  body {
    padding: 40px 16px;
  }

  .game-title {
    font-size: 3rem;
  }

  .statement-card {
    padding: 20px;
    font-size: 1rem;
  }
}
