:root {
  --bg-color: #050508;
  --panel-bg: rgba(20, 20, 30, 0.4);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text-main: #f0f0f5;
  --text-muted: #9ca3af;
  --accent-neon: #00f2fe;
  --accent-purple: #9b51e0;
  --glass-blur: 16px;
  
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;
  --space-128: 128px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent body scroll, layout uses CSS Grid/Flexbox properly */
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .brand-name, .nav-link {
  overflow-wrap: anywhere;
  margin-top: 0;
  margin-bottom: var(--space-24);
  color: #ffffff;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  margin-top: var(--space-64);
}

p {
  margin-top: 0;
  margin-bottom: var(--space-24);
}

a {
  color: var(--accent-neon);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px var(--accent-neon);
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--accent-neon);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Layout Elements */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-24);
  min-width: 0;
}

/* Header */
.site-header {
  position: relative; /* Not sticky as requested */
  height: 64px;
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
}

.logo-area svg {
  width: 24px;
  height: 24px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-24);
}

.nav-link {
  color: var(--text-main);
  font-weight: 500;
  margin: 0;
}

.header-cta {
  background: linear-gradient(135deg, var(--accent-neon), var(--accent-purple));
  color: #fff;
  padding: var(--space-8) var(--space-16);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.header-cta:hover {
  text-shadow: none;
  box-shadow: 0 0 12px var(--accent-neon);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--space-8);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 64px - 300px);
  padding: var(--space-64) 0;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--space-64) 0 var(--space-128) 0;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(155,81,224,0.15) 0%, rgba(0,242,254,0.05) 40%, rgba(5,5,8,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-size: 3.5rem;
  max-width: 800px;
  margin: 0 auto var(--space-24) auto;
  background: linear-gradient(to right, #fff, var(--accent-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Card Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-40);
  margin-top: var(--space-64);
  min-width: 0;
}

/* Glass Overlay Card Style */
.glass-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  text-decoration: none;
  color: #fff;
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease;
  min-width: 0;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-neon);
  color: #fff;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  z-index: 3;
  pointer-events: none;
}

.glass-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.5s ease;
}

.glass-card:hover img {
  transform: scale(1.05);
}

.glass-card-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(to top, rgba(5,5,8,0.9) 0%, rgba(5,5,8,0.6) 60%, transparent 100%);
  padding: var(--space-64) var(--space-24) var(--space-24) var(--space-24);
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.glass-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-8);
  color: #fff;
}

.glass-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Article Styling */
.article-header {
  margin-bottom: var(--space-64);
  text-align: center;
}

.article-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: var(--space-40);
  border: 1px solid var(--panel-border);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  color: var(--accent-neon);
}

.article-content ul, .article-content ol {
  margin-bottom: var(--space-24);
  padding-left: var(--space-24);
}

.article-content li {
  margin-bottom: var(--space-8);
}

/* Supporting Section */
.support-section {
  background: var(--panel-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: var(--space-64) var(--space-40);
  margin-top: var(--space-128);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.support-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-purple), var(--accent-neon), transparent);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-24);
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: 500;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: #fff;
  padding: var(--space-12) var(--space-16);
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-neon);
  background: rgba(255, 255, 255, 0.1);
}

.form-control.is-invalid {
  border-color: #ff4d4f;
}

.error-msg {
  display: none;
  color: #ff4d4f;
  font-size: 0.85rem;
  margin-top: var(--space-4);
}

.is-invalid + .error-msg {
  display: block;
}

.btn-submit {
  background: linear-gradient(135deg, var(--accent-neon), var(--accent-purple));
  color: #fff;
  padding: var(--space-12) var(--space-24);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
}

.btn-submit:hover {
  opacity: 0.9;
}

/* Map Block (CSS styled) */
.static-map {
  width: 100%;
  height: 300px;
  background: #111;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-40);
}

.static-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.map-marker {
  position: relative;
  z-index: 10;
  width: 24px;
  height: 24px;
  background: var(--accent-neon);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--accent-neon);
  border: 4px solid #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--panel-border);
  background: rgba(5, 5, 8, 0.9);
  padding: var(--space-64) 0 var(--space-40) 0;
  margin-top: var(--space-64);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-40);
  margin-bottom: var(--space-40);
  min-width: 0;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: var(--space-16);
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-8);
}

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

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

.footer-bottom {
  text-align: center;
  padding-top: var(--space-24);
  border-top: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--panel-border);
  padding: var(--space-24);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}

.cookie-text {
  flex: 1 1 300px;
  font-size: 0.9rem;
  margin: 0;
}

.cookie-actions {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.cookie-btn {
  padding: var(--space-8) var(--space-16);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.cookie-btn.primary {
  background: var(--accent-neon);
  color: #000;
  border-color: var(--accent-neon);
}

.cookie-btn:hover {
  background: rgba(255,255,255,0.1);
}

.cookie-btn.primary:hover {
  background: #fff;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-24);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: var(--space-12) var(--space-16);
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
}

th {
  background: rgba(255,255,255,0.02);
  font-weight: 600;
  color: #fff;
}

/* Stats */
.stat-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-neon);
}

.stat-label {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Media Queries */
@media (max-width: 768px) {
  .site-header {
    height: 52px;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    flex-direction: column;
    padding: var(--space-24);
    border-bottom: 1px solid var(--panel-border);
  }
  
  .main-nav.is-visible {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }

  .header-cta {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .support-section {
    padding: var(--space-40) var(--space-24);
  }

  .glass-card::before {
    box-shadow: none;
  }
}

@media (max-width: 399px) {
  .guides-grid {
    grid-template-columns: 1fr;
  }
  
  .glass-card {
    min-height: 280px;
  }

  .cookie-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .cookie-btn {
    width: 100%;
  }
}

@media prefers-reduced-motion: reduce {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}