/* Вариант 1: Темный минималистичный с синими акцентами */

:root {
  --bg: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  --card: rgba(26, 26, 46, 0.95);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --success: #10b981;
  --danger: #ef4444;
  --secondary: #8b5cf6;
  --tertiary: #f59e0b;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #06b6d4;
  --shadow: rgba(0, 0, 0, 0.3);
  --glow: 0 0 10px rgba(59, 130, 246, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 40px;
}

/* Убираем белую системную заливку в селектах и делаем опции читаемыми */
select {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

option {
  background: rgba(12, 14, 22, 0.95);
  color: var(--text);
}

select::-ms-expand {
  display: none;
}


html {
  scroll-behavior: smooth;
}

.header {
  background: rgba(15, 15, 35, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 24px 20px;
  box-shadow: 0 4px 20px var(--shadow);
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.branding {
  display: flex;
  align-items: center;
  gap: 16px;
}


.logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--glow);
}

.header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.header__tags {
  display: flex;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.container {
  max-width: 1180px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: grid;
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px var(--shadow);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--shadow);
}

.card h2 {
  margin: 0 0 20px;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}

.hidden {
  display: none !important;
}

.form {
  display: grid;
  gap: 20px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.form-row input,
.form-row select {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-row--full {
  margin-top: 8px;
}

.exam-selects {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exam-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.exam-select-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
}

.exam-select-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary);
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.2rem;
}

.buttons-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
}

.btn-success {
  background: var(--success);
}

.btn-danger {
  background: var(--danger);
}

.btn-secondary {
  background: var(--secondary);
}

.btn-tertiary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid var(--border);
}

.stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.question-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 24px var(--shadow);
}

.question-text {
  min-height: 140px;
  white-space: pre-wrap;
  line-height: 1.6;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 1.05rem;
  color: var(--text);
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.history {
  margin-top: 20px;
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.history-list li {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-list li:last-child {
  border-bottom: none;
}

.history-list li span {
  font-weight: 600;
}

.report-text {
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  min-height: 180px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer {
  text-align: center;
  padding: 20px 20px 40px;
  color: var(--muted);
  font-size: 0.85rem;
  background: rgba(15, 15, 35, 0.9);
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .header__inner {
    flex-direction: column;
    text-align: center;
  }

  .stats {
    flex-direction: column;
  }

  .button-row {
    flex-direction: column;
  }

  .exam-select-row {
    flex-direction: column;
    text-align: center;
  }
}