:root {
  --bg: #050b11;
  --panel: rgba(5, 12, 18, 0.84);
  --panel-2: rgba(8, 17, 25, 0.76);
  --text: #edf6f9;
  --muted: #bacbd1;
  --ice: #d9eff6;
  --ice-2: #91c9d9;
  --line: rgba(215, 240, 248, 0.22);
  --line-strong: rgba(227, 247, 252, 0.44);
  --red: #bd3442;
  --red-dark: #75141d;
  --green: #73c794;
  --shadow: 0 22px 62px rgba(0, 0, 0, 0.48);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0 !important;
  min-height: 100svh;
  color: var(--text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  background:
    linear-gradient(180deg, rgba(2, 7, 12, 0.78), rgba(4, 10, 16, 0.89)),
    url("../assets/tof-ice-background.jpg") center center / cover fixed no-repeat !important;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 10%, rgba(198, 235, 246, 0.15), transparent 26%),
    radial-gradient(circle at 86% 14%, rgba(127, 188, 204, 0.12), transparent 28%),
    radial-gradient(circle at 74% 74%, rgba(166, 29, 42, 0.09), transparent 27%);
}

a {
  color: var(--ice) !important;
}

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

.online-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 9, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.online-header-inner {
  width: min(calc(100% - 32px), var(--max));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.online-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff !important;
  text-decoration: none;
}

.online-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(185, 230, 241, 0.24));
}

.online-brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.online-brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.online-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.online-nav a {
  padding: 9px 11px;
  border-radius: 9px;
  color: #dce7ea !important;
  text-decoration: none;
  font-size: 0.86rem;
}

.online-nav a:hover {
  background: rgba(216, 241, 248, 0.08);
}

.online-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.online-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 8, 13, 0.9), rgba(6, 14, 20, 0.56) 58%, rgba(4, 10, 15, 0.88)),
    url("../assets/tof-ice-background.jpg") center center / cover no-repeat;
}

.online-hero::after {
  content: "";
  position: absolute;
  right: clamp(-50px, 2vw, 20px);
  top: 50%;
  width: min(31vw, 330px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("../assets/tof-rune-transparent.png") center / contain no-repeat;
  opacity: 0.14;
  pointer-events: none;
}

.online-hero-inner {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 74px) 0;
}

.online-kicker {
  color: var(--ice-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.online-hero h1 {
  max-width: 900px;
  margin: 12px 0 0;
  color: #fff !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(2.3rem, 5.8vw, 4.7rem) !important;
  line-height: 1;
  text-decoration: none !important;
}

.online-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #cad8dd;
  line-height: 1.7;
}

.legacy-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 64px) 0 78px;
}

.legacy-content {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(217, 241, 248, 0.045), transparent 30%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Legacy HTML neutralisieren, ohne Formular-Namen oder Formularlogik zu verändern */
.legacy-content font {
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
}

.legacy-content font[color="red"],
.legacy-content font[color="RED"],
.legacy-content font[color="#FF0000"] {
  color: #ff6e7c !important;
}

.legacy-content font[color="yellow"],
.legacy-content font[color="Yellow"],
.legacy-content font[color="#BCB264"],
.legacy-content font[color="orange"] {
  color: var(--ice) !important;
}

.legacy-content font[color="green"],
.legacy-content font[color="Green"] {
  color: var(--green) !important;
}

.legacy-content h1,
.legacy-content h2,
.legacy-content h3,
.legacy-content h4,
.legacy-content h5 {
  color: #fff !important;
  font-family: Georgia, "Times New Roman", serif !important;
  line-height: 1.18;
}

.legacy-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem) !important;
  text-decoration: none !important;
}

.legacy-content p,
.legacy-content li,
.legacy-content td,
.legacy-content th {
  color: #d2dde1;
  line-height: 1.65;
}

.legacy-content hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 28px 0;
}

.legacy-content table {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-color: rgba(215, 240, 248, 0.17) !important;
}

.legacy-content table table {
  background: rgba(255, 255, 255, 0.018);
}

.legacy-content td,
.legacy-content th {
  min-width: 0 !important;
  padding: 10px 12px !important;
  border-color: rgba(215, 240, 248, 0.13) !important;
  vertical-align: top;
}

.legacy-content th {
  color: #f4fbfc !important;
  background: rgba(201, 233, 242, 0.07);
}

.legacy-content input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="reset"]),
.legacy-content select,
.legacy-content textarea {
  width: min(100%, 560px) !important;
  max-width: 100% !important;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(209, 238, 246, 0.22);
  border-radius: 9px;
  color: #f3f8fa;
  background: rgba(4, 10, 15, 0.82);
  outline: none;
}

.legacy-content textarea {
  min-height: 120px;
  resize: vertical;
}

.legacy-content input[type="file"] {
  padding: 9px;
}

.legacy-content input:focus,
.legacy-content select:focus,
.legacy-content textarea:focus {
  border-color: rgba(213, 242, 249, 0.52);
  box-shadow: 0 0 0 3px rgba(139, 196, 211, 0.08);
}

.legacy-content input[type="radio"],
.legacy-content input[type="checkbox"] {
  accent-color: var(--red);
}

.legacy-content input[type="submit"],
.legacy-content input[type="reset"] {
  min-height: 46px;
  margin: 8px 6px;
  padding: 0 20px;
  border: 1px solid rgba(215, 240, 248, 0.24);
  border-radius: 10px;
  color: #fff;
  background: rgba(13, 28, 38, 0.92);
  cursor: pointer;
  font-weight: 800;
}

.legacy-content input[type="submit"] {
  border-color: rgba(255, 136, 145, 0.4);
  background: linear-gradient(180deg, var(--red), var(--red-dark));
}

.legacy-content a img {
  margin: 8px auto;
}

.legacy-content a[href="nscanmeldung.html"],
.legacy-content a[href="spieleranmeldung.html"] {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid rgba(255, 136, 145, 0.4);
  border-radius: 10px;
  color: #fff !important;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  text-decoration: none;
  font-weight: 800;
}

.legacy-content a[href="nscanmeldung.html"] img,
.legacy-content a[href="spieleranmeldung.html"] img {
  display: none;
}

.legacy-content a[href="nscanmeldung.html"]::after {
  content: "Zur NSC-Anmeldung";
}

.legacy-content a[href="spieleranmeldung.html"]::after {
  content: "Zur Spieler-Anmeldung";
}

.status-box {
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid rgba(216, 241, 248, 0.18);
  border-radius: 12px;
  color: #d9e5e9;
  background: rgba(255, 255, 255, 0.025);
}

.status-box strong {
  color: #fff;
}

.online-footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 8, 13, 0.84);
}

.online-footer-inner {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: #81969e;
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll !important;
  }

  .online-header-inner {
    min-height: 66px;
  }

  .online-brand img {
    width: 44px;
    height: 44px;
  }

  .online-brand small {
    display: none;
  }

  .online-nav a:first-child {
    display: none;
  }

  .online-hero::after {
    width: min(48vw, 230px);
    opacity: 0.1;
  }

  .legacy-content {
    padding: 18px 14px;
  }

  .legacy-content table,
  .legacy-content tbody,
  .legacy-content tr,
  .legacy-content td,
  .legacy-content th {
    max-width: 100% !important;
  }

  /* Formulare auf Smartphones aus festen Tabellen lösen */
  .legacy-content form > table,
  .legacy-content form > table > tbody,
  .legacy-content form > table > tbody > tr,
  .legacy-content form > table > tbody > tr > td {
    display: block;
    width: 100% !important;
  }

  .legacy-content td,
  .legacy-content th {
    padding: 8px !important;
  }

  .legacy-content input[type="submit"],
  .legacy-content input[type="reset"] {
    width: calc(100% - 12px);
  }
}
