﻿:root {
  --bg1: #0f172a;
  --bg2: #1e293b;
  --card: rgba(15, 23, 42, 0.88);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --ok: #22c55e;
  --bad: #ef4444;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #1d4ed8 0%, transparent 40%),
              radial-gradient(circle at 80% 10%, #f43f5e 0%, transparent 35%),
              linear-gradient(135deg, var(--bg1), var(--bg2));
  display: grid;
  place-items: center;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: 0;
}
.shape-1 { width: 260px; height: 260px; background: #22d3ee; top: -60px; left: -40px; }
.shape-2 { width: 300px; height: 300px; background: #f97316; bottom: -90px; right: -80px; }

.container { width: min(720px, 92vw); position: relative; z-index: 1; }
.card {
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(8px);
}
.hidden { display: none; }

h1, h2 { margin: 0 0 14px; }
p { margin: 0 0 16px; color: var(--muted); }
small { color: var(--muted); }

.row {
  display: flex;
  gap: 10px;
  margin: 18px 0 12px;
}

input {
  flex: 1;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 16px;
  padding: 12px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }

.top-bar {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 10px;
}

.timer-wrap {
  width: 100%;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  height: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
#timer-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  transition: width 0.2s linear;
}

.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.answer-btn {
  text-align: left;
  min-height: 56px;
  font-weight: 600;
  padding: 12px;
  border: 2px solid transparent;
}
.answer-btn:nth-child(1) { background: #dc2626; }
.answer-btn:nth-child(2) { background: #2563eb; }
.answer-btn:nth-child(3) { background: #ca8a04; }
.answer-btn:nth-child(4) { background: #16a34a; }
.answer-btn.correct { border-color: #86efac; box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.4) inset; }
.answer-btn.wrong { opacity: 0.55; }

.feedback {
  min-height: 28px;
  font-weight: 700;
  margin: 14px 0 10px;
}
.feedback.ok { color: var(--ok); }
.feedback.bad { color: var(--bad); }

#next-btn { width: 100%; }

@media (max-width: 640px) {
  .answers { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  button { width: 100%; }
}
