:root {
  --bg-dark: #0a0d12;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.4);
  --accent-light: #fbbf24;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --border: #1f2937;
  --success: #10b981;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0f1419 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ---- Navigation ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 2rem;
  background: rgba(10, 13, 18, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

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

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
  color: var(--accent);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 220px;
  display: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.nav-dropdown-menu a:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  min-height: 2.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(0); box-shadow: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #000;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--accent-glow);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- Main Content ---- */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 100px;
  padding-left: 2rem;
  padding-right: 2rem;
  min-height: calc(100vh - 100px);
}
main.no-main-padding {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}
main.full-width {
  max-width: none;
}

/* ---- Footer ---- */
footer {
  padding: 2.5rem 2rem 3rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
  text-align: center;
  margin-top: 4rem;
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    background: rgba(10, 13, 18, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1.25rem;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.55rem 0; font-size: 0.95rem; }
  .nav-links .btn { width: 100%; margin-top: 0.6rem; }
  .nav-links .nav-dropdown-menu {
    position: static;
    left: auto;
    transform: none;
    display: block;
    min-width: 0;
    margin-top: 0.25rem;
    padding: 0.25rem 0;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
  }
  .nav-links .nav-dropdown-toggle {
    justify-content: space-between;
    width: 100%;
    padding: 0.55rem 0;
  }
  .mobile-menu-btn { display: block; }
  .footer-links { gap: 1rem 1.25rem; }
  main { padding-left: 1.25rem; padding-right: 1.25rem; }
  .flash-stack { left: 1rem; right: 1rem; max-width: none; }
}

/* ---- Utility ---- */
.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.page-header h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

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

/* ---- Accessibility / polish ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: rgba(245, 158, 11, 0.35);
  color: #fff;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
