/* ============================================
   The Call of the Stars — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&family=Noto+Serif+SC:wght@400;600;700&display=swap');

/* --- Custom Properties --- */
:root {
  --cosmos-deep: #060a14;
  --cosmos-dark: #0a0e1a;
  --cosmos-mid: #101832;
  --cosmos-blue: #1a2542;
  --nebula-blue: #2a3f6f;
  --star-gold: #d4a853;
  --star-gold-soft: #c9a04a;
  --star-gold-glow: rgba(212, 168, 83, 0.15);
  --star-gold-bright: #e8c474;
  --text-primary: #e8e4df;
  --text-secondary: rgba(232, 228, 223, 0.7);
  --text-muted: rgba(232, 228, 223, 0.45);
  --glass-bg: rgba(16, 24, 50, 0.55);
  --glass-border: rgba(212, 168, 83, 0.12);
  --font-serif: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --section-padding: clamp(80px, 12vh, 140px);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--cosmos-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--star-gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--star-gold-bright); }

/* --- Star Canvas Background --- */
#star-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s, padding 0.4s;
}

.site-nav.scrolled {
  background: rgba(6, 10, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 40px;
  border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--star-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--star-gold);
  transition: width 0.4s var(--ease-out-expo);
}

.nav-links a:hover { color: var(--star-gold); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.15s; }
.fade-in-delay-2 { transition-delay: 0.3s; }
.fade-in-delay-3 { transition-delay: 0.45s; }
.fade-in-delay-4 { transition-delay: 0.6s; }

/* --- Section Base --- */
section {
  position: relative;
  z-index: 1;
  padding: var(--section-padding) 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--star-gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--star-gold);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.section-divider {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, var(--star-gold), transparent);
  margin: 60px auto;
}

/* ============================================
   Section 1: Hero
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: heroFadeIn 2s 0.5s forwards;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: heroFadeIn 2s 1s forwards;
}

.hero-title span {
  display: block;
  font-size: 0.35em;
  letter-spacing: 0.2em;
  color: var(--star-gold);
  font-weight: 400;
  margin-top: 8px;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: heroFadeIn 1.5s 1.8s forwards;
}

.hero-subtitle em {
  font-style: normal;
  color: var(--star-gold-soft);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: heroFadeIn 1s 2.5s forwards;
}

.hero-scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--star-gold), transparent);
  animation: scrollPulse 2s infinite;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================
   Section 2: The Story
   ============================================ */
.story {
  background: linear-gradient(180deg, transparent, rgba(16, 24, 50, 0.3), transparent);
}

.story-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.story-cover {
  position: relative;
}

.story-cover img {
  border-radius: 4px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px var(--star-gold-glow);
  transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s;
}

.story-cover:hover img {
  transform: translateY(-4px);
  box-shadow:
    0 28px 80px rgba(0,0,0,0.6),
    0 0 120px rgba(212, 168, 83, 0.2);
}

/* --- Editors' Pick Badge (Story Section) --- */
.editors-pick-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.12), rgba(212, 168, 83, 0.04));
  border: 1px solid rgba(212, 168, 83, 0.35);
  border-radius: 4px;
  padding: 10px 18px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--star-gold);
}

.editors-pick-badge .pick-icon {
  font-size: 1rem;
  color: var(--star-gold-bright);
  filter: drop-shadow(0 0 4px rgba(212, 168, 83, 0.5));
}

.editors-pick-badge .pick-note {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.78rem;
}

/* --- Edition Badge --- */
.edition-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.15), rgba(212, 168, 83, 0.05));
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 3px;
  padding: 5px 12px;
  margin-bottom: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--star-gold);
}

.story-text p {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.story-text .highlight {
  color: var(--text-primary);
  font-weight: 400;
}

.story-meta {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.story-meta-item {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.story-meta-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid var(--star-gold);
  color: var(--star-gold);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.4s var(--ease-out-expo);
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--star-gold);
  color: var(--cosmos-deep);
}

.btn-primary svg {
  width: 14px; height: 14px;
  transition: transform 0.3s;
}

.btn-primary:hover svg { transform: translateX(4px); }

/* ============================================
   Section 3: Excerpts
   ============================================ */
.excerpts {
  padding: var(--section-padding) 0;
}

.excerpt-item {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.excerpt-item:last-child { border-bottom: none; }

.excerpt-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 20px;
  position: relative;
}

.excerpt-quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--star-gold);
  opacity: 0.3;
  position: absolute;
  top: -30px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
}

.excerpt-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================
   Section 4: Dreams
   ============================================ */
.dreams {
  background: linear-gradient(180deg, transparent, rgba(16, 24, 50, 0.4), transparent);
}

.dreams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.dream-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 36px 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.5s var(--ease-out-expo), border-color 0.4s, box-shadow 0.4s;
  cursor: default;
}

.dream-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 168, 83, 0.3);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 60px var(--star-gold-glow);
}

.dream-icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.dream-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--star-gold);
  margin-bottom: 4px;
}

.dream-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.dream-desc {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ============================================
   Section 5: Co-Creation
   ============================================ */
.cocreation-intro {
  max-width: 700px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.cocreation-quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.ai-quote-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.ai-quote-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--star-gold), transparent);
  opacity: 0.5;
}

.ai-quote-source {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--star-gold);
  margin-bottom: 16px;
  font-weight: 500;
}

.ai-quote-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-primary);
}

.cocreation-timeline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  padding: 32px 0;
}

.timeline-node {
  text-align: center;
  position: relative;
}

.timeline-version {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--star-gold);
  letter-spacing: 0.05em;
}

.timeline-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.timeline-dot {
  width: 10px; height: 10px;
  background: var(--star-gold);
  border-radius: 50%;
  margin: 10px auto;
  box-shadow: 0 0 12px var(--star-gold-glow);
}

.timeline-line {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, var(--star-gold), rgba(212,168,83,0.3));
  align-self: center;
  margin: 0 8px;
  margin-top: -8px;
}

/* ============================================
   Section 6: Author
   ============================================ */
.author {
  background: linear-gradient(180deg, transparent, rgba(20, 16, 10, 0.2), transparent);
}

.author-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.author-photo {
  position: relative;
}

.author-photo img {
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.author-photo::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  pointer-events: none;
}

.author-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 6px;
}

.author-name-cn {
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.author-bio {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.author-bio p { margin-bottom: 16px; }

.author-contact {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.author-contact a { color: var(--star-gold); }

/* ============================================
   Section 7: Editions
   ============================================ */
.editions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.edition-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.5s var(--ease-out-expo), border-color 0.4s;
}

.edition-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 168, 83, 0.3);
}

.edition-cover {
  width: 160px;
  margin: 0 auto 24px;
  border-radius: 3px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.edition-lang {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.edition-format {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.edition-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 0.75rem;
  margin-top: 0;
}

/* ============================================
   Section 8: Footer
   ============================================ */
.site-footer {
  padding: 60px 0 40px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.footer-star {
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.footer-quote {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-copy a { color: var(--text-muted); }
.footer-copy a:hover { color: var(--star-gold); }

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; text-align: center; }
  .story-cover { max-width: 260px; margin: 0 auto; }
  .dreams-grid { grid-template-columns: 1fr; }
  .cocreation-quotes { grid-template-columns: 1fr; }
  .author-grid { grid-template-columns: 1fr; text-align: center; }
  .author-photo { max-width: 200px; margin: 0 auto; }
  .editions-grid { grid-template-columns: 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
  .cocreation-timeline { flex-wrap: wrap; gap: 8px; }
  .timeline-line { width: 30px; }
}

@media (max-width: 768px) {
  .site-nav { padding: 16px 20px; }
  .site-nav.scrolled { padding: 12px 20px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(6, 10, 20, 0.95);
    backdrop-filter: blur(16px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
  }
  .nav-toggle { display: flex; }
  .story-meta { flex-direction: column; gap: 16px; }
  .section-label { justify-content: center; }
}

/* ============================================
   Dynamic Blog & Article System Styling
   ============================================ */

/* Blog Hero */
.blog-hero {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 24px 20px;
  background: linear-gradient(180deg, var(--cosmos-deep), rgba(16, 24, 50, 0.4));
  border-bottom: 1px solid var(--glass-border);
}

.blog-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.blog-hero-title span {
  display: block;
  font-size: 0.35em;
  letter-spacing: 0.2em;
  color: var(--star-gold);
  font-weight: 400;
  margin-top: 8px;
}

.blog-hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Blog Layout Container */
.blog-container {
  max-width: 850px;
  margin: 0 auto;
  padding: 60px clamp(20px, 4vw, 40px) 100px;
  position: relative;
  z-index: 2;
}

/* Admin Actions Bar */
.admin-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 16px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

.admin-welcome {
  font-size: 0.85rem;
  color: var(--star-gold);
}

.admin-buttons {
  display: flex;
  gap: 12px;
}

/* Blog Feed / Article Cards */
.blog-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.article-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 40px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.5s var(--ease-out-expo), border-color 0.4s, box-shadow 0.4s;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 168, 83, 0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 60px var(--star-gold-glow);
}

.article-card-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.article-card-title a {
  color: var(--text-primary);
}

.article-card-title a:hover {
  color: var(--star-gold-bright);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta span::after {
  content: '·';
  margin-left: 16px;
}

.article-meta span:last-child::after {
  content: '';
}

.article-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.article-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-card-admin-controls {
  display: flex;
  gap: 12px;
}

/* Article Detail View */
.article-detail {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 50px clamp(24px, 6vw, 60px);
  backdrop-filter: blur(12px);
  margin-bottom: 48px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--star-gold);
  margin-bottom: 32px;
  transition: transform 0.3s;
}

.btn-back:hover {
  transform: translateX(-4px);
  color: var(--star-gold-bright);
}

.article-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.article-detail-content {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.9;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 32px;
}

.article-detail-content p {
  margin-bottom: 24px;
  white-space: pre-wrap;
}

/* Comments Section */
.comments-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: clamp(24px, 5vw, 50px);
  backdrop-filter: blur(12px);
}

.comments-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--star-gold);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.comment-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 20px;
}

.comment-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.comment-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.comment-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* Comment Form */
.comment-form-container {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 40px;
}

.comment-form-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Inputs & Form Controls */
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 14, 26, 0.65);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--star-gold);
  box-shadow: 0 0 10px rgba(212, 168, 83, 0.25);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Button Variants */
.btn-small {
  padding: 8px 16px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  margin-top: 0;
  border-radius: 3px;
}

.btn-secondary {
  border: 1px solid var(--text-muted);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--text-muted);
  color: var(--cosmos-deep);
}

.btn-danger {
  border: 1px solid rgba(220, 80, 80, 0.6);
  color: rgb(240, 120, 120);
}

.btn-danger:hover {
  background: rgba(220, 80, 80, 0.8);
  color: white;
  border-color: rgba(220, 80, 80, 0.8);
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out-expo);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--cosmos-mid);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  padding: 40px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 50px var(--star-gold-glow);
  transform: translateY(30px);
  transition: transform 0.4s var(--ease-out-expo);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 16px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--star-gold);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 16px;
}

/* Alerts and Messages */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(16, 24, 50, 0.9);
  border: 1px solid var(--star-gold);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: 4px;
  font-size: 0.88rem;
  z-index: 1100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(220, 80, 80, 0.6);
  color: rgb(240, 120, 120);
}

.toast.success {
  border-color: rgba(80, 220, 80, 0.6);
  color: rgb(120, 240, 120);
}

.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Responsive adjustments for Blog */
@media (max-width: 600px) {
  .article-card {
    padding: 24px;
  }
  .article-detail {
    padding: 30px 20px;
  }
  .comments-section {
    padding: 24px 20px;
  }
  .modal-content {
    padding: 24px;
  }
}

