/* Two Truths and a Lie - Modern Clean UI */

:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --accent-truth: #10b981;
  --accent-truth-bg: #f0fdf4;
  --accent-truth-border: #86efac;
  --accent-lie: #f43f5e;
  --accent-lie-bg: #fff1f2;
  --accent-lie-border: #fda4af;
  --surface-bg: #ffffff;
  --border-subtle: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-full: 9999px;
  --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-elevated: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

body {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Header & Logo */
.game-header-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.game-logo-img {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-logo-img:hover {
  transform: scale(1.06) rotate(-2deg);
}

.game-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  background: #eef2ff;
  color: #4f46e5;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.game-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
}

@media (min-width: 768px) {
  .game-title {
    font-size: 2.5rem;
  }
}

.game-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
}

/* iOS-Style Segmented Navigation Track */
.segmented-mode-nav {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.segmented-track {
  display: inline-flex;
  background: #e2e8f0;
  padding: 4px;
  border-radius: var(--radius-full);
  gap: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.segmented-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.segmented-btn:hover {
  color: #1e293b;
}

.segmented-btn.active {
  background: #ffffff;
  color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Category Filter Chips */
.cat-chips-scroll {
  display: flex;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 4px 14px 4px;
  scrollbar-width: none;
}
.cat-chips-scroll::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cat-chip:hover {
  border-color: #cbd5e1;
  color: #1e293b;
  background: #f8fafc;
}

.cat-chip.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* Main Arena Card */
.arena-card {
  background: var(--surface-bg);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-elevated);
  padding: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

@media (min-width: 768px) {
  .arena-card {
    padding: 30px;
  }
}

/* Stats Pill Bar */
.game-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  border: 1px solid #edf2f7;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #475569;
}

.stat-val {
  color: var(--primary-color);
  font-size: 0.98rem;
  font-weight: 800;
}

.btn-sound-pill {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sound-pill:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* Statement Trio Grid */
.statement-trio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

@media (min-width: 768px) {
  .statement-trio-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Statement Card */
.statement-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 190px;
}

.statement-card:hover:not(.revealed) {
  border-color: #818cf8;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(79, 70, 229, 0.12);
}

.statement-card:hover:not(.revealed) .card-action-hint {
  background: #f43f5e;
  color: #ffffff;
  border-color: #f43f5e;
}

.card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-letter-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.statement-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
  color: #1e293b;
  margin-bottom: 14px;
  flex-grow: 1;
}

/* Interactive Vote Button inside Card */
.card-action-hint {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
}

/* Revealed States */
.statement-card.revealed {
  cursor: default;
  transform: none !important;
}

/* Revealed: THE LIE */
.statement-card.is-lie {
  border-color: var(--accent-lie);
  background: var(--accent-lie-bg);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18);
  animation: cardPop 0.35s ease;
}

.statement-card.is-lie .card-letter-badge {
  background: var(--accent-lie);
  color: #ffffff;
}

.statement-card.is-lie .card-action-hint {
  background: #f43f5e;
  border-color: #f43f5e;
  color: #ffffff;
}

/* Revealed: TRUTH */
.statement-card.is-truth {
  border-color: var(--accent-truth-border);
  background: var(--accent-truth-bg);
}

.statement-card.is-truth .card-letter-badge {
  background: var(--accent-truth);
  color: #ffffff;
}

.statement-card.is-truth .card-action-hint {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

/* Explanation Notes Inside Card */
.statement-explanation {
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: #334155;
}

/* User Selection Tag */
.user-pick-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 8px;
  text-transform: uppercase;
}

.user-pick-tag.correct {
  background: #10b981;
  color: #ffffff;
}

.user-pick-tag.wrong {
  background: #f43f5e;
  color: #ffffff;
}

/* Round Outcome Banner */
.round-outcome-banner {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: none;
  animation: slideDown 0.25s ease;
}

.round-outcome-banner.show-success {
  display: block;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.round-outcome-banner.show-fail {
  display: block;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

/* Controls Wrap & Action Buttons */
.controls-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-primary-action {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  padding: 12px 36px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
  color: #ffffff;
}

.btn-secondary-action {
  background: #ffffff;
  color: #475569;
  border: 2px solid #e2e8f0;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary-action:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: #f8fafc;
}

/* Pass & Play Custom Form */
.custom-input-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.custom-input-card:focus-within {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.lie-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 10px;
  user-select: none;
}

.lie-radio-label input[type="radio"] {
  accent-color: #f43f5e;
  width: 17px;
  height: 17px;
}

.lie-radio-label input[type="radio"]:checked + span {
  color: #e11d48;
}

/* Idea Generator List */
.idea-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.idea-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-subtle);
}

.btn-copy-idea {
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-copy-idea:hover {
  background: #e2e8f0;
  color: #0f172a;
}

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

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

/* Mobile responsive adjustments */
@media (max-width: 576px) {
  .arena-card {
    padding: 18px 14px;
  }
  .statement-text {
    font-size: 0.95rem;
  }
  .btn-primary-action {
    width: 100%;
    justify-content: center;
  }
}
