:root {
  --bg: linear-gradient(135deg, #1b1a2e, #0f172a 40%, #0b3b4a);
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.12);
  --text: #e8ecf5;
  --muted: #9fb0c8;
  --accent: #67e8f9;
  --accent-2: #a855f7;
  --accent-3: #22d3ee;
  --danger: #f43f5e;
  --success: #10b981;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Inter", "Segoe UI", "Sora", system-ui, -apple-system,
    sans-serif;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 620px;
  height: 620px;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.45;
  z-index: 0;
}

body::before {
  background: radial-gradient(circle at 30% 40%, #4f46e5, #0ea5e9);
  top: -140px;
  left: -180px;
}

body::after {
  background: radial-gradient(circle at 70% 60%, #ec4899, #22d3ee);
  bottom: -200px;
  right: -120px;
}

.page {
  position: relative;
  z-index: 1;
  padding: 24px clamp(20px, 4vw, 40px) 48px;
}

h1,
h2,
h3 {
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

p {
  color: var(--muted);
  margin: 0 0 16px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.glass {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
  padding: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(104, 239, 255, 0.18), rgba(168, 85, 247, 0.25));
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: #0b1021;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn.icon-btn {
  padding: 10px 12px;
  border-radius: 10px;
  width: 46px;
  height: 42px;
}

.btn.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  opacity: 0.9;
}

.btn.icon-btn.active {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: #0b1021;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.stat {
  font-size: 2rem;
  font-weight: 700;
  color: #f8fafc;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.pill.success {
  color: #0f172a;
  background: #34d399;
  border: none;
}

.pill.warn {
  color: #0f172a;
  background: #fbbf24;
  border: none;
}

.pill.danger {
  color: #0f172a;
  background: #fb7185;
  border: none;
}

.quiz-shell {
  max-width: 900px;
  margin: 0 auto;
}

.question {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: transform 120ms ease, border 120ms ease, background 120ms ease;
}

.option:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.8);
}

.option input {
  margin-top: 4px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  margin: 16px 0;
}

.progress .bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  width: 0%;
  transition: width 320ms ease;
}

.result-card {
  text-align: center;
  padding: 24px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.25), rgba(99, 102, 241, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.result-card .score {
  font-size: 3rem;
  font-weight: 800;
  margin: 12px 0 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

form label {
  font-weight: 700;
  color: #f8fafc;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1rem;
}

textarea {
  min-height: 80px;
}

.question-block {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  margin-bottom: 12px;
}

.question-block .options-admin {
  display: grid;
  gap: 10px;
}

.option-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.option-row .option-main {
  grid-column: span 1;
}

.option-row .option-img {
  grid-column: span 1;
}

.option-row .option-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.flex {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

.quiz-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.quiz-card {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(14, 165, 233, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.quiz-card h3 {
  margin-bottom: 8px;
}

.pill.small {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  transition: 0.2s;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 3px;
  background: #fff;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  border-color: rgba(255, 255, 255, 0.4);
}

.switch input:checked + .slider:before {
  transform: translateX(18px);
}

.table-wrap {
  overflow-x: auto;
}

@media (max-width: 720px) {
  .page {
    padding: 18px;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}
