:root {
  --bg-deep: #060913;
  --bg-sidebar: #0a0f1d;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(232, 196, 106, 0.08);
  --border-gold: rgba(232, 196, 106, 0.18);
  --border-gold-bright: rgba(232, 196, 106, 0.5);
  --gold: #e8c46a;
  --gold-light: #f5dc96;
  --text-main: #e2ded4;
  --text-dim: #8b95a8;
  --cyan: #4ec9b0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Noto Serif SC', 'Songti SC', 'Source Han Serif SC', serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
aside.sidebar {
  width: 340px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-gold);
  padding: 24px 16px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  flex-shrink: 0;
}

.brand {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 20px;
}

.brand-title {
  font-family: 'Cinzel', 'Noto Serif SC', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 2px;
  display: block;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  margin-top: 4px;
}

.nav-group {
  margin-bottom: 16px;
}

.nav-group summary {
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gold);
  padding: 6px 8px;
  border-radius: 4px;
  user-select: none;
  transition: background 0.2s;
}

.nav-group summary:hover {
  background: var(--bg-card);
}

.nav-group ul {
  list-style: none;
  margin-left: 12px;
  margin-top: 6px;
  border-left: 1px solid rgba(232, 196, 106, 0.12);
  padding-left: 8px;
}

.nav-group li {
  margin-bottom: 6px;
}

.nav-group li a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  display: block;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1.4;
  transition: all 0.2s;
}

.nav-group li a:hover {
  color: var(--gold-light);
  background: var(--bg-card);
  padding-left: 10px;
}

/* Main Viewport */
main.main-viewport {
  flex: 1;
  max-width: 960px;
  padding: 48px 48px 80px 48px;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  border: 1px solid var(--border-gold);
  background: radial-gradient(circle at top right, rgba(232, 196, 106, 0.08) 0%, transparent 70%), var(--bg-card);
  padding: 36px;
  border-radius: 12px;
  margin-bottom: 28px;
}

.hero-tag {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Cinzel', serif;
}

.hero-title {
  font-size: 2.2rem;
  color: var(--gold-light);
  margin: 12px 0;
  font-weight: 700;
  border: none;
  padding: 0;
}

.hero-desc {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Popout Special Assets Banner */
.popout-section {
  margin-bottom: 36px;
}

.popout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.popout-card {
  position: relative;
  background: linear-gradient(135deg, rgba(232, 196, 106, 0.07) 0%, rgba(78, 201, 176, 0.05) 100%), var(--bg-sidebar);
  border: 1.5px solid var(--border-gold-bright);
  border-radius: 12px;
  padding: 24px 22px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(232, 196, 106, 0.2);
  display: flex;
  flex-direction: column;
}

.popout-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--gold-light);
  box-shadow: 0 14px 32px rgba(232, 196, 106, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(232, 196, 106, 0.12) 0%, rgba(78, 201, 176, 0.09) 100%), var(--bg-sidebar);
}

.popout-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
  background: rgba(232, 196, 106, 0.12);
  border: 1px solid rgba(232, 196, 106, 0.35);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.popout-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.popout-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.popout-action {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.popout-card:hover .popout-action {
  color: var(--gold-light);
}

.nav-group-special summary {
  color: #4ec9b0 !important;
  background: rgba(78, 201, 176, 0.08);
  border: 1px solid rgba(78, 201, 176, 0.2);
}

.nav-group-special li a {
  color: #c5efe7 !important;
  font-weight: 600;
}

.nav-group-special li a:hover {
  color: #fff !important;
  background: rgba(78, 201, 176, 0.15) !important;
}

/* Cards Grid & Season Sections */
.grid-section {
  margin-top: 36px;
}

.season-meta {
  margin-bottom: 20px;
}

.season-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  background: rgba(232, 196, 106, 0.12);
  border: 1px solid rgba(232, 196, 106, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-family: 'Cinzel', monospace;
}

.season-badge-s2 {
  color: var(--cyan);
  background: rgba(78, 201, 176, 0.12);
  border-color: rgba(78, 201, 176, 0.35);
}

.season-badge-s3 {
  color: #9d8cd7;
  background: rgba(157, 140, 215, 0.12);
  border-color: rgba(157, 140, 215, 0.35);
}

.grid-title {
  font-size: 1.3rem;
  color: var(--gold);
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.season-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-placeholder {
  border-style: dashed;
  opacity: 0.75;
}

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

.card {
  border: 1px solid var(--border-gold);
  background: var(--bg-card);
  padding: 18px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-title {
  color: var(--gold-light);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-snippet {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Article Page */
article.article-view h1 {
  font-size: 2rem;
  color: var(--gold-light);
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.article-body {
  font-size: 1.05rem;
}

.article-body h2 {
  font-size: 1.4rem;
  color: var(--gold);
  margin-top: 2em;
  margin-bottom: 0.8em;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 6px;
}

.article-body h3 {
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.article-body p {
  margin-bottom: 1.6em;
  text-align: justify;
}

.article-body blockquote {
  border-left: 3px solid var(--gold);
  background: var(--bg-card);
  padding: 14px 20px;
  margin: 1.8em 0;
  border-radius: 0 8px 8px 0;
  color: #cfd6e6;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
}

.article-body th, .article-body td {
  border: 1px solid var(--border-gold);
  padding: 10px 14px;
}

.article-body th {
  background-color: var(--bg-sidebar);
  color: var(--gold);
}

@media (max-width: 860px) {
  .app-layout { flex-direction: column; }
  aside.sidebar { width: 100%; height: auto; position: static; }
  main.main-viewport { padding: 24px 16px; }
}
