:root {
  --bg: #070b0d;
  --panel: #10181b;
  --panel-2: #142126;
  --line: #24424a;
  --line-bright: #3d6d76;
  --text: #e7fff8;
  --muted: #8ab3ac;
  --green: #1ef28f;
  --cyan: #38c9ff;
  --red: #ff5570;
  --amber: #ffc857;
  --violet: #b48cff;
  --easy: #1ef28f;
  --medium: #ffc857;
  --hard: #ff5570;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Consolas, "Cascadia Mono", "Segoe UI", monospace;
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 201, 255, 0.16), transparent 28%),
    radial-gradient(circle at 85% 8%, rgba(30, 242, 143, 0.11), transparent 26%),
    linear-gradient(rgba(30, 242, 143, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 201, 255, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
}

a {
  color: var(--green);
  text-decoration: none;
}

input, button {
  font: inherit;
}

.login-screen {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 9px
  );
  mix-blend-mode: screen;
}

.login-bg-grid {
  position: fixed;
  inset: auto auto 8% -120px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(56, 201, 255, 0.16);
  transform: rotate(28deg);
  background:
    linear-gradient(rgba(56, 201, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 242, 143, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  filter: drop-shadow(0 0 28px rgba(56, 201, 255, 0.18));
  animation: drift 9s ease-in-out infinite alternate;
}

.matrix-rain {
  position: fixed;
  inset: -20vh 0 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.44;
  mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 76%, transparent 100%);
}

.matrix-rain::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 15%, rgba(30, 242, 143, 0.18), transparent 32%),
    linear-gradient(90deg, rgba(7, 11, 13, 0.92), transparent 18%, transparent 82%, rgba(7, 11, 13, 0.92));
}

.matrix-rain span {
  position: absolute;
  top: -140vh;
  left: var(--x);
  display: block;
  width: 1.2em;
  writing-mode: vertical-rl;
  color: rgba(30, 242, 143, 0.72);
  font-size: 19px;
  line-height: 1;
  text-shadow:
    0 0 8px rgba(30, 242, 143, 0.86),
    0 0 18px rgba(56, 201, 255, 0.22);
  animation: matrixFall var(--d) linear infinite;
  animation-delay: var(--delay);
}

.matrix-rain span:nth-child(2n) {
  color: rgba(56, 201, 255, 0.58);
  font-size: 16px;
}

.matrix-rain span:nth-child(3n) {
  color: rgba(231, 255, 248, 0.68);
  opacity: 0.82;
}

.matrix-rain span:nth-child(5n) {
  filter: blur(0.4px);
  opacity: 0.62;
}

.matrix-rain-soft {
  opacity: 0.24;
}

@keyframes matrixFall {
  from {
    transform: translate3d(0, -12vh, 0);
  }
  to {
    transform: translate3d(0, 240vh, 0);
  }
}

@keyframes drift {
  from { transform: translateY(0) rotate(28deg); }
  to { transform: translateY(-28px) rotate(28deg); }
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  padding: 30px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(20, 33, 38, 0.96), rgba(7, 16, 18, 0.96)),
    rgba(16, 24, 27, 0.94);
  box-shadow:
    0 0 0 1px rgba(30, 242, 143, 0.08) inset,
    0 22px 70px rgba(0, 0, 0, 0.5),
    0 0 42px rgba(30, 242, 143, 0.14);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--violet));
  height: 2px;
}

.brand {
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2 {
  margin: 10px 0 16px;
  letter-spacing: 0;
}

.login-copy {
  margin: -6px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.captcha-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.captcha-row img {
  width: 180px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #071012;
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(7, 16, 18, 0.92);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 242, 143, 0.12);
  transform: translateY(-1px);
}

button, .primary {
  min-height: 42px;
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 10px 14px;
  color: #03100b;
  background: linear-gradient(135deg, var(--green), #6dffd0);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(30, 242, 143, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover:not(:disabled), .primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(30, 242, 143, 0.24);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.subtle-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
}

.alert {
  border-radius: 6px;
  padding: 10px 12px;
  margin: 12px 0;
}

.danger {
  border: 1px solid var(--red);
  color: #ffd9df;
}

.success {
  border: 1px solid var(--green);
  color: var(--green);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(30, 242, 143, 0.08), rgba(56, 201, 255, 0.05)),
    rgba(7, 11, 13, 0.94);
  backdrop-filter: blur(10px);
}

.topbar nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

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

.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.sidebar, .question-card, .table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 33, 38, 0.94), rgba(10, 18, 20, 0.94)),
    rgba(16, 24, 27, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-top: 1px solid rgba(30, 242, 143, 0.28);
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.metric strong {
  color: var(--green);
}

.progress {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #071012;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.submit-box {
  display: grid;
  gap: 12px;
}

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

.question-card {
  position: relative;
  padding: 18px;
  border-left: 4px solid var(--cyan);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.question-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 22%);
}

.difficulty-easy {
  border-left-color: var(--easy);
}

.difficulty-medium {
  border-left-color: var(--medium);
}

.difficulty-hard {
  border-left-color: var(--hard);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 85, 112, 0.14) inset;
}

.question-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-bright);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.question-card.ok {
  border-left-color: var(--green);
}

.question-card.warn {
  border-left-color: var(--amber);
}

.q-head, .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 6px 6px 0;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  background: #071012;
  font-size: 12px;
}

.difficulty-easy .difficulty-badge {
  color: #04120c;
  border-color: var(--easy);
  background: var(--easy);
}

.difficulty-medium .difficulty-badge {
  color: #171006;
  border-color: var(--medium);
  background: var(--medium);
}

.difficulty-hard .difficulty-badge {
  color: #1b0509;
  border-color: var(--hard);
  background: var(--hard);
}

.evidence {
  margin: 14px 0;
  padding: 10px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  background: rgba(7, 16, 18, 0.8);
}

.exam-note, .hint-box, .admin-tools {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(7, 16, 18, 0.82);
}

.exam-note strong, .hint-box {
  color: var(--text);
}

.exam-note > strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}

.exam-note > strong::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.note-line {
  display: block;
  position: relative;
  padding: 11px 12px 11px 30px;
  border-radius: 6px;
  line-height: 1.45;
}

.note-line::before {
  content: "›";
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--text);
  font-weight: 800;
}

.windows-note {
  border-left: 3px solid var(--cyan);
  background: rgba(56, 201, 255, 0.08);
}

.linux-note {
  border-left: 3px solid var(--green);
  background: rgba(30, 242, 143, 0.08);
}

.report-note {
  border-left: 3px solid var(--amber);
  background: rgba(255, 200, 87, 0.08);
}

.note-line b {
  color: var(--text);
}

.hint-box {
  margin: 12px 0;
  border-left: 3px solid var(--amber);
  background: rgba(255, 200, 87, 0.08);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(240px, 360px) max-content;
  align-items: end;
  gap: 12px;
}

.answer-row {
  margin-top: 14px;
}

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

.admin-layout {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
  text-align: left;
}

.admin-table th {
  color: var(--green);
  background: #071012;
}

.admin-q {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #071012;
}

.guide-screen {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 32px 20px;
}

.guide-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.guide-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 33, 38, 0.96), rgba(7, 16, 18, 0.96)),
    rgba(16, 24, 27, 0.94);
  box-shadow:
    0 0 0 1px rgba(30, 242, 143, 0.08) inset,
    0 22px 70px rgba(0, 0, 0, 0.42);
}

.guide-hero h1 {
  margin-bottom: 10px;
}

.guide-hero p,
.guide-card p {
  color: var(--muted);
  line-height: 1.65;
}

.guide-hero p {
  max-width: 720px;
  margin: 0;
}

.guide-home,
.guide-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  position: relative;
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 33, 38, 0.95), rgba(10, 18, 20, 0.95)),
    rgba(16, 24, 27, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.guide-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.guide-card p {
  margin: 0 0 12px;
}

.guide-card strong {
  color: var(--text);
}

.resource-card,
.final-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.final-card {
  margin-top: 16px;
  margin-bottom: 0;
  border-color: rgba(30, 242, 143, 0.38);
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(30, 242, 143, 0.48);
  border-radius: 8px;
  color: var(--green);
  background: rgba(7, 16, 18, 0.88);
  font-weight: 900;
  box-shadow: 0 0 22px rgba(30, 242, 143, 0.16);
}

.guide-card > .step-index {
  margin-bottom: 16px;
}

.resource-card > .step-index,
.final-card > .step-index {
  margin-bottom: 0;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  color: var(--text);
  background: rgba(56, 201, 255, 0.12);
  box-shadow: 0 10px 28px rgba(56, 201, 255, 0.12);
}

pre {
  overflow-x: auto;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(56, 201, 255, 0.24);
  border-radius: 6px;
  color: var(--green);
  background: #071012;
  line-height: 1.55;
}

code {
  font: inherit;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .sidebar {
    position: static;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .matrix-rain {
    opacity: 0.22;
  }

  .matrix-rain span:nth-child(n+9) {
    display: none;
  }

  .guide-screen {
    padding: 16px;
  }

  .guide-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .resource-card,
  .final-card {
    grid-template-columns: 1fr;
  }
}
