:root {
  --bg: #0f1419;
  --bg-alt: #161d26;
  --surface: #1c2530;
  --text: #e6e9ed;
  --muted: #9aa6b2;
  --accent: #8bd5b5;
  --accent-strong: #4fb98a;
  --border: #2a3543;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* --- Hero --- */
.hero {
  background: radial-gradient(circle at 20% 20%, #1d2a33, var(--bg) 70%);
  padding-bottom: 4rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  margin-right: auto;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

.hero-content {
  max-width: 760px;
  margin: 3rem auto 0;
  padding: 0 2rem;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* --- Buttons --- */
.btn {
  background: var(--accent-strong);
  color: #08110c;
  border: none;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.quote {
  margin: 2rem auto 0;
  max-width: 600px;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent);
  min-height: 3rem;
  border-left: 3px solid var(--accent-strong);
  padding-left: 1rem;
  text-align: left;
}

/* --- Sections --- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

.section-alt {
  background: var(--bg-alt);
  max-width: none;
}

.section-alt > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.section-hint {
  color: var(--muted);
  margin-bottom: 2rem;
}

/* --- Courses --- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.15s, border-color 0.2s;
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-strong);
}

.course-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.course-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.badge {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.course-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.loading {
  color: var(--muted);
}

/* --- Form --- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 460px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.form input,
.form select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 1rem;
}

.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent-strong);
}

.result {
  margin-top: 1.2rem;
  font-weight: 500;
  min-height: 1.5rem;
}

.result.success {
  color: var(--accent);
}

.result.error {
  color: #f0857d;
}

.health {
  color: var(--muted);
  font-family: "Courier New", monospace;
}

.health.up {
  color: var(--accent);
}

.health.down {
  color: #f0857d;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
