@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300..900&display=swap');

:root {
  --bg:           #07090f;
  --bg-mid:       #0c0f1d;
  --surface:      rgba(255,255,255,0.04);
  --surface-hi:   rgba(255,255,255,0.07);
  --border:       rgba(255,255,255,0.08);
  --border-hi:    rgba(255,255,255,0.16);
  --accent:       #6366f1;
  --accent-2:     #8b5cf6;
  --accent-light: #a5b4fc;
  --accent-dim:   rgba(99,102,241,0.14);
  --accent-glow:  rgba(99,102,241,0.32);
  --green:        #34d399;
  --green-dim:    rgba(52,211,153,0.1);
  --green-glow:   rgba(52,211,153,0.32);
  --red:          #f87171;
  --red-dim:      rgba(248,113,113,0.1);
  --red-glow:     rgba(248,113,113,0.32);
  --yellow:       #fbbf24;
  --text:         #edf0f7;
  --text-muted:   #7b849a;
  --text-dim:     #3e4760;
  --radius:       12px;
  --radius-lg:    18px;
  --ease:         cubic-bezier(0.4,0,0.2,1);
  --t:            0.18s;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
}

/* ambient glow orbs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 65%);
  top: -200px; left: -200px;
  filter: blur(40px);
}
body::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 65%);
  bottom: -150px; right: -150px;
  filter: blur(40px);
}

.cmp-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  position: relative;
  z-index: 1;
}

.cmp-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0 0 0.6rem;
  background: linear-gradient(130deg, #818cf8 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cmp-header p {
  color: var(--text-muted);
  margin: 0 0 2rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.cmp-start {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 22px var(--accent-glow);
  letter-spacing: 0.01em;
  transition: all var(--t) var(--ease);
}

.cmp-start:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 6px 30px var(--accent-glow);
}

.cmp-start:active {
  transform: translateY(0);
}

.cmp-start:disabled {
  opacity: 0.38;
  color: var(--text-dim);
  cursor: default;
  transform: none;
  box-shadow: none;
}

.cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  position: relative;
  z-index: 1;
}

.cmp-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--t) var(--ease);
}

.cmp-panel.winner {
  border-color: var(--green);
  box-shadow: 0 0 40px var(--green-glow);
  background: linear-gradient(135deg, rgba(52,211,153,0.05) 0%, transparent 100%), var(--surface);
}

.cmp-panel.loser {
  border-color: var(--border);
  opacity: 0.75;
}

.panel-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.panel-label.repetio {
  color: var(--accent-light);
  background: var(--accent-dim);
  border: 1px solid rgba(99,102,241,0.22);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

.panel-label.generic {
  color: var(--text-muted);
  background: var(--surface-hi);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.timer {
  font-size: 2.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.5px;
}

.timer.done-fast {
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
}

.timer.done-slow {
  color: var(--red);
  text-shadow: 0 0 20px var(--red-glow);
}

.timer-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.status-bar {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 1.3em;
}

.question-box {
  display: none;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-top: 1.2rem;
  animation: fadeUp 0.35s var(--ease);
}

.question-box.visible {
  display: block;
}

.q-text {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.62;
  color: var(--text);
}

.opts {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.opts li {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  transition: all var(--t) var(--ease);
  color: var(--text);
}

.opts li.correct {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
  font-weight: 600;
}

.opts li span.key {
  font-weight: 700;
  margin-right: 0.6rem;
  color: var(--text-dim);
}

.ncvvo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  border: 1px solid rgba(99,102,241,0.28);
  color: var(--accent-light);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.73rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.ncvvo-badge svg {
  flex-shrink: 0;
}

.no-ncvvo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.73rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.explanation {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.8rem;
}

.winner-badge {
  display: none;
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--green);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px var(--green-glow);
}

.winner-badge.visible {
  display: block;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-link {
  display: block;
  text-align: center;
  padding: 1.2rem;
  color: var(--accent-light);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: color var(--t) var(--ease);
}

.back-link:hover {
  color: var(--accent);
}

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

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  70% {
    transform: scale(1.12);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .cmp-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cmp-header h1 {
    font-size: 1.5rem;
  }

  .panel-title {
    font-size: 1rem;
  }

  .timer {
    font-size: 2rem;
  }
}
