/* =================================================================
   MCFans.de - Main Theme
   ================================================================= */

:root {
  /* Brand colors */
  --bg: #06080F;
  --bg-2: #0A0E1A;
  --bg-3: #111726;
  --surface: rgba(20, 26, 44, 0.6);
  --surface-hi: rgba(30, 38, 60, 0.85);
  --border: rgba(124, 252, 0, 0.15);
  --border-hi: rgba(0, 229, 255, 0.4);

  /* Accents */
  --green: #7CFC00;       /* MC grass */
  --green-deep: #43A047;
  --gold: #FFD700;        /* MC gold */
  --gold-deep: #FF6B00;
  --cyan: #00E5FF;        /* MC diamond */
  --blue: #2979FF;
  --magenta: #FF00E5;
  --red: #FF3D00;
  --purple: #9C27B0;

  /* Text */
  --text: #E6ECFF;
  --text-2: #A3AECF;
  --text-3: #6B7AA0;

  /* Status */
  --ok: #4ADE80;
  --warn: #FBBF24;
  --err: #F87171;

  /* Effects */
  --glow-green: 0 0 30px rgba(124, 252, 0, 0.45), 0 0 60px rgba(124, 252, 0, 0.18);
  --glow-cyan: 0 0 30px rgba(0, 229, 255, 0.45), 0 0 60px rgba(0, 229, 255, 0.18);
  --glow-gold: 0 0 30px rgba(255, 215, 0, 0.5), 0 0 60px rgba(255, 215, 0, 0.2);

  /* Layout */
  --maxw: 1280px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --rad: 14px;
  --rad-sm: 8px;
  --rad-lg: 22px;

  /* Type */
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Russo One', 'Inter', sans-serif;
  --font-pixel: 'Press Start 2P', 'Courier New', monospace;
}

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

html, body {
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 229, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(255, 0, 229, 0.08), transparent 70%),
    radial-gradient(ellipse 70% 60% at 10% 80%, rgba(124, 252, 0, 0.08), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

body::before {
  /* Animated noise grain */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.12 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
  animation: noiseShift 6s steps(8) infinite;
}

body::after {
  /* Grid overlay */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 90%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
code { font-family: 'JetBrains Mono', 'Courier New', monospace; }

/* Container */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 2;
}

/* Sections */
.section {
  position: relative;
  padding: clamp(4rem, 9vw, 8rem) 0;
  z-index: 2;
}

.section-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.section-head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  position: relative;
  z-index: 2;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.06);
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: #fff;
}

.section-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto;
}

/* Glitch title effect */
.title-glitch {
  position: relative;
  display: inline-block;
  background: linear-gradient(180deg, #fff 30%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title-glitch::before,
.title-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.title-glitch::before {
  background: linear-gradient(180deg, var(--magenta) 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: translate(-2px, 0);
  mix-blend-mode: screen;
}
.title-glitch::after {
  background: linear-gradient(180deg, var(--cyan) 30%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: translate(2px, 0);
  mix-blend-mode: screen;
}
.title-glitch:hover::before { animation: glitch1 0.4s steps(2) 1; }
.title-glitch:hover::after  { animation: glitch2 0.4s steps(2) 1; }

/* Highlight text */
.hl-yellow { color: var(--gold); text-shadow: 0 0 12px rgba(255, 215, 0, 0.5); }
.hl-cyan   { color: var(--cyan); text-shadow: 0 0 12px rgba(0, 229, 255, 0.5); }
.hl-green  { color: var(--green); text-shadow: 0 0 12px rgba(124, 252, 0, 0.5); }
.hl-magenta{ color: var(--magenta); text-shadow: 0 0 12px rgba(255, 0, 229, 0.5); }

/* Status dot */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-3);
  box-shadow: 0 0 0 0 currentColor;
  position: relative;
  flex-shrink: 0;
}
.status-dot.online {
  background: var(--ok);
  color: var(--ok);
  animation: statusPulse 2s ease-in-out infinite;
}
.status-dot.offline { background: var(--err); color: var(--err); }
.status-dot.starting { background: var(--warn); color: var(--warn); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem;
  background: rgba(20, 26, 44, 0.65);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Selection */
::selection {
  background: var(--cyan);
  color: #000;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  border-radius: 4px;
  border: 2px solid var(--bg-2);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--green), var(--cyan)); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Reduced motion */
@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;
  }
}
