:root {
  --got-bg: #0d0d0d;
  --got-surface: #161616;
  --got-ink: #e8e8e8;
  --got-muted: #9a9a9a;
  --got-line: #2a2a2a;
  --got-accent: #c9a227;
  --got-ice: #7eb8d6;
  --got-fire: #d65a45;
}

html {
  background: var(--got-bg);
}

body {
  background: var(--got-bg);
  color: var(--got-ink);
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px;
}

.got-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

.got-hero {
  height: 220px;
  background:
    radial-gradient(circle at 20% 30%, rgba(126,184,214,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(214,90,69,0.12) 0%, transparent 40%),
    linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

.got-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,0.95) 0%, rgba(13,13,13,0.3) 60%, transparent 100%);
}

.got-hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  z-index: 1;
}

.got-hero-text h1 {
  margin: 0 0 8px;
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.got-hero-text p {
  margin: 0;
  color: var(--got-muted);
  font-size: 0.95rem;
}

.got-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--got-line);
  padding-bottom: 8px;
}

.got-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--got-muted);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.got-tab[aria-selected="true"] {
  background: var(--got-surface);
  color: var(--got-ink);
  border-color: var(--got-line);
}

.got-panel {
  display: none;
}

.got-panel.active {
  display: block;
}

.got-section-title {
  font-size: 1.4rem;
  margin: 0 0 16px;
  font-weight: 600;
}

.got-seasons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.got-season {
  background: var(--got-surface);
  border: 1px solid var(--got-line);
  color: var(--got-muted);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.got-season.active {
  border-color: var(--got-accent);
  color: var(--got-accent);
}

.got-season-summary {
  color: var(--got-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.got-timeline {
  display: grid;
  gap: 14px;
}

.got-event {
  background: var(--got-surface);
  border: 1px solid var(--got-line);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  padding-left: 44px;
}

.got-event::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--got-accent);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.15);
}

.got-event h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.got-event p {
  margin: 0;
  color: var(--got-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.got-houses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.got-house {
  background: var(--got-surface);
  border: 1px solid var(--got-line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.got-house:hover {
  transform: translateY(-2px);
  border-color: var(--got-line);
}

.got-house-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
}

.got-house-sigil {
  height: 120px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}

.got-house-sigil svg {
  width: 64px;
  height: 64px;
}

.got-house-body {
  padding: 16px;
}

.got-house-body h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.got-house-body p {
  margin: 0;
  color: var(--got-muted);
  font-size: 0.85rem;
}

.got-house-detail {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--got-line);
  color: var(--got-muted);
  font-size: 0.9rem;
}

.got-house.expanded .got-house-detail {
  display: block;
}

.got-house-detail h4 {
  margin: 0 0 8px;
  color: var(--got-ink);
  font-size: 0.95rem;
}

.got-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.got-char {
  background: rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.got-quiz {
  background: var(--got-surface);
  border: 1px solid var(--got-line);
  border-radius: 16px;
  padding: 24px;
}

.got-quiz-progress {
  height: 6px;
  background: var(--got-line);
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
}

.got-quiz-progress > div {
  height: 100%;
  background: var(--got-accent);
  transition: width 0.3s ease;
}

.got-quiz-question {
  font-size: 1.2rem;
  margin: 0 0 20px;
  line-height: 1.4;
}

.got-quiz-options {
  display: grid;
  gap: 10px;
}

.got-quiz-option {
  background: transparent;
  border: 1px solid var(--got-line);
  color: var(--got-ink);
  padding: 14px 16px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.12s ease;
}

.got-quiz-option:hover {
  border-color: var(--got-muted);
}

.got-quiz-option.correct {
  border-color: #5a9;
  background: rgba(85, 170, 153, 0.12);
}

.got-quiz-option.wrong {
  border-color: var(--got-fire);
  background: rgba(214, 90, 69, 0.12);
}

.got-quiz-option:disabled {
  cursor: default;
}

.got-quiz-score {
  text-align: center;
  padding: 40px 20px;
}

.got-quiz-score h3 {
  font-size: 2rem;
  margin: 0 0 12px;
}

.got-quiz-score p {
  color: var(--got-muted);
  margin: 0 0 24px;
}

.got-btn {
  background: var(--got-accent);
  color: #0d0d0d;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}

.got-btn-secondary {
  background: var(--got-surface);
  color: var(--got-ink);
  border: 1px solid var(--got-line);
  margin-left: 8px;
}

.got-status {
  text-align: center;
  color: var(--got-muted);
  font-size: 0.85rem;
  margin-top: 24px;
}

@media (max-width: 520px) {
  .got-hero { height: 180px; }
  .got-hero-text h1 { font-size: 1.6rem; }
  .got-tabs { gap: 6px; }
  .got-tab { padding: 8px 12px; font-size: 0.85rem; }
  .got-houses { grid-template-columns: 1fr; }
}
