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

:root {
  --bg: #fafafa;
  --text: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #eee;
  --divider: #333;
  --hover: #000;
  --card-bg: #fff;
}

.dark {
  --bg: #1a1a1a;
  --text: #e0e0e0;
  --text-secondary: #999;
  --text-muted: #666;
  --border: #333;
  --divider: #666;
  --hover: #fff;
  --card-bg: #222;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

h1 {
  font-size: 2.2rem;
  font-weight: 300;
  margin-bottom: 15px;
  letter-spacing: 3px;
}

.divider {
  width: 40px;
  height: 1px;
  background: var(--divider);
  margin: 40px 0;
  transition: background 0.3s ease;
}

.footer {
  margin-top: 60px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

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

/* Theme Switch */
.theme-switch {
  position: absolute;
  top: 30px;
  right: 30px;
}

.theme-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

.theme-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-btn .icon-system,
.theme-btn .icon-light,
.theme-btn .icon-dark {
  display: none;
}

[data-theme="system"] .icon-system { display: block; }
[data-theme="light"] .icon-light { display: block; }
[data-theme="dark"] .icon-dark { display: block; }

.theme-panel {
  position: absolute;
  top: 50px;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  min-width: 140px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dark .theme-panel {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.theme-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.theme-option:hover {
  background: var(--border);
}

.theme-option.active {
  color: var(--text);
  font-weight: 500;
}

.theme-option svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .theme-switch {
    top: 20px;
    right: 20px;
  }
}