/* A11yRank - Dark Sky Community Design System */
/* === A11yRank - Dark Sky Community Design System === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700;900&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette - Dark Sky Theme */
  --color-deep-navy: #0B1026;
  --color-night-blue: #101A3A;
  --color-midnight: #162044;
  --color-twilight: #1E2A54;
  --color-dusk: #2A3A6E;

  --color-star-gold: #E8C468;
  --color-star-gold-light: #F0D68A;
  --color-warm-orange: #E39B4E;
  --color-warm-orange-light: #EEB87A;

  --color-starlight: #E2E8F0;
  --color-stardust: #94A3B8;
  --color-nebula: #64748B;

  --color-card-bg: rgba(255, 255, 255, 0.04);
  --color-card-border: rgba(255, 255, 255, 0.08);
  --color-card-hover: rgba(255, 255, 255, 0.07);

  /* Typography */
  --font-serif: 'Noto Serif SC', 'Georgia', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --spacing-section: 5rem;
  --spacing-container: 75rem;
}

/* === Base Styles === */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-deep-navy);
  color: var(--color-starlight);
  line-height: 1.8;
  overflow-x: hidden;
}

/* === Typography Utilities === */
.prose-cosmic {
  color: var(--color-starlight);
  font-size: 1.0625rem;
  line-height: 1.9;
}

.prose-cosmic h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-star-gold);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.prose-cosmic h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-starlight);
  margin-top: 2.25rem;
  margin-bottom: 0.875rem;
}

.prose-cosmic h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-warm-orange);
  margin-top: 1.75rem;
  margin-bottom: 0.625rem;
}

.prose-cosmic p {
  margin-bottom: 1.25rem;
}

.prose-cosmic ul, .prose-cosmic ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose-cosmic li {
  margin-bottom: 0.5rem;
  position: relative;
}

.prose-cosmic li::marker {
  color: var(--color-star-gold);
}

.prose-cosmic blockquote {
  border-left: 3px solid var(--color-star-gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(232, 196, 104, 0.06);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
}

.prose-cosmic blockquote p:last-child {
  margin-bottom: 0;
}

.prose-cosmic strong {
  color: var(--color-warm-orange);
  font-weight: 600;
}

.prose-cosmic a {
  color: var(--color-star-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.prose-cosmic a:hover {
  color: var(--color-star-gold-light);
}

.prose-cosmic hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 196, 104, 0.3), transparent);
  margin: 3rem 0;
}

.prose-cosmic table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.prose-cosmic thead th {
  background: rgba(232, 196, 104, 0.12);
  color: var(--color-star-gold);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid rgba(232, 196, 104, 0.3);
}

.prose-cosmic tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.prose-cosmic tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.prose-cosmic .footnote-ref {
  color: var(--color-star-gold);
  font-size: 0.75rem;
  vertical-align: super;
  text-decoration: none;
}

/* === Component Classes === */

/* Star Divider */
.star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.star-divider::before,
.star-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(232, 196, 104, 0.3));
}

.star-divider::after {
  background: linear-gradient(90deg, rgba(232, 196, 104, 0.3), transparent);
}

.star-divider svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-star-gold);
  opacity: 0.6;
}

/* Big Number */
.big-number {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--color-star-gold);
  line-height: 1;
}

.big-number-label {
  color: var(--color-stardust);
  font-size: 0.9375rem;
  margin-top: 0.5rem;
}

/* Card */
.cosmic-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.cosmic-card:hover {
  background: var(--color-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232, 196, 104, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(30, 42, 84, 0.6) 0%, transparent 50%),
    linear-gradient(180deg, #0B1026 0%, #101A3A 40%, #162044 100%);
  z-index: 0;
}

/* Page Hero (smaller, for subpages) */
.page-hero {
  position: relative;
  padding: 6rem 0 3rem;
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 20%, rgba(232, 196, 104, 0.06) 0%, transparent 60%);
}

/* Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-star-gold), var(--color-warm-orange));
  color: var(--color-deep-navy);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(232, 196, 104, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(232, 196, 104, 0.4);
  color: var(--color-star-gold);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(232, 196, 104, 0.08);
  border-color: var(--color-star-gold);
}

/* Section Title */
.section-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-star-gold);
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--color-stardust);
  text-align: center;
  font-size: 1.0625rem;
  max-width: 36rem;
  margin: 0 auto 3rem;
}

/* Navigation */
.nav-link {
  color: var(--color-stardust);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-star-gold);
}

.nav-link-active {
  color: var(--color-star-gold);
}

/* Breadcrumb */
.breadcrumb a {
  color: var(--color-stardust);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--color-star-gold);
}

/* Accordion */
.accordion-trigger {
  width: 100%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 0.5rem;
  color: var(--color-starlight);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s, border-color 0.2s;
}

.accordion-trigger:hover {
  background: var(--color-card-hover);
  border-color: rgba(232, 196, 104, 0.3);
}

.accordion-trigger[aria-expanded="true"] {
  border-color: var(--color-star-gold);
  background: rgba(232, 196, 104, 0.08);
}

.accordion-icon {
  transition: transform 0.3s;
  color: var(--color-star-gold);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
}

.accordion-panel[hidden] {
  max-height: 0;
  opacity: 0;
}

/* Tabs */
.tab-list {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-trigger {
  padding: 0.75rem 1.5rem;
  color: var(--color-stardust);
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.tab-trigger:hover {
  color: var(--color-starlight);
}

.tab-trigger[aria-selected="true"] {
  color: var(--color-star-gold);
  border-bottom-color: var(--color-star-gold);
}

.tab-panel[hidden] {
  display: none;
}

/* Image Compare Slider */
.img-compare {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}

.img-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-star-gold);
  cursor: ew-resize;
  z-index: 10;
}

.img-compare-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-star-gold);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(232, 196, 104, 0.4);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  color: var(--color-starlight);
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-card-border);
  border-radius: 0.5rem;
  color: var(--color-starlight);
  font-family: var(--font-sans);
  transition: border-color 0.2s, background 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-star-gold);
  background: rgba(232, 196, 104, 0.06);
}

.form-error {
  color: #F87171;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-star-gold), var(--color-warm-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.star-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite;
}

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-deep-navy);
  z-index: 50;
  padding: 5rem 2rem 2rem;
}

.mobile-menu[hidden] {
  display: none;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-star-gold);
  color: var(--color-deep-navy);
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 100;
  transition: top 0.2s;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}
