/* ==========================================================================
   OldUnreal.de - 1:1 Nachbau Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Variables)
   -------------------------------------------------------------------------- */
:root {
  /* Colors (HSL values without hsl() for flexibility) */
  --background: 240 10% 4%;
  --foreground: 0 0% 98%;
  --primary: 217 91% 60%;
  --primary-foreground: 0 0% 100%;
  --accent: 142 71% 45%;
  --accent-foreground: 0 0% 100%;
  --secondary: 240 10% 12%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 10% 15%;
  --muted-foreground: 240 5% 65%;
  --border: 240 10% 20%;
  --card: 240 10% 6%;
  --ring: 217 91% 60%;

  /* Typography */
  --font-heading: 'Oxanium', system-ui, sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 20px;
  --spacing-lg: 30px;
  --spacing-xl: 60px;
  --spacing-xxl: 80px;

  /* Layout */
  --container-padding: 16px;
  --container-max-width: 1200px;
  --radius: 4px;
  --radius-lg: 8px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    linear-gradient(rgba(9, 9, 11, 0.9), rgba(9, 9, 11, 1));
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   3. Skip Link (Accessibility)
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  padding: 12px 20px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  z-index: 9999;
  border-radius: var(--radius);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 20px;
}

/* --------------------------------------------------------------------------
   4. Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

@media (min-width: 400px) {
  :root {
    --container-padding: 20px;
  }
}

@media (min-width: 768px) {
  :root {
    --container-padding: 40px;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-padding: 60px;
  }
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: hsla(var(--background) / 0.8);
  backdrop-filter: blur(12px);
}

.header .container {
  padding-left: 24px;
}

@media (min-width: 768px) {
  .header .container {
    padding-left: var(--container-padding);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  height: auto;
  padding: 8px 0;
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .header-inner {
    min-height: 64px;
    height: 64px;
    padding: 0;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: hsl(var(--foreground));
}

.logo:hover {
  color: hsl(var(--primary));
}

.logo .icon-terminal {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .logo .icon-terminal {
    width: 24px;
    height: 24px;
  }
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
}

@media (min-width: 768px) {
  .logo-text {
    font-size: 1.25rem;
  }
}

.logo-text-muted {
  color: hsl(var(--muted-foreground));
}

.nav {
  display: none;
  gap: 24px;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  transition: color var(--transition-fast);
}

.nav a:hover {
  color: hsl(var(--primary));
}

.icon-terminal,
.icon-server,
.icon-download,
.icon-heart,
.icon-monitor,
.icon-cpu,
.icon-chevron,
.icon-activity,
.icon-shield {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

.btn-outline {
  border-color: hsl(var(--primary) / 0.5);
  color: hsl(var(--primary));
  background: transparent;
}

.btn-outline:hover {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-server {
  display: none;
}

@media (min-width: 640px) {
  .btn-server {
    display: inline-flex;
  }
}

.btn-primary {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  letter-spacing: 0.025em;
}

.btn-primary:hover {
  background: hsl(var(--primary) / 0.8);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2), inset 0 0 10px rgba(59, 130, 246, 0.1);
}

.btn-cta {
  min-height: 44px;
  height: auto;
  padding: 12px 20px;
  font-size: 0.875rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

@media (min-width: 400px) {
  .btn-cta {
    min-height: 48px;
    padding: 14px 24px;
    font-size: 0.9375rem;
  }
}

@media (min-width: 768px) {
  .btn-cta {
    min-height: 56px;
    padding: 0 32px;
    font-size: 1rem;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  }
}

.btn-accent {
  border-color: hsl(var(--accent) / 0.5);
  color: hsl(var(--accent));
  background: transparent;
}

.btn-accent:hover {
  background: hsl(var(--accent) / 0.1);
}

/* Spenden-Button: Mobile-optimiert für langen Text */
.downloads-header .btn-accent {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
  padding: 12px 16px;
}

@media (min-width: 480px) {
  .downloads-header .btn-accent {
    width: auto;
    white-space: nowrap;
    padding: 10px 16px;
  }
}

/* --------------------------------------------------------------------------
   7. Hero Section
   -------------------------------------------------------------------------- */
/* Mobile: Above the fold - Header + Badge + Title + Description + CTA */
.hero {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 20px 0 32px;
  overflow: hidden;
}

@media (min-width: 400px) {
  .hero {
    padding: 32px 0 48px;
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: 70vh;
    padding: 96px 0 128px;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 128px 0 160px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: hsl(var(--background));
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    hsl(240 10% 4% / 0.6) 40%,
    hsl(240 10% 4% / 0.9) 70%,
    hsl(240 10% 4%) 100%
  );
  pointer-events: none;
}

/* Scanlines overlay */
.scanlines::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  z-index: 50;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px 10px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--accent));
  background: hsl(var(--accent) / 0.1);
  border: 1px solid hsl(var(--accent) / 0.2);
  border-radius: var(--radius);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2), inset 0 0 10px rgba(34, 197, 94, 0.1);
}

@media (min-width: 400px) {
  .badge {
    font-size: 0.6875rem;
    padding: 6px 12px;
    margin-bottom: 16px;
  }
}

@media (min-width: 768px) {
  .badge {
    font-size: 0.75rem;
    padding: 4px 16px;
    margin-bottom: 24px;
  }
}

.icon-activity {
  width: 12px;
  height: 12px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: white;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  line-height: 1.1;
  hyphens: auto;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
}

.hero-title-line {
  display: block;
}

@media (min-width: 768px) {
  .hero-title-line {
    display: inline;
  }
}

.hero-title-line + .hero-title-line::before {
  content: " ";
}

@media (min-width: 400px) {
  .hero-title {
    font-size: 2.25rem;
    margin-bottom: 12px;
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
    margin-bottom: 24px;
    hyphens: none;
  }
}

.hero-title-sub {
  display: block;
  font-size: 1.125rem;
  color: hsl(var(--primary));
  margin-top: 2px;
}

@media (min-width: 400px) {
  .hero-title-sub {
    font-size: 1.375rem;
  }
}

@media (min-width: 768px) {
  .hero-title-sub {
    font-size: 3rem;
    margin-top: 8px;
  }
}

.hero-description {
  max-width: 700px;
  margin: 0 0 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

@media (min-width: 400px) {
  .hero-description {
    font-size: 0.9375rem;
    margin-bottom: 20px;
  }
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.25rem;
    margin-bottom: 40px;
    line-height: 1.6;
  }
}

/* --------------------------------------------------------------------------
   8. Downloads Section
   -------------------------------------------------------------------------- */
.downloads {
  position: relative;
  padding: 48px 0;
  background: hsl(var(--secondary) / 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  .downloads {
    padding: 64px 0;
  }
}

@media (min-width: 1024px) {
  .downloads {
    padding: 80px 0;
  }
}

.downloads-accent-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 33%;
  height: 1px;
  background: linear-gradient(90deg, hsl(var(--primary)), transparent);
}

.downloads-header {
  text-align: center;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .downloads-header {
    margin-bottom: 64px;
  }
}

.downloads-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 12px;
}

@media (min-width: 400px) {
  .downloads-title {
    font-size: 1.75rem;
    gap: 16px;
  }
}

@media (min-width: 768px) {
  .downloads-title {
    font-size: 3rem;
    margin-bottom: 16px;
  }
}

.downloads-title .icon-download {
  width: 28px;
  height: 28px;
  color: hsl(var(--primary));
  margin-top: -2px;
}

@media (min-width: 768px) {
  .downloads-title .icon-download {
    width: 40px;
    height: 40px;
    margin-top: -4px;
  }
}

.downloads-intro {
  max-width: 672px;
  margin: 0 auto 24px;
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
}

@media (min-width: 768px) {
  .downloads-intro {
    font-size: 1.125rem;
  }
}

.downloads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .downloads-grid {
    gap: 40px;
  }
}

@media (min-width: 1024px) {
  .downloads-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.downloads-card {
  /* Card styling */
}

.downloads-card-title {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
}

@media (min-width: 768px) {
  .downloads-card-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
    gap: 12px;
  }
}

.downloads-card-title .icon-monitor,
.downloads-card-title .icon-cpu {
  width: 24px;
  height: 24px;
  color: hsl(var(--primary));
}

.downloads-card-title-accent {
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5), 0 0 20px rgba(34, 197, 94, 0.3);
}

.downloads-card-title-accent .icon-cpu {
  color: hsl(var(--accent));
}

.downloads-card-text {
  margin-bottom: 16px;
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

@media (min-width: 768px) {
  .downloads-card-text {
    margin-bottom: 24px;
    font-size: 1rem;
  }
}

.downloads-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--accent));
  background: hsl(var(--accent) / 0.1);
  border: 1px solid hsl(var(--accent) / 0.2);
  border-radius: var(--radius);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.downloads-badge .icon-monitor {
  width: 16px;
  height: 16px;
}

@media (min-width: 768px) {
  .downloads-badge {
    margin-bottom: 24px;
    padding: 8px 12px;
  }
}

/* Download links */
.download-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.download-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  min-height: 48px;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: var(--radius);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  color: hsl(var(--primary-foreground));
  transition: all var(--transition-fast);
}

@media (min-width: 400px) {
  .download-link {
    min-height: 56px;
    padding: 12px 16px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  }
}

.download-link:hover {
  background: #3f3f46;
}

.download-link-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
}

@media (min-width: 400px) {
  .download-link-text {
    font-size: 1.125rem;
    gap: 12px;
  }
}

.download-link .icon-terminal {
  width: 20px;
  height: 20px;
}

.download-link .icon-download {
  width: 20px;
  height: 20px;
  color: hsl(var(--muted-foreground));
}

.download-link-featured {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2), inset 0 0 10px rgba(59, 130, 246, 0.1);
}

.download-link-featured .download-link-text {
  font-weight: 700;
  color: white;
}

.download-link-featured .icon-terminal {
  color: hsl(var(--primary));
}

.download-link-featured .icon-download {
  color: hsl(var(--primary));
}

/* Patches card */
.patches-card {
  position: relative;
  border-radius: 12px;
  border: 1px solid hsl(var(--primary) / 0.3);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.patches-card-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 256px;
  height: 256px;
  padding: 128px;
  background: hsl(var(--primary) / 0.05);
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.patches-card-content {
  position: relative;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .patches-card-content {
    padding: 24px;
    gap: 16px;
  }
}

.patch-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  min-height: 44px;
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  transition: all var(--transition-fast);
}

.patch-link:hover {
  background: #27272a;
}

.patch-link .icon-chevron {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: hsl(var(--primary));
}

.patch-link .icon-server {
  width: 16px;
  height: 16px;
  color: hsl(var(--muted-foreground));
}

.patches-card-footer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.4;
}

@media (min-width: 768px) {
  .patches-card-footer {
    padding: 16px;
    font-size: 0.75rem;
  }
}

.patches-card-footer .icon-shield {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: hsl(var(--accent));
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: black;
  padding: 32px 0;
}

@media (min-width: 768px) {
  .footer {
    padding: 48px 0;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .footer-grid {
    gap: 32px;
    margin-bottom: 32px;
  }
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.footer-brand {
  text-align: center;
}

@media (min-width: 768px) {
  .footer-brand {
    text-align: left;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .footer-logo {
    justify-content: flex-start;
  }
}

.footer-logo .icon-terminal {
  width: 20px;
  height: 20px;
  color: hsl(var(--primary));
}

.footer-logo .logo-text {
  font-size: 1.125rem;
}

.footer-description {
  max-width: 384px;
  margin: 0 auto;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

@media (min-width: 768px) {
  .footer-description {
    margin: 0;
  }
}

.footer-links {
  text-align: center;
}

@media (min-width: 768px) {
  .footer-links {
    text-align: left;
  }
}

.footer-links-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: hsl(var(--primary));
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  color: hsl(var(--muted-foreground));
}

/* --------------------------------------------------------------------------
   10. Error Page (404)
   -------------------------------------------------------------------------- */
.error-page-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.error-page-body .error-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px var(--container-padding);
  text-align: center;
}

@media (min-width: 768px) {
  .error-page-body .error-page {
    padding: 80px var(--container-padding);
  }
}

.error-page-content {
  max-width: 480px;
}

.error-page-title {
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 900;
  color: white;
  margin: 0 0 16px;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 40px rgba(59, 130, 246, 0.3);
  line-height: 1;
}

@media (min-width: 768px) {
  .error-page-title {
    font-size: 8rem;
    margin-bottom: 24px;
  }
}

.error-page-text {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  margin: 0 0 32px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .error-page-text {
    font-size: 1.25rem;
    margin-bottom: 40px;
  }
}

.error-page .btn {
  min-width: 200px;
}
