:root {
  --bg: #0f1513;
  --bg-elevated: #17211e;
  --text: #e6e8eb;
  --muted: #9aa0aa;
  --accent: #4fff4f;
  --border: #25342b;
}

body.theme-light {
  --bg: #f6f7fb;
  --bg-elevated: #ffffff;
  --text: #101419;
  --muted: #5a6573;
  --accent: #1b6bff;
  --border: #e2e6ee;
}

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

body {
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -200px, #1b2030 0%, var(--bg) 60%);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
}

.sidebar {
  display: none;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
}

.sidebar h2 {
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.primary-nav {
  display: flex;
  gap: 16px;
}

.primary-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.sidebar .primary-nav {
  flex-direction: column;
  gap: 14px;
}

/* Top Navigation */
header {
  height: 64px;
  background: rgba(23, 33, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-actions a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

main.home {
  align-items: flex-start;
  flex-direction: column;
  gap: 28px;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.hero {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.hero p {
  color: var(--muted);
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feed-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 18px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feed-card:hover {
  transform: translateY(-4px) scale(1.33);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.feed-image {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0c0f14;
}

.feed-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.feed-card h3 {
  font-size: 1rem;
  margin: 10px 0 8px;
}

.feed-card a {
  color: var(--text);
  text-decoration: none;
}

.feed-card a:hover {
  color: var(--accent);
}

.feed-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

.feed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 600;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  /* border-radius: 16px; */
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 24px;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  /* border-radius: 10px; */
  border: 1px solid var(--border);
  background: #0c0f14;
  color: var(--text);
  font-size: 0.95rem;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  width: 100%;
  padding: 12px 14px;
  /* border-radius: 10px; */
  border: none;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79, 140, 255, 0.35);
}

.donate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease;
}

.donate-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(79, 140, 255, 0.2);
  color: var(--accent);
}

.footer-text {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.status {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  font-weight: 500;
}

.status--success {
  color: #7dff9b;
  border-color: rgba(79, 255, 79, 0.35);
  background: rgba(79, 255, 79, 0.08);
}

.status--error {
  color: #ff9b9b;
  border-color: rgba(255, 95, 95, 0.35);
  background: rgba(255, 95, 95, 0.08);
}

.status--loading {
  color: #9fc6ff;
  border-color: rgba(79, 140, 255, 0.35);
  background: rgba(79, 140, 255, 0.08);
  animation: statusPulse 1.2s ease-in-out infinite;
}

@keyframes statusPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(79, 140, 255, 0.25);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 0 24px rgba(79, 140, 255, 0.25);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(79, 140, 255, 0.25);
  }
}

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

@media (max-width: 480px) {
  header {
    padding: 0 20px;
  }
}

@media (min-width: 900px) {
  .app-shell {
    flex-direction: row;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: 220px;
  }

  .primary-nav--header {
    display: none;
  }
}
