:root {
  --bg-color: #06070a;
  --surface-color: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --text-color: #f2f2f7;
  --text-muted: #a1a1aa;
  --neon-cyan: #00f2fe;
  --neon-blue: #4facfe;
  --focus-ring: #00f2fe;
  --error-color: #ff4a4a;
  
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;
  
  --font-base: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .brand-name, .nav-links a {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-color);
}

h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: var(--sp-24); }
h2 { font-size: 2rem; line-height: 1.3; margin-bottom: var(--sp-16); margin-top: var(--sp-40); }
h3 { font-size: 1.5rem; line-height: 1.4; margin-bottom: var(--sp-16); }

p {
  margin: 0 0 var(--sp-16) 0;
}

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

a:hover {
  color: var(--neon-blue);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-24);
}

/* Header */
.site-header {
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 7, 10, 0.8);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-color);
}

.brand svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: url(#neon-grad);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

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

.nav-links {
  display: flex;
  gap: var(--sp-24);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-16);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  background: var(--surface-color);
  color: var(--text-color);
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: #000;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  color: #000;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: var(--sp-8);
}

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

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

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 60vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(6, 7, 10, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

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

/* Sections */
.section {
  padding: var(--sp-64) 0;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--sp-40);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-child {
  min-width: 0;
}

/* Card Style: Glass overlay */
.card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  height: 360px;
  background: var(--surface-color);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-24);
  background: rgba(6, 7, 10, 0.7);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.card-overlay::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .card-overlay::before {
  opacity: 1;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

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

/* Stats */
.stat-block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Articles */
.article-header {
  margin-bottom: var(--sp-64);
  text-align: center;
}

.article-hero-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: var(--sp-40);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.article-content p {
  font-size: 1.125rem;
  margin-bottom: var(--sp-24);
  color: #d1d1d6;
}

.article-content ul, .article-content ol {
  font-size: 1.125rem;
  color: #d1d1d6;
  margin-bottom: var(--sp-24);
  padding-left: var(--sp-24);
}

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

/* Glass Panels */
.glass-panel {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--sp-40);
  border-radius: 12px;
  position: relative;
}

.glass-panel.neon-edge::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Forms */
.form-group {
  margin-bottom: var(--sp-24);
}

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

.form-control {
  width: 100%;
  padding: var(--sp-12) var(--sp-16);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: var(--text-color);
  font-family: var(--font-base);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.2);
}

.form-control.is-invalid {
  border-color: var(--error-color);
}

.error-message {
  display: none;
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: var(--sp-4);
}

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

/* Map Block */
.map-block {
  width: 100%;
  height: 300px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 10px,
    rgba(255, 255, 255, 0.05) 10px,
    rgba(255, 255, 255, 0.05) 20px
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-12);
  color: var(--text-muted);
}

.map-block svg {
  width: 32px;
  height: 32px;
  fill: var(--neon-cyan);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--sp-24);
  background: var(--surface-color);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

th, td {
  padding: var(--sp-16);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
  background: rgba(0, 0, 0, 0.2);
  font-weight: 600;
  color: var(--text-color);
}

tr:last-child td {
  border-bottom: none;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: rgba(6, 7, 10, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--sp-64) 0 var(--sp-40) 0;
}

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

.footer-col h4 {
  margin-bottom: var(--sp-16);
  font-size: 1.125rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer-bottom {
  padding-top: var(--sp-24);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-16);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--neon-blue);
  padding: var(--sp-24);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}

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

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

.cookie-text {
  flex: 1 1 300px;
  min-width: 0;
}

.cookie-text p {
  margin: 0;
  font-size: 0.9rem;
}

.cookie-actions {
  display: flex;
  gap: var(--sp-12);
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    height: 52px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-main {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(6, 7, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    padding: var(--sp-24);
    gap: var(--sp-24);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
  }
  
  .nav-main.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .hero {
    padding: var(--sp-40) 0;
  }
  
  h1 { font-size: 2rem; }
  
  .glass-panel.neon-edge::before {
    display: none; /* Disable negative offset decorative element on mobile */
  }
  .glass-panel {
    border: 1px solid var(--neon-cyan);
  }
}

@media (max-width: 399px) {
  .site-header {
    height: 48px;
  }
  
  .nav-main {
    top: 48px;
  }
  
  .container {
    padding: 0 var(--sp-16);
  }
  
  .card {
    height: 300px;
  }
  
  .btn {
    width: 100%;
  }
  
  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .cookie-actions .btn {
    width: 100%;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}