:root {
  /* Backgrounds */
  --bg: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #eeeeee;
  --surface: #ffffff;
  /* Text */
  --text: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --gray: #86868b;
  /* Borders */
  --border: #e5e5e5;
  --ring: #e5e5ea;
  /* Buttons */
  --btn-bg: #1a1a1a;
  --btn-text: #ffffff;
  --link: #0066cc;
  /* State */
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #2e7d32;
  --success-bg: #e8f5e9;
  /* Misc */
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --bg-secondary: #262626;
    --bg-tertiary: #333333;
    --surface: #262626;
    --text: #e5e5e5;
    --text-secondary: #999999;
    --text-muted: #777777;
    --gray: #777777;
    --border: #333333;
    --ring: #444444;
    --btn-bg: #e5e5e5;
    --btn-text: #1a1a1a;
    --link: #4d9fff;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --success: #10d959;
    --success-bg: rgba(16, 217, 89, 0.1);
  }
}

[data-theme="dark"] {
  --bg: #1a1a1a;
  --bg-secondary: #262626;
  --bg-tertiary: #333333;
  --surface: #262626;
  --text: #e5e5e5;
  --text-secondary: #999999;
  --text-muted: #777777;
  --gray: #777777;
  --border: #333333;
  --ring: #444444;
  --btn-bg: #e5e5e5;
  --btn-text: #1a1a1a;
  --link: #4d9fff;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --success: #10d959;
  --success-bg: rgba(16, 217, 89, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Header Component */
.site-header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text);
}

.logo a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

@media (prefers-color-scheme: dark) {
  .logo img { filter: invert(1); }
}
[data-theme="dark"] .logo img { filter: invert(1); }

.yellow-marker {
  background: linear-gradient(to bottom, transparent 60%, rgba(255, 235, 59, 0.4) 40%);
  padding: 0 2px;
}

@media (prefers-color-scheme: dark) {
  .yellow-marker {
    background: linear-gradient(to bottom, transparent 10%, #10d959 0%);
    color: #000;
  }
}
[data-theme="dark"] .yellow-marker {
  background: linear-gradient(to bottom, transparent 10%, #10d959 0%);
  color: #000;
}

.logo-claim {
  color: var(--gray);
  font-weight: 400;
  font-size: 0.95rem;
  margin-left: 0.4rem;
}

@media (prefers-color-scheme: dark) {
  .logo-claim { color: #e5e5e5; }
}
[data-theme="dark"] .logo-claim { color: #e5e5e5; }

.auth-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* Generic Buttons */
.btn-action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 38px;
}

.btn-action:hover:not(:disabled):not(.primary) {
  background: var(--bg-secondary);
  border-color: var(--gray);
}

.btn-action.primary {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.btn-action.primary:hover:not(:disabled) {
  filter: brightness(1.2);
}

/* Footer Component */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 100%;
  margin-top: auto;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

/* Common Utilities */
.container {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}
