:root {
  --bs-primary: #4c00ff;
  --bs-primary-hover: #7637ff;
  --theme-text-primary: #f6f9fd;
  --theme-text-secondary: #c7d1e6;
  --theme-background: #0c1230;
  --theme-background-elevated: #141d43;
  --theme-border: #2d3768;
  --theme-font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --theme-radius-sm: 6px;
  --theme-radius-lg: 14px;
  --theme-shadow-lg: 0 20px 45px rgba(3, 8, 28, 0.45);
  --theme-brand-gradient: linear-gradient(135deg, #4c00ff 0%, #7637ff 40%, #00cfff 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--theme-font-family);
  color: var(--theme-text-primary);
  background:
    radial-gradient(circle at 20% -10%, rgba(0, 207, 255, 0.22), transparent 40%),
    radial-gradient(circle at 85% 8%, rgba(76, 0, 255, 0.24), transparent 42%),
    linear-gradient(160deg, #080f2c 0%, #131b3c 50%, #0d1637 100%);
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

.topbar {
  width: min(1200px, calc(100% - 2rem));
  margin: 1.25rem auto 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--theme-radius-lg);
  background: rgba(8, 12, 30, 0.58);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: clamp(156px, 20vw, 210px);
  height: auto;
}

.hero {
  width: min(1200px, calc(100% - 2rem));
  margin: 2.75rem auto 0;
  text-align: center;
}

.error-page {
  min-height: 100vh;
}

.error-hero {
  margin-top: 3.5rem;
  max-width: 820px;
}

.error-code {
  margin: 1rem 0 0;
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 0.95;
  font-weight: 700;
  color: #00cfff;
  text-shadow: 0 0 26px rgba(0, 207, 255, 0.35);
}

.eyebrow {
  margin: 0;
  color: #9cc3ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
}

h1 {
  margin: 0.8rem auto 0;
  max-width: 18ch;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.08;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 1rem auto 0;
  max-width: 68ch;
  font-size: clamp(1rem, 1.9vw, 1.18rem);
  line-height: 1.6;
  color: var(--theme-text-secondary);
}

.video-shell {
  margin: 2.2rem auto 0;
  max-width: 1100px;
  padding: 1.1rem;
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-lg);
  background: linear-gradient(180deg, rgba(20, 29, 67, 0.96) 0%, rgba(12, 17, 40, 0.96) 100%);
  box-shadow: var(--theme-shadow-lg);
}

.hero-video {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 10px;
  background: #0a0e22;
}

.video-caption {
  margin: 0.8rem 0 0;
  color: var(--theme-text-secondary);
  font-size: 0.93rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #b7c8ff;
}

.cta-group {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--theme-radius-sm);
  text-decoration: none;
  font-weight: 600;
  min-height: 42px;
  padding: 0.6rem 1.05rem;
  border: 1px solid transparent;
  transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid rgba(0, 207, 255, 0.7);
  outline-offset: 2px;
}

.btn-primary {
  color: #ffffff;
  background: var(--theme-brand-gradient);
  box-shadow: 0 10px 25px rgba(76, 0, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 28px rgba(76, 0, 255, 0.45);
}

.btn-secondary {
  color: var(--theme-text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.11);
}

.footer {
  margin-top: auto;
  padding: 2.1rem 1rem 1.9rem;
  text-align: center;
  color: #a9b4d5;
  font-size: 0.88rem;
}

.footer p {
  margin: 0.2rem 0;
}

.footer a:hover {
  color: #dce5ff;
}

@media (max-width: 900px) {
  .topbar {
    margin-top: 0.75rem;
  }

  .hero {
    margin-top: 2rem;
  }

  .video-shell {
    margin-top: 1.8rem;
    padding: 0.7rem;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 0.7rem 0.8rem;
  }

  .btn {
    width: 100%;
  }

  .cta-group {
    flex-direction: column;
    gap: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
