@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #090d16;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-card: rgba(30, 41, 59, 0.8);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.4);
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.4);
  --emerald: #10b981;
  --rose: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: #f8fafc;
  min-h: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Glassmorphism Containers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

.glass-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

/* Glowing Elements */
.glow-cyan {
  box-shadow: 0 0 25px -5px var(--cyan-glow);
}

.glow-emerald {
  box-shadow: 0 0 30px 2px rgba(16, 185, 129, 0.5);
}

.glow-rose {
  box-shadow: 0 0 30px 2px rgba(239, 68, 68, 0.5);
}

/* Neon Text Gradients */
.text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #c084fc 50%, #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Responsive Container */
.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  position: relative;
  z-index: 10;
}

/* Background Ambient Orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.25;
}

.bg-orb-1 {
  top: -100px;
  left: -100px;
  width: 320px;
  height: 320px;
  background: var(--cyan);
}

.bg-orb-2 {
  bottom: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  background: var(--purple);
}

/* Custom Buttons */
.btn-primary {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
  color: #020617;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  border-color: #64748b;
  color: #ffffff;
}

/* Form Inputs */
.input-pin {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #334155;
  border-radius: 1rem;
  padding: 0.875rem 1rem;
  text-align: center;
  font-family: monospace;
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: 0.25em;
  color: #22d3ee;
  outline: none;
  transition: all 0.2s ease;
}

.input-pin:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.input-text {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #334155;
  border-radius: 0.875rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.input-text:focus {
  border-color: #a855f7;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

/* Scoreboard Grid */
.scoreboard-grid {
  display: grid;
  grid-template-columns: 3fr 1fr 3fr;
  gap: 0.5rem;
  align-items: center;
}

.player-card {
  padding: 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.6);
  background: rgba(15, 23, 42, 0.6);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.player-card.active-p1 {
  background: rgba(8, 47, 73, 0.6);
  border-color: rgba(6, 182, 212, 0.8);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.player-card.active-p2 {
  background: rgba(58, 12, 89, 0.6);
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Option Buttons */
.option-btn {
  width: 100%;
  min-height: 52px;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  background: rgba(30, 41, 59, 1);
}

.option-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.option-badge {
  width: 28px;
  height: 28px;
  border-radius: 0.6rem;
  background: #1e293b;
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Keyframe Animations */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(0.95); opacity: 1; }
}

.animate-pulse-subtle {
  animation: pulse-ring 3s infinite ease-in-out;
}
