/* ==========================================================================
   Braun Fantasy Fussball – Globale Styles (alle Seiten außer Index)
   Mobile-first | WCAG AA | Kein CDN
   ========================================================================== */

:root {
  --color-bg: #0f172a;
  --color-bg-elevated: #1e293b;
  --color-bg-glass: rgba(30, 41, 59, 0.72);
  --color-accent: #10b981;
  --color-accent-hover: #059669;
  --color-gold: #f59e0b;
  --color-gold-hover: #d97706;
  --color-text: #ffffff;
  --color-text-muted: #cbd5e1;
  --color-border: rgba(148, 163, 184, 0.25);
  --color-error: #f87171;
  --color-success: #34d399;
  --font-family:
    Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.35);
  --transition: 0.25s ease;
  --header-height: 72px;
  --max-width: 1200px;
  --focus-ring: 0 0 0 3px rgba(16, 185, 129, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: auto;
}

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 50% at 20% -10%,
      rgba(16, 185, 129, 0.12),
      transparent
    ),
    radial-gradient(
      ellipse 60% 40% at 90% 100%,
      rgba(245, 158, 11, 0.08),
      transparent
    );
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--color-gold);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 10000;
}

.skip-link:focus {
  top: 16px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.05rem;
}

.logo-link:hover {
  color: var(--color-accent);
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  list-style: none;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-desktop a {
  color: var(--color-text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--color-text);
  background: rgba(16, 185, 129, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--transition),
    transform var(--transition),
    color var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #0d9488);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent-hover), #0f766e);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), #b45309);
  color: var(--color-bg);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--color-gold-hover), #92400e);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-icon {
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  margin: 0 auto;
  transition:
    transform var(--transition),
    opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
  z-index: 1001;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100vh;
  background: var(--color-bg-elevated);
  border-left: 1px solid var(--color-border);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1002;
  padding: 24px;
  overflow-y: auto;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.25rem;
}

.nav-drawer ul {
  list-style: none;
  margin-top: 56px;
}

.nav-drawer li {
  border-bottom: 1px solid var(--color-border);
}

.nav-drawer a {
  display: block;
  padding: 14px 0;
  color: var(--color-text-muted);
  font-weight: 500;
}

.nav-drawer a:hover {
  color: var(--color-accent);
}

/* Main layout */
main {
  flex: 1;
  padding-top: calc(var(--header-height) + 32px);
  padding-bottom: 48px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.page-hero {
  padding: 48px 0 40px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--color-text), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero .lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 720px;
  margin: 0 auto;
}

/* Glass cards */
.glass-card {
  background: var(--color-bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-glass);
  transition:
    border-color var(--transition),
    transform var(--transition);
}

.glass-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
}

.section {
  padding: 48px 0;
}

.section-title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
  color: var(--color-text);
}

.section-title span {
  color: var(--color-accent);
}

/* Content typography */
.content-block {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.content-block p {
  margin-bottom: 1.25em;
}

.content-block h2,
.content-block h3 {
  color: var(--color-text);
  margin: 2em 0 0.75em;
  font-weight: 700;
}

.content-block h2 {
  font-size: 1.4rem;
}

.content-block h3 {
  font-size: 1.15rem;
}

.content-block ul,
.content-block ol {
  margin: 0 0 1.25em 1.5em;
}

.content-block li {
  margin-bottom: 0.5em;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  gap: 24px;
}

.grid-3 {
  display: grid;
  gap: 24px;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 991px) {
  .nav-desktop {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Team cards */
.team-card {
  text-align: center;
}

.team-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 3px solid var(--color-accent);
  object-fit: cover;
}

.team-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.team-card .role {
  color: var(--color-gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Forms */
.form-section {
  max-width: 560px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid {
  border-color: var(--color-error);
}

.form-group input.is-valid,
.form-group select.is-valid {
  border-color: var(--color-success);
}

.form-error {
  color: var(--color-error);
  font-size: 0.82rem;
  margin-top: 6px;
  min-height: 1.2em;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-group input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--color-accent);
}

.checkbox-group label {
  font-weight: 400;
  font-size: 0.9rem;
}

/* Multi-step register */
.steps-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background var(--transition);
}

.step-dot.is-active {
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.step-dot.is-done {
  background: var(--color-gold);
}

.form-step {
  display: none;
}

.form-step.is-active {
  display: block;
}

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-glass);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-question::after {
  content: "+";
  color: var(--color-accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.faq-item.is-open .faq-question::after {
  content: "−";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 20px 18px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.faq-item.is-open .faq-answer {
  max-height: 800px;
}

/* Legal numbered lists */
.legal-section ol {
  list-style: none;
  counter-reset: legal;
}

.legal-section ol > li {
  counter-increment: legal;
  margin-bottom: 2em;
  padding-left: 0;
}

.legal-section ol > li::before {
  content: counter(legal) ". ";
  color: var(--color-gold);
  font-weight: 700;
  font-size: 1.1rem;
}

.legal-section h2 {
  display: inline;
  font-size: 1.15rem;
  color: var(--color-text);
}

/* Contact layout */
.contact-grid {
  display: grid;
  gap: 32px;
}

.contact-info-card dl {
  display: grid;
  gap: 16px;
}

.contact-info-card dt {
  font-weight: 700;
  color: var(--color-gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-info-card dd {
  color: var(--color-text-muted);
  margin: 0;
}

.escalation-tier {
  border-left: 3px solid var(--color-accent);
  padding-left: 16px;
  margin-bottom: 20px;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  color: var(--color-gold);
  font-weight: 600;
  background: rgba(16, 185, 129, 0.08);
}

.data-table tr:hover td {
  background: rgba(16, 185, 129, 0.05);
}

/* Footer */
.site-footer {
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 0.9rem;
  color: var(--color-gold);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
  z-index: 2000;
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.35s ease;
  box-shadow: var(--shadow-glass);
}

.modal-overlay.is-visible .modal {
  transform: scale(1);
}

.modal-icon {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 20px;
  color: var(--color-accent);
}

.modal h2 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.modal p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 41, 59, 0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border);
  padding: 20px;
  z-index: 3000;
  transform: translateY(100%);
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
  opacity: 0;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner.is-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-banner p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Auth state */
.auth-guest {
  gap: 10px;
  display: flex;
}
@media (max-width: 576px) {
  .auth-guest {
    display: none;
  }
}

.auth-user {
  display: none;
}

body.is-logged-in .auth-guest {
  display: none;
}

body.is-logged-in .auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-badge {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Utility */
.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: 32px;
}

.mb-lg {
  margin-bottom: 32px;
}

.btn-block {
  width: 100%;
}

.form-section-wide {
  max-width: 640px;
}

.form-note {
  margin-bottom: 20px;
}

.media-block {
  display: grid;
  gap: 28px;
  margin: 2.5em 0;
  padding: 28px;
  background: var(--color-bg-glass);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.media-block h2 {
  color: var(--color-text);
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.content-wide {
  max-width: 900px;
  margin: 0 auto;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5em 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 640px) {
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-banner p {
    flex: 1;
    padding-right: 24px;
  }
}
