:root {
  --bg-dark: #150e30;
  --bg-gradient: linear-gradient(135deg, #150e30 0%, #0d0820 100%);
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --accent: #ECCE8E;
  --text-light: #f0eef6;
  --text-muted: #9a8fba;
  --truth-accent: #10b981;
  --lie-accent: #ef4444;
  --glass-bg: rgba(139, 92, 246, 0.07);
  --glass-border: rgba(139, 92, 246, 0.22);
  --border-radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 50%, transparent 20%, rgba(21, 14, 48, 0.92) 120%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 100% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(236, 206, 142, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 35% 55%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    var(--bg-gradient);
  background-size: 
    100% 100%, 
    200px 200px, 
    100% 100%, 
    100% 100%, 
    100% 100%, 
    100% 100%;
  background-repeat: 
    no-repeat, 
    repeat, 
    no-repeat, 
    no-repeat, 
    no-repeat, 
    no-repeat;
  color: var(--text-light);
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  user-select: none;
}

.app-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35); }
  50% { box-shadow: 0 4px 25px rgba(139, 92, 246, 0.6); }
}

.view-animate {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(to right, var(--accent), #f5e4be);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -1px;
}

h2 {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

p {
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Inputs & Forms */
.input-group {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
}

input[type="text"] {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-light);
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  caret-color: var(--accent);
}

input[type="text"]:focus {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

/* Buttons */
.btn {
  background: linear-gradient(135deg, #8b5cf6, #6d3ecb);
  color: #F3EFE0;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.55);
}

.btn:active {
  transform: translateY(2px);
}

.btn.secondary {
  background: rgba(139, 92, 246, 0.12);
  color: var(--text-light);
  box-shadow: none;
  border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
  background: rgba(139, 92, 246, 0.22);
}

.btn.primary-pulse {
  animation: pulse 2s infinite;
  margin-top: 16px;
}

.btn.truth {
  background: linear-gradient(135deg, #10b981, #0d9668);
  color: #F3EFE0;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn.truth:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
}

.btn.lie {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #F3EFE0;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn.lie:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.55);
}

/* Lists */
.player-list {
  list-style: none;
  margin-bottom: 24px;
}

.player-list:empty {
  display: none;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--glass-border);
}

.player-score {
  font-weight: 800;
  color: var(--accent);
}

/* Timers and Big text */
.big-timer {
  font-size: 4rem;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(to right, var(--text-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 24px 0;
  font-variant-numeric: tabular-nums;
}

.topic-box {
  background: rgba(0, 0, 0, 0.35);
  border: 2px dashed var(--accent);
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 24px;
}

.topic-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-light);
}

.role-reveal {
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  margin: 32px 0;
  animation: fadeIn 0.8s ease-out;
}

.role-truth { color: var(--truth-accent); text-shadow: 0 0 20px rgba(16, 185, 129, 0.5); }
.role-lie { color: var(--lie-accent); text-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }

/* Utility */
.center-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
}

.spacer { flex-grow: 1; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }

.quit-btn {
  color: rgba(240, 238, 246, 0.35);
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  margin-top: 12px;
  padding: 8px;
  transition: color 0.2s;
}

.quit-btn:hover {
  color: rgba(240, 238, 246, 0.7);
}
