:root {
  --color-bg: #050508;
  --color-panel: rgba(20, 22, 35, 0.4);
  --color-panel-hover: rgba(30, 34, 55, 0.6);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-accent: rgba(0, 242, 254, 0.4);
  --color-text-main: #e2e4ec;
  --color-text-muted: #9ba1b5;
  --color-accent-1: #00f2fe;
  --color-accent-2: #4facfe;
  --color-error: #ff5e5e;
  
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;

  --font-base: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

html {
  lang: en;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-base);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(79, 172, 254, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 10%, rgba(0, 242, 254, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent-1);
  outline-offset: 4px;
  border-radius: var(--space-4);
}

@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;
  }
}

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

h1 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
p { margin-top: 0; margin-bottom: var(--space-24); }
a { color: var(--color-accent-1); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-accent-2); }

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent-1), var(--color-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.section {
  padding: var(--space-64) 0;
}

.grid {
  display: grid;
  gap: var(--space-40);
  min-width: 0;
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* Glassmorphism Classes */
.glass-panel {
  background: var(--color-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-panel-neon:hover {
  border-color: var(--color-border-accent);
  box-shadow: 0 8px 32px 0 rgba(0, 242, 254, 0.1), inset 0 0 16px 0 rgba(0, 242, 254, 0.05);
}

/* Header */
.site-header {
  height: 64px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
}

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

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

.logo svg {
  width: 32px;
  height: 32px;
}

.nav-menu {
  display: flex;
  gap: var(--space-24);
}

.nav-link {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.header-cta {
  display: flex;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-24);
  background: var(--color-panel);
  border: 1px solid var(--color-border-accent);
  color: var(--color-accent-1);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn:hover {
  background: rgba(0, 242, 254, 0.1);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
  color: #ffffff;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-1), var(--color-accent-2));
  color: var(--color-bg);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent-2), var(--color-accent-1));
  color: var(--color-bg);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

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

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

/* Glass Overlay Card Style */
.card-glass-overlay {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  aspect-ratio: 4/3;
  display: block;
  transition: transform 0.3s ease, border-color 0.3s ease;
  min-width: 0;
}

.card-glass-overlay:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-accent);
}

.card-glass-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-glass-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-24);
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  transition: background 0.3s ease;
}

.card-glass-overlay:hover .card-glass-content {
  background: rgba(5, 5, 8, 0.85);
  border-top-color: var(--color-border-accent);
}

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

.card-meta {
  font-size: 0.875rem;
  color: var(--color-accent-1);
  display: flex;
  gap: var(--space-12);
}

/* Specific Content Areas */
main {
  flex: 1;
}

.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-64) 0;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-glow {
  position: absolute;
  top: 50%;
  right: -10%;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, transparent 60%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

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

.article-meta {
  color: var(--color-accent-2);
  margin-bottom: var(--space-24);
  font-weight: 600;
}

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

.article-content h2 {
  margin-top: var(--space-64);
  margin-bottom: var(--space-24);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-8);
}

.article-content h3 {
  margin-top: var(--space-40);
  color: var(--color-text-main);
}

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

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

.stat-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
  padding: var(--space-24);
  margin: var(--space-40) 0;
  border-left: 4px solid var(--color-accent-1);
  background: var(--color-panel);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
}

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

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-40);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

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

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

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

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

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

.form-control {
  width: 100%;
  padding: var(--space-16);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-base);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-control.is-invalid {
  border-color: var(--color-error);
  box-shadow: 0 0 8px rgba(255, 94, 94, 0.3);
}

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

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

.form-success {
  display: none;
  padding: var(--space-24);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--color-accent-1);
  border-radius: var(--radius-sm);
  color: #fff;
  margin-bottom: var(--space-24);
}

.form-success.is-visible {
  display: block;
}

/* Map Block */
.map-block {
  width: 100%;
  height: 300px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.map-block svg {
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.map-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-accent-1);
  text-align: center;
}

/* Footer */
.site-footer {
  background: #020203;
  border-top: 1px solid var(--color-border);
  padding: var(--space-64) 0 var(--space-40);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-40);
  margin-bottom: var(--space-40);
}

.footer-title {
  color: #ffffff;
  font-size: 1.125rem;
  margin-bottom: var(--space-16);
}

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

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

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

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

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

.footer-bottom-links {
  display: flex;
  gap: var(--space-16);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: var(--space-24);
  left: var(--space-24);
  right: var(--space-24);
  z-index: 1000;
  padding: var(--space-24);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.cookie-banner[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto;
  }
}

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

/* Responsive */
@media (max-width: 767px) {
  .site-header {
    height: 52px;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--space-24);
    gap: var(--space-16);
  }

  .nav-menu.is-visible {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-glow {
    display: none;
  }
}

@media (max-width: 399px) {
  :root {
    --space-64: 40px;
    --space-40: 24px;
    --space-24: 16px;
  }
  
  .grid-cols-2, .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .stat-block {
    flex-direction: column;
    gap: var(--space-4);
  }
}