:root {
  --bg-dark: #090D16;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --accent-blue: #0EA5E9;
  --accent-teal: #2563EB;
  --border-color: #1E293B;
  --gradient-primary: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-links a {
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* Common Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

h1, h2, h3 {
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Footer */
.main-footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem 2rem;
  background: #06090f;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-col h4 {
  color: var(--accent-blue);
  font-size: 1.1rem;
  font-weight: 600;
}

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

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-col ul a:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom .address {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* 404 Specific */
.error-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at center, #111827 0%, var(--bg-dark) 100%);
}

.stars {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('data:image/svg+xml;utf8,<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="1" fill="white" opacity="0.5"/><circle cx="150" cy="50" r="1.5" fill="white" opacity="0.8"/><circle cx="70" cy="120" r="1" fill="white" opacity="0.3"/></svg>') repeat;
  animation: twinkle 10s infinite alternate;
  z-index: -1;
}

@keyframes twinkle {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.error-404 {
  font-size: 8rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: rgba(9, 13, 22, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text-main);
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.warning-text {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Spinner */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(14, 165, 233, 0.1);
  border-left-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Alert Banner */
.alert-banner {
  background: linear-gradient(90deg, #F59E0B, #D97706);
  color: #FFFFFF;
  padding: 0.6rem 3rem 0.6rem 1rem;
  font-size: 0.85rem;
  text-align: center;
  position: relative;
  z-index: 2001;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.3);
}

.banner-content {
  max-width: 1200px;
  margin: 0 auto;
}

.banner-text {
  font-weight: 500;
  line-height: 1.4;
}

.banner-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.banner-close:hover {
  opacity: 1;
}
