:root {
  --bg: #eef7ff;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #2563eb;
  --border: #dbeafe;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background-color: #e7f4ff;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.35)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23d7ecff'/%3E%3Cstop offset='100%25' stop-color='%23bce4ff'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23ffffff'/%3E%3Cstop offset='100%25' stop-color='%23ffffff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1440' height='900' fill='url(%23a)'/%3E%3Cpath d='M0 620 L220 420 L460 620 Z' fill='%2398c4e5'/%3E%3Cpath d='M420 620 L640 350 L900 620 Z' fill='%23a6d2f2'/%3E%3Cpath d='M820 620 L1060 380 L1240 620 Z' fill='%2385bfe0'/%3E%3Cpath d='M0 750 L320 430 L520 750 Z' fill='%2387b9d8'/%3E%3Cpath d='M540 750 L780 430 L980 750 Z' fill='%237cafdb'/%3E%3Cpath d='M920 750 L1180 460 L1440 750 Z' fill='%236ca5cc'/%3E%3Crect x='0' y='0' width='1440' height='900' fill='url(%23b)'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  color: var(--text);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
  color: white;
  padding: 3rem 0 2rem;
  border-bottom-left-radius: 36px;
  border-bottom-right-radius: 36px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.site-header .author {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.site-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.04em;
}

.site-header p {
  max-width: 42rem;
  margin: 0 0 1.75rem;
  color: white;
  font-size: 1.05rem;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.site-header a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 0;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1 1 420px;
  min-width: 280px;
}

.hero h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 100%;
}

.hero p {
  max-width: 42rem;
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-cards {
  display: grid;
  gap: 1rem;
  flex: 1 1 320px;
  min-width: 280px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(29, 78, 216, 0.14);
  border-radius: 24px;
  padding: 1.35rem 1.4rem;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
}

.hero-card strong {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  color: var(--text);
}

.hero-card p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    display: block;
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }
}

.section-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(29, 78, 216, 0.12);
  border-radius: 28px;
  padding: 2rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.section-card h2 {
  margin-top: 0;
  font-size: 1.75rem;
}

.section-card h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 4px;
  margin: 1rem 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), rgba(29,78,216,0.25));
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.section-card article {
  background: #f8fbff;
  border-radius: 22px;
  padding: 1.5rem;
  border: 1px solid rgba(29, 78, 216, 0.12);
}

.section-card article h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.vocab-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.vocab-group {
  flex: 1 1 260px;
  border: 1px solid rgba(29, 78, 216, 0.12);
  border-radius: 24px;
  background: #fbfdff;
  overflow: hidden;
  min-width: 260px;
}

.vocab-group-header {
  width: 100%;
  padding: 1rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.vocab-group-header:hover {
  background: rgba(29, 78, 216, 0.04);
}

.vocab-toggle-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
  font-size: 1.2rem;
}

.vocab-group-content {
  display: grid;
  gap: 1rem;
  padding: 0 1.2rem 1.2rem;
  overflow-x: auto;
  scroll-padding: 1.2rem;
}

@media (max-width: 900px) {
  .vocab-grid {
    flex-direction: column;
  }
}
.vocab-group-content.collapsed {
  display: none;
}

.vocab-list {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  min-width: max-content;
  padding-bottom: 0.5rem;
}

.vocab-item {
  border: 1px solid rgba(29, 78, 216, 0.08);
  border-radius: 24px;
  padding: 1.35rem;
  background: white;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vocab-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.vocab-item strong {
  display: block;
  font-size: 1.55rem;
  margin-bottom: 0.5rem;
}

.vocab-item span {
  display: block;
  color: var(--primary);
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.vocab-item p {
  margin: 0;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(29, 78, 216, 0.18);
}

.button-secondary {
  background: white;
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.quiz-card {
  padding: 2rem;
  border-radius: 28px;
  border: 1px solid rgba(29, 78, 216, 0.1);
  background: #fbfdff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.quiz-card p {
  margin: 0;
}

.quiz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0;
}

.quiz-controls label {
  font-weight: 700;
  color: var(--text);
}

.quiz-controls select {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: white;
  color: var(--text);
  min-width: 170px;
}

.quiz-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  color: var(--accent);
  font-weight: 700;
}

.quiz-options {
  display: grid;
  gap: 0.85rem;
  margin: 1.4rem 0;
}

.quiz-options button {
  width: 100%;
  text-align: left;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: white;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.quiz-options button:hover {
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.quiz-options button.correct {
  background: #dcfce7;
  border-color: #22c55e;
}

.quiz-options button.incorrect {
  background: #fee2e2;
  border-color: #ef4444;
}

.quiz-result {
  margin: 0.95rem 0 0;
  min-height: 1.5rem;
  font-weight: 700;
}

.site-footer {
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
}

@media (max-width: 720px) {
  .site-header {
    padding-top: 2rem;
  }

  .site-header nav {
    justify-content: center;
  }

  .vocab-list {
    grid-template-columns: 1fr;
  }
}
