:root{
  /* Core */
  --bg1:#0b1020;
  --bg2:#1b0b2a;
  --surface: rgba(255,255,255,.92);
  --surface2: rgba(255,255,255,.84);
  --text:#0f172a;
  --muted:#475569;
  --border: rgba(15,23,42,.12);

  /* Kahoot-like accents */
  --accent:#6d28d9;   /* purple */
  --accent2:#06b6d4;  /* cyan */
  --good:#16a34a;
  --bad:#dc2626;
  --warn:#f59e0b;

  /* UI */
  --radius:16px;
  --radius-sm:12px;
  --shadow: 0 12px 40px rgba(0,0,0,.22);
  --shadow2: 0 8px 22px rgba(0,0,0,.14);
}

* { box-sizing: border-box; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  padding: 18px;
  color: var(--text);

  /* Soft “game” background */
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(109,40,217,.30), transparent 60%),
    radial-gradient(900px 700px at 90% 20%, rgba(6,182,212,.22), transparent 55%),
    radial-gradient(900px 700px at 50% 90%, rgba(245,158,11,.18), transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
}

a{ color: inherit; }

.card{
  max-width: 560px;
  margin: 0 auto;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}

.card.wide{
  max-width: 980px;
}

h1,h2,h3{
  margin: 0 0 10px 0;
  letter-spacing: .2px;
}

h1{ font-size: 24px; }
h2{ font-size: 18px; margin-top: 8px; }
h3{ font-size: 16px; }

label{
  display:block;
  margin-top: 12px;
  font-weight: 700;
  color: rgba(15,23,42,.92);
}

input, select, textarea{
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  color: var(--text);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease, transform .06s ease;
}

input::placeholder, textarea::placeholder{
  color: rgba(71,85,105,.75);
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(109,40,217,.55);
  box-shadow: 0 0 0 4px rgba(109,40,217,.18);
}

button{
  appearance: none;
  border: 0;
  cursor: pointer;
  user-select: none;

  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;

  color: #fff;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  box-shadow: var(--shadow2);

  font-weight: 800;
  letter-spacing: .2px;

  transition: transform .06s ease, filter .12s ease, box-shadow .12s ease;
}

button:hover{
  filter: brightness(1.03);
}

button:active{
  transform: translateY(1px);
}

button:disabled{
  opacity: .55;
  cursor: not-allowed;
  filter: saturate(.8);
  box-shadow: none;
}

/* Secondary button style (used in dashboard) */
button.secondary,
.btn.secondary{
  background: rgba(15,23,42,.08);
  color: rgba(15,23,42,.92);
  box-shadow: none;
  border: 1px solid rgba(15,23,42,.10);
}

button.secondary:hover,
.btn.secondary:hover{
  background: rgba(15,23,42,.10);
}

/* Links styled as buttons (dashboard uses .btn on <a>) */
.btn{
  display: inline-block;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  box-shadow: var(--shadow2);
  transition: transform .06s ease, filter .12s ease, box-shadow .12s ease;
}

.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }

/* Messages */
.msg{
  margin-top: 12px;
  color: var(--bad);
  font-weight: 700;
}

/* Small helper text */
.small{
  font-size: 12px;
  color: rgba(71,85,105,.9);
}

/* Divider */
hr{
  border: none;
  border-top: 1px solid rgba(15,23,42,.10);
  margin: 16px 0;
}

/* Rows */
.row{
  display:flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.row input{
  max-width: 220px;
  margin-top: 0;
}

.row button{
  margin-top: 0;
}

/* Answers grid (mobile friendly) */
.answers{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

/* Answer buttons (player) */
.ans{
  text-align: left;
  width: 100%;
  padding: 14px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.2;
  background: rgba(255,255,255,.96);
  color: var(--text);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  transition: transform .06s ease, box-shadow .12s ease, border-color .12s ease;
}

.ans:hover{
  transform: translateY(-1px);
  border-color: rgba(109,40,217,.35);
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}

.ans:active{
  transform: translateY(0);
}

.ans:disabled{
  opacity: .65;
  cursor: not-allowed;
}

/* Timer */
.timer{
  margin-top: 10px;
  font-size: 18px;
  font-weight: 900;
  color: rgba(15,23,42,.92);
}

/* Code blocks */
code{
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.08);
  padding: 2px 6px;
  border-radius: 10px;
}

/* Tables */
table{
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,.96);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.10);
}

th, td{
  border-bottom: 1px solid rgba(15,23,42,.10);
  padding: 10px 10px;
  text-align: left;
}

th{
  background: rgba(109,40,217,.08);
  color: rgba(15,23,42,.92);
  font-weight: 900;
}

tr:last-child td{ border-bottom: none; }

/* Pills (screen uses inline styles too, but this improves defaults) */
.pill{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(109,40,217,.10);
  border: 1px solid rgba(109,40,217,.18);
  font-weight: 800;
  color: rgba(15,23,42,.92);
}

/* Better spacing on very small screens */
@media (max-width: 480px){
  body{ padding: 12px; }
  .card{ padding: 14px; border-radius: 16px; }
  h1{ font-size: 22px; }
}
