:root {
  --bg-main: #080a17;
  --bg-card: rgba(18, 24, 45, 0.82);
  --bg-soft: rgba(23, 32, 60, 0.55);
  --line: rgba(148, 163, 184, 0.24);
  --text: #e7ecff;
  --text-soft: #aab6d7;
  --brand: #4f7cff;
  --brand-2: #6a52ff;
  --danger: #6b1d35;
  --danger-line: #a63459;
  --ok: #164f3f;
  --ok-line: #22a070;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% -10%, #1a2d7f 0%, transparent 60%),
    radial-gradient(800px 500px at 90% 110%, #4a1e66 0%, transparent 60%),
    var(--bg-main);
}

.page-container {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.card {
  width: min(880px, 100%);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 20px 45px rgba(4, 6, 14, 0.45);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 33px);
}

p {
  color: var(--text-soft);
}

.subtitle {
  margin: 0 0 16px;
  font-size: 16px;
}

.auth-card {
  width: min(530px, 100%);
}

.wide-card {
  width: min(1020px, 100%);
}

.menu-card {
  width: min(640px, 100%);
  text-align: center;
}

.menu-actions,
.row-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-actions .btn {
  flex: 1 1 220px;
}

.split-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form {
  display: grid;
  gap: 12px;
}

label {
  font-weight: 650;
  letter-spacing: 0.2px;
}

input,
textarea,
button,
.btn {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 15px;
  padding: 11px 14px;
  transition: 0.18s ease;
}

input,
textarea {
  background: var(--bg-soft);
  color: var(--text);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #90a7ff;
  box-shadow: 0 0 0 3px rgba(96, 124, 255, 0.22);
}

textarea {
  resize: vertical;
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

button,
.btn {
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f5f8ff;
  font-weight: 650;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
}

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

button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn.secondary {
  background: linear-gradient(135deg, #313f72, #243156);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
}

.alert {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
  border: 1px solid transparent;
}

.alert.error {
  background: var(--danger);
  border-color: var(--danger-line);
  color: #ffd5de;
}

.alert.success {
  background: var(--ok);
  border-color: var(--ok-line);
  color: #d8ffef;
}

.multiline {
  white-space: pre-line;
}

.qr-image {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  margin: 8px 0 16px;
}

.quiz-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.quiz-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(26, 34, 61, 0.65);
  border-radius: 14px;
  padding: 13px 15px;
}

.quiz-list a {
  color: #c7d4ff;
  text-decoration: none;
  font-weight: 650;
}

.quiz-list a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.quiz-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-icon {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  background: rgba(35, 48, 84, 0.8);
  border: 1px solid var(--line);
}

.delete-btn {
  width: auto;
  min-width: 94px;
  padding: 8px 12px;
  font-size: 14px;
}

.btn.danger {
  background: linear-gradient(135deg, #8f2347, #701838);
}

.muted {
  color: #8ea1d7;
  font-size: 13px;
}

.question-title {
  margin-top: 4px;
}

.options {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.option-btn {
  text-align: left;
  background: rgba(32, 43, 77, 0.72);
  border: 1px solid var(--line);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  padding: 14px 16px;
}

.option-btn:hover {
  border-color: #8ca3ff;
}

.option-btn.selected {
  border-color: #8ca3ff;
  box-shadow: 0 0 0 2px rgba(140, 163, 255, 0.24) inset;
}

.feedback {
  margin-top: 0;
  border-radius: 14px;
  padding: 13px 14px;
  height: 100%;
  overflow: auto;
}

.feedback.correct {
  background: var(--ok);
  border: 1px solid var(--ok-line);
}

.feedback.wrong {
  background: var(--danger);
  border: 1px solid var(--danger-line);
}

#feedback {
  height: 150px;
  margin-top: 14px;
}

.case-box {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(20, 27, 50, 0.8);
  padding: 11px 13px;
}

.case-box p {
  margin: 8px 0 0;
}

@media (max-width: 740px) {
  .card {
    border-radius: 18px;
    padding: 20px;
  }

  .split-actions {
    grid-template-columns: 1fr;
  }
}
