:root {
  /* Premium Dark Theme */
  --bg-color: #0d1117;
  --surface-color: #161b22;
  --surface-highlight: #1f2532;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;

  --gold-primary: #e8c84a;
  --gold-secondary: #f0d878;
  --gold-faint: rgba(232, 200, 74, 0.1);

  --accent-green: #3fb950;
  --accent-red: #ff7b72;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(232, 200, 74, 0.5);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(232, 200, 74, 0.15);

  --navbar-bg: rgba(22, 27, 34, 0.5);
  --body-bg-image: none;
  --btn-primary-bg: linear-gradient(135deg, var(--gold-secondary), var(--gold-primary));
  --btn-primary-color: #000;
  --btn-primary-hover-shadow: 0 8px 25px rgba(232, 200, 74, 0.3);
}

[data-theme="light"] {
  /* Paper & Ink Light Theme (User Custom) */
  --bg-color: #f5f0e8;
  --surface-color: #ede8db;
  --surface-highlight: #d9d3c4;
  --text-primary: #1a1710;
  --text-secondary: #8a8578;

  --gold-primary: #b8924a;
  --gold-secondary: #d4aa6a;
  --gold-faint: rgba(184, 146, 74, 0.1);

  --accent-green: #2a5040;
  --accent-red: #8b2020;

  --border-color: #d9d3c4;
  --border-focus: rgba(184, 146, 74, 0.5);

  --shadow-sm: 0 4px 12px rgba(26, 23, 16, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 23, 16, 0.12);
  --shadow-glow: 0 0 20px rgba(184, 146, 74, 0.2);

  --navbar-bg: rgba(245, 240, 232, 0.92);
  --body-bg-image: radial-gradient(ellipse at 20% 50%, rgba(184, 146, 74, 0.05) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(139, 32, 32, 0.03) 0%, transparent 50%);
  --btn-primary-bg: #1a1710;
  --btn-primary-color: #f5f0e8;
  --btn-primary-hover-shadow: 0 8px 25px rgba(26, 23, 16, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Serif SC', serif;
  background-color: var(--bg-color);
  background-image: var(--body-bg-image);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Base App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Premium Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--gold-primary);
}

.nav-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-highlight);
}

.nav-link.active {
  color: var(--gold-primary);
  background: var(--gold-faint);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Noto Serif SC', serif;
  line-height: 1.3;
}

/* Utilities */
.text-gold {
  color: var(--gold-primary);
}

.bg-surface {
  background: var(--surface-color);
}

.blur-backdrop {
  backdrop-filter: blur(8px);
}

/* Premium Buttons */
.btn-core {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: none;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 2px;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-primary-hover-shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: var(--gold-faint);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .nav-link {
    white-space: nowrap;
    font-size: 13px;
    padding: 6px 12px;
  }
}