/* ===== FCM Blau-Weiß Theme (v16) ===== */
:root{
  --fcm-blue: var(--fcm-blue);
  --fcm-blue-2: var(--fcm-blue-2);
  --fcm-sky: #e9f2ff;
  --ink: #0b1b33;
  --muted: rgba(11,27,51,.7);
  --card-bg: rgba(255,255,255,.88);
  --card-border: rgba(255,255,255,.18);
  --shadow: 0 10px 30px rgba(0,0,0,.15);
  --radius: 16px;
  --gap: 14px;
}

/* Links/Buttons harmonisieren */
a{ color: var(--fcm-blue-2); }

/* Blau-Weiß Theme */
:root{
  --bg:#071428;
  --panel:#0b2342;
  --panel2:#0f2d57;
  --text:#eaf2ff;
  --muted:#b8c7e6;
  --blue:#2a7fff;
  --blue2:#64a7ff;
  --white:#ffffff;
  --line: rgba(255,255,255,.10);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(42,127,255,.25), transparent 60%),
              radial-gradient(900px 500px at 90% 20%, rgba(100,167,255,.18), transparent 55%),
              var(--bg);
  color: var(--text);
}

a{color:inherit; text-decoration:none}
code{background:rgba(255,255,255,.08); padding:2px 6px; border-radius:8px}

.topbar{
  position: sticky; top: 0;
  background: rgba(7,20,40,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  display:flex; align-items:center; justify-content:space-between;
  gap: 14px;
  z-index: 10;
}
.brand{display:flex; align-items:center; gap: 12px}
.badge{
  width:44px; height:44px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: var(--white);
  font-weight:800;
  letter-spacing: .08em;
  box-shadow: var(--shadow);
}
.title{font-weight:800; font-size: 18px; color: var(--fcm-sky);}
.subtitle{color: var(--muted); font-size: 13px}

.actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap}

.container{max-width: 1180px; margin: 0 auto; padding: 18px 16px 32px}

.btn{
  background: var(--fcm-blue);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px); }
.btn.ghost{ background: rgba(255,255,255,.18); color: #fff; }
.btn.ghost:hover{ background: rgba(255,255,255,.26); }

.btn:hover{filter:brightness(1.05)}
.btn.ghost{
  background: rgba(255,255,255,.06);
  box-shadow:none;
}
.btn.ghost:hover{background: rgba(255,255,255,.10)}

.card{
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.cardHead{display:flex; align-items:flex-end; justify-content:space-between; gap:10px; flex-wrap:wrap}
.card h2{margin:0 0 6px; font-size: 18px}
.muted{color: var(--muted)}

.grid4{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px){ .grid4{grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 600px){ .grid4{grid-template-columns: 1fr;} }

.table{
  width:100%;
  border-collapse: collapse;
  margin-top: 10px;
  overflow:hidden;
  border-radius: var(--radius2);
}
.table th, .table td{
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}
.table th{color: var(--muted); text-align:left; font-weight:700}
.table tr:last-child td{border-bottom:none}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  color: var(--muted);
}

.match{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  margin-top: 10px;
}
.match .teams{font-weight:800}
.score{font-variant-numeric: tabular-nums; font-weight:900}
.kickoff{color: var(--muted); font-size: 12px}

.row{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.input{
  width: min(420px, 100%);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.15);
  color: var(--text);
  outline:none;
}
.input:focus{border-color: rgba(100,167,255,.65)}

.smallInput{
  width: 90px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.15);
  color: var(--text);
  outline:none;
}
.smallInput:focus{border-color: rgba(100,167,255,.65)}

hr.sep{border:none; border-top:1px solid rgba(255,255,255,.10); margin: 14px 0}

.footer{
  padding: 18px 16px 30px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align:center;
}

.knockout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.modal{
  position: fixed; inset:0;
  display:none;
  z-index: 100;
}
.modal[aria-hidden="false"]{display:block}
.modalBackdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
}
.modalCard{
  position:relative;
  width:min(920px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow:auto;
  margin: 12px auto;
  background: linear-gradient(180deg, rgba(15,45,87,.92), rgba(11,35,66,.92));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.modalHead{
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.modalTitle{font-weight:900; color: var(--fcm-sky);}
.modalBody{padding: 14px}

.hint{margin-top:10px; font-size: 12px}

/* ===== Tabellen ===== */
.table th{
  background: rgba(0,58,143,.08);
  color: var(--ink);
}
.table td, .table th{ padding: 10px 12px; }
.table tr:hover td{ background: rgba(0,58,143,.05); }

/* ===== Mobile Optimierung ===== */
@media (max-width: 720px){
  :root{ --gap: 12px; }
  .container{ padding: 12px !important; }
  header .row{ flex-direction: column; align-items: flex-start; gap: 10px; }
  header .actions{ width: 100%; display:flex; gap:10px; flex-wrap: wrap; }
  header .actions .btn{ flex: 1 1 auto; }
  .grid{ grid-template-columns: 1fr !important; gap: var(--gap) !important; }
  .cardHead{ flex-direction: column; align-items: flex-start; gap: 6px; }
  .match{ flex-direction: column; align-items: stretch; gap: 10px; }
  .match .score{ text-align: right; }
  .row{ flex-wrap: wrap; gap: 10px; }
  .input{ width: 100% !important; }
  .smallInput{ width: 100px !important; }
  .pill{ font-size: 12px; }
}

/* ===== Druckansicht (Spielplan) ===== */
@media print{
  /* Hintergrund & Effekte raus */
  body::before{ display:none !important; }
  body{ background: #fff !important; color:#000 !important; }
  header, .actions, #btnRules, #btnSchedule, #btnAdminLink, #btnLogout, #loginCard { display:none !important; }
  .card{ box-shadow:none !important; backdrop-filter:none !important; background:#fff !important; border:1px solid #ddd !important; }
  .pill{ border:1px solid #ccc !important; background:#f5f5f5 !important; color:#000 !important; }
  .match{ break-inside: avoid; page-break-inside: avoid; border:1px solid #ddd !important; background:#fff !important; }
  a{ color:#000 !important; text-decoration:none !important; }
  .no-print{ display:none !important; }
}

/* Optionaler Print-Button Style */
.printBar{
  display:flex;
  justify-content:flex-end;
  margin: 10px 0 0;
}


/* ===== Lesbarkeit-Fix (v17) ===== */
body{ color: var(--ink); }
h1,h2,h3,h4,h5{ color: var(--fcm-blue); }
.muted{ color: var(--muted); }

/* Inhalte auf Cards immer dunkel */
.card, .card *{ color: var(--ink); }
.card .muted{ color: var(--muted); }

/* Ghost-Buttons: auf hellen Cards dunkel/blau, im Header weiterhin hell */
.btn.ghost{
  background: rgba(0,58,143,.08) !important;
  color: var(--fcm-sky) !important;
  border: 1px solid rgba(0,58,143,.18) !important;
}
header .btn.ghost{
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.25) !important;
}

/* Match-Zeilen auf Cards etwas abgesetzt */
.match{
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(0,0,0,.06);
}
.table th{ color: var(--ink) !important; }

/* ===== FCM Blaue Cards (FINAL) ===== */
.card{
  background: linear-gradient(
    180deg,
    rgba(0,58,143,0.92),
    rgba(0,58,143,0.85)
  );
  color: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* Text auf Cards */
.card h1,
.card h2,
.card h3,
.card h4{
  color: #ffffff;
}

.card,
.card *{
  color: #ffffff;
}

.card .muted{
  color: rgba(255,255,255,0.75);
}

/* Match-Zeilen dunkler abgesetzt */
.match{
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
}

/* Tabellen auf Cards */
.table th{
  background: rgba(255,255,255,0.15);
  color: #ffffff;
}
.table td{
  color: #ffffff;
}
/* ===== Größere Cards & bessere Lesbarkeit ===== */
.card{
  padding: 28px 32px;
}

/* Card-Header */
.cardHead{
  margin-bottom: 18px;
}

/* Text allgemein luftiger */
.card p,
.card li,
.card td,
.card th{
  line-height: 1.5;
}

/* Tabellen größer */
.table th,
.table td{
  padding: 12px 14px;
  font-size: 15px;
}

/* Spiel-Zeilen (Match) größer */
.match{
  padding: 14px 16px;
  margin-bottom: 10px;
}

/* Teams/Text in Spielen */
.match .teams{
  font-size: 15px;
}
.match .kickoff{
  font-size: 14px;
}
.match .score{
  font-size: 16px;
  font-weight: 700;
}

/* Mobile: etwas kompakter */
@media (max-width: 720px){
  .card{
    padding: 18px 16px;
  }
  .match{
    padding: 12px 14px;
  }
}
/* ===== Desktop-Zentrierung ===== */
@media (min-width: 1024px){
  .container{
    max-width: 1200px;
    margin: 0 auto;
  }

  .card{
    max-width: 1100px;
    margin: 0 auto 24px auto;
  }
}
/* ===== Card Effekt ===== */
.card{
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Glanz-Licht */
.card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(
      120deg,
      transparent 0%,
      rgba(255,255,255,0.15) 40%,
      transparent 70%
    );
  opacity: 0;
  transition: opacity .25s ease;
}

/* Hover Effekt nur Desktop */
@media (hover:hover){
  .card:hover{
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  }
  .card:hover::before{
    opacity: 1;
  }
}
/* ===== SPIELPLAN: HARTE SCHRIFTFARBEN (FIX) ===== */

/* ALLES im Spielplan weiß */
.match,
.match * {
  color: #ffffff !important;
}

/* Uhrzeit etwas heller */
.match .kickoff {
  color: rgba(255,255,255,0.85) !important;
}

/* Ergebnis hervorheben */
.match .score {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff !important;
}

/* Zeit-Blöcke (z.B. 10:00 Uhr) */
.timeBlock,
.timeBlock * {
  color: #ffffff !important;
}
/* ===== Klick-Fix (Login / Buttons) ===== */

/* Pseudo-Overlays dürfen keine Klicks abfangen */
.card::before,
body::before{
  pointer-events: none !important;
}

/* Buttons immer klickbar */
button,
.btn,
input,
a{
  pointer-events: auto !important;
  position: relative;
  z-index: 5;
}

/* Login-Card explizit nach vorne */
#loginCard{
  position: relative;
  z-index: 10;
}
/* ===== GLOBALER HINTERGRUND ===== */
html, body{
  min-height: 100%;
}

body{
  margin: 0;
  background: none;
}

/* Hintergrundbild + Blau-Overlay */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;

  background:
    linear-gradient(
      rgba(0,58,143,0.78),
      rgba(0,58,143,0.55)
    ),
    url("74er.jpg") center / cover no-repeat;
}

.logo{
  display: flex;
  align-items: center;
}

.logo img{
  height: 56px;
  width: auto;
}

/* ===== Handy Header ===== */
@media (max-width: 720px){
  .logo img{
    height: 44px;
  }
}

/* ===== Mobile Header: Buttons unter Titel (passend zu .topbar) ===== */
@media (max-width: 720px){
  .topbar{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  /* Logo + Titel oben */
  .topbar .brand{
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* Buttons darunter */
  .topbar .actions{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar .actions .btn{
    flex: 1 1 140px; /* große, gut klickbare Buttons */
    text-align: center;
  }
}
/* ===== Mobile Tabellen-Fix bei langen Teamnamen ===== */
@media (max-width: 720px){

  /* Tabelle darf nicht überlaufen */
  .table{
    width: 100%;
    table-layout: fixed; /* WICHTIG */
  }

  /* Teamname-Spalte */
  .table td:first-child,
  .table th:first-child{
    white-space: normal;     /* Umbruch erlauben */
    word-break: break-word; /* Lange Wörter umbrechen */
    max-width: 140px;        /* verhindert extremes Ziehen */
  }

  /* Andere Spalten kompakter */
  .table td,
  .table th{
    padding: 8px 6px;
    font-size: 13px;
    text-align: center;
  }

  /* Teamname linksbündig */
  .table td:first-child{
    text-align: left;
  }
}
@media (hover:hover) and (min-width: 721px){
  .card{ position: relative; z-index: 1; }
  .card:hover{ z-index: 20; }
}

/* ===== Beamer Mode ===== */
body.beamer{ color:#fff; }
.beamerWrap{ padding: 24px; }
.beamerTop{ display:flex; justify-content: space-between; align-items:center; margin-bottom: 18px; }
.beamerTitle{ display:flex; align-items:center; gap:16px; }
.beamerLogo{ height:64px; width:auto; }
.beamerH1{ font-size: 34px; font-weight: 900; letter-spacing: .5px; }
.beamerH2{ font-size: 18px; opacity:.85; margin-top: 2px; }
.beamerClock{ font-size: 42px; font-weight: 900; letter-spacing: 1px; }
.beamerGrid{ display:grid; grid-template-columns: 2fr 1.2fr; gap: 18px; }
.beamerTablesGrid{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.beamerTableCard{ background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15); border-radius: 16px; overflow:hidden; }
.beamerTableHead{ background: rgba(0,58,143,.85); padding: 12px 14px; font-size: 20px; font-weight: 900; border-bottom: 1px solid rgba(255,255,255,.15); }
.beamer .table th, .beamer .table td{ padding: 8px 10px; font-size: 14px; }
.beamerNNWrap{ display:flex; flex-direction: column; gap: 14px; }
.beamerNNCard{ background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,58,143,.9)); border-left: 8px solid #00b2ff; border-radius: 16px; padding: 16px 16px; border: 1px solid rgba(255,255,255,.12); }
.beamerNNCard.next{ border-left-color: rgba(255,215,0,.9); }
.beamerNNLabel{ font-size: 14px; font-weight: 900; letter-spacing: 1px; opacity: .9; }
.beamerNNTime{ font-size: 46px; font-weight: 900; margin: 6px 0 6px; }
.beamerNNTeams{ font-size: 22px; font-weight: 900; line-height: 1.2; }
.beamerNNMeta{ margin-top: 6px; opacity: .85; }
.beamerNNScore{ margin-top: 10px; font-size: 40px; font-weight: 900; }
.beamerHint{ margin-top: 14px; opacity: .75; font-size: 12px; }
@media (max-width: 980px){ .beamerGrid{ grid-template-columns: 1fr; } .beamerTablesGrid{ grid-template-columns: 1fr; } }
