﻿:root{
  --bg: #0b1220;
  --surface: #101a2f;
  --surface2: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #60a5fa;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(0,0,0,0.25);
  --border: rgba(255,255,255,0.08);
  --max: 1200px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% -10%, rgba(96,165,250,0.18), transparent 60%),
              radial-gradient(900px 600px at 80% 10%, rgba(52,211,153,0.14), transparent 55%),
              var(--bg);
  color:var(--text);
  line-height:1.6;
}

a{color:inherit; text-decoration:none}
a:hover{color:var(--accent)}

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.page{padding: 22px 0 56px}



/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 3000;
  isolation: isolate;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,0.65);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 14px;
  position: relative;
  z-index: 3003;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight:700;
  position: relative;
  z-index: 3004;
}

.brand-logo{
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: brightness(1.2);
}

.brand-text{letter-spacing:0.2px}

.site-nav{
  position: relative;
  z-index: 3001;
}

.site-nav ul{
  display:flex;
  gap: 18px;
  list-style:none;
  margin:0;
  padding:0;
  align-items:center;
}

.site-nav a{
  display:inline-flex;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight:600;
  border: 1px solid transparent;
}

.site-nav a.is-active{
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
}

.nav-toggle{
  display:none;
  background:transparent;
  border:1px solid var(--border);
  color:var(--text);
  border-radius:12px;
  padding:10px;
  position: relative;
  z-index: 3005;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

@media (max-width: 820px){
  .nav-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .site-nav{
    display:none;
    position:absolute;
    left:0;
    right:0;
    top:64px;
    background: rgba(11,18,32,0.92);
    border-bottom:1px solid var(--border);
  }

  .site-nav.is-open{
    display:block;
  }

  .site-nav ul{
    flex-direction:column;
    align-items:stretch;
    padding: 10px 20px 16px;
  }

  .site-nav a{
    width:100%;
  }
}





/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 16px 0;
}
.card-head{display:flex; align-items:flex-start; justify-content:space-between; gap: 18px; margin-bottom: 14px}
.card h1, .card h2{margin:0; line-height:1.2}
.sub{margin: 6px 0 0; color: var(--muted)}
.meta{display:flex; align-items:center; gap: 10px; flex-wrap:wrap; justify-content:flex-end}
.small{font-size: 12px; color: var(--muted)}
.badge{font-size:12px; padding:6px 10px; border-radius:999px; border:1px solid var(--border); color: var(--muted)}

.hint{color: var(--muted); font-size: 13px; margin: 10px 4px}
.muted{color: var(--muted)}

/* Ticker */
.ticker{
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow:hidden;
  background: rgba(16,26,47,0.7);
}
.ticker-inner{display:flex; align-items:center; gap: 12px; padding: 10px 12px}
.ticker-label{
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(96,165,250,0.14);
  border: 1px solid rgba(96,165,250,0.22);
}
.ticker-track{position:relative; overflow:hidden; flex:1; mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent)}
.ticker-text{
  display:inline-block;
  white-space:nowrap;
  padding-left: 100%;
  animation: ticker 18s linear infinite;
  color: var(--text);
  font-weight: 600;
}
@keyframes ticker{0%{transform:translateX(0)} 100%{transform:translateX(-100%)}}

/* Tables */
.status-grid{display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0}
.card-tight{padding: 14px}
.card-head.compact{margin-bottom: 10px}
.card-head.compact h2{font-size: 14px; margin: 0; letter-spacing: 0.2px}

.mini-table{min-width: 0; width:100%; border-collapse: collapse; background: transparent}
.mini-table th, .mini-table td{padding: 8px 10px; border-bottom:1px solid rgba(255,255,255,0.06)}
.mini-table th{font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.3px; position: sticky; top: 0; background: rgba(11,18,32,0.92); backdrop-filter: blur(8px)}
.mini-table td{font-size: 13px}
.mini-table .rank{white-space:nowrap}
.mini-table .team a{color: var(--text); text-decoration: none}
.mini-table .team a:hover{color: var(--accent); text-decoration: underline}

@media (max-width: 980px){
  .status-grid{grid-template-columns: 1fr}
}

.table-wrap{overflow:auto; border-radius: 14px; border:1px solid var(--border)}
.table{
  width:100%;
  border-collapse: separate;   /* wichtig fuer sticky columns */
  border-spacing: 0;           /* optisch wie collapse */
  min-width: 760px;
  background: rgba(15,23,42,0.55);
}
.table th, .table td{padding: 12px 12px; border-bottom:1px solid rgba(255,255,255,0.06); text-align:left}
.table th{position:sticky; top:0; background: rgba(11,18,32,0.92); backdrop-filter: blur(8px); font-size: 12px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--muted)}
.table tr:hover td{background: rgba(255,255,255,0.03)}



.section-row{
  background: rgba(96,165,250,0.10);
  color: var(--text);
  font-weight: 700;
}
.section-row td{border-bottom: 1px solid rgba(96,165,250,0.18)}

.rank{font-variant-numeric: tabular-nums}
.score{font-variant-numeric: tabular-nums; font-weight:700}

/* Info layout */
.info-grid{display:grid; grid-template-columns: 1fr 1.4fr; gap: 16px}
.panel{background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 14px; padding: 14px}
.panel h2{margin:0 0 10px}
.facts{margin:0; padding-left: 18px}

@media (max-width: 980px){
  .info-grid{grid-template-columns:1fr}
}

/* Segmented */
.segmented{display:inline-flex; border:1px solid var(--border); border-radius:999px; overflow:hidden; margin: 6px 0 12px}
.seg{background:transparent; color: var(--muted); border:0; padding: 10px 12px; font-weight:700; cursor:pointer}
.seg[aria-selected=true]{color: var(--text); background: rgba(255,255,255,0.04)}

.tab.is-hidden{display:none}

/* Skeleton */
.skeleton{padding: 16px; color: var(--muted)}

/* Video */
.video-frame{position:relative; padding-top:56.25%; border-radius: 14px; overflow:hidden; border:1px solid var(--border)}
.video-frame iframe{position:absolute; inset:0; width:100%; height:100%}

/* Footer */
.site-footer{border-top:1px solid var(--border); padding: 22px 0; color: var(--muted)}
.footer-inner{display:flex; align-items:center; justify-content:space-between; gap: 16px}
.footer-right a{color: var(--muted)}
.footer-right a:hover{color: var(--accent)}


/* Dokumente */
.doc-section {
  margin-bottom: 20px;
}

.doc-section h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.doc-section ul {
  list-style: none;
  padding: 0;
}

.doc-section li {
  margin-bottom: 6px;
}

.doc-section a {
  color: var(--accent);
  text-decoration: none;
}

.doc-section a:hover {
  text-decoration: underline;
}

/* ============================= */
/* Responsive Tabellen (Mobile)  */
/* ============================= */

/* Scroll-Container */
/* Nur grosse Tabellen scrollbar */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mini-Tabellen (Status-Karten) nicht scrollbar */
.mini-table {
  min-width: 0;
}


/* Mobile Optimierung 2*/
@media (max-width: 768px) {
  /* Rang-Spalte: fixe Breite */
  .table th:first-child,
  .table td:first-child {
    width: 64px;
    min-width: 64px;
    position: sticky;
    left: 0;
    z-index: 3;
  }

  /* St-Nr-Spalte: fixe Breite */
  .table th:nth-child(2),
  .table td:nth-child(2) {
    width: 80px;
    min-width: 80px;
    position: sticky;
    left: 64px;   /* muss = Breite der 1. Spalte sein */
    z-index: 2;
  }

  /* passende Hintergruende */
  .table tbody td:first-child,
  .table tbody td:nth-child(2) {
    background: rgba(12, 22, 38, 0.92);
  }

  .table thead th:first-child,
  .table thead th:nth-child(2) {
    background: rgba(8, 16, 28, 0.98);
  }

  /* section-row sauber */
  .table tbody tr.section-row td:first-child,
  .table tbody tr.section-row td:nth-child(2) {
    background: rgba(16, 30, 52, 0.96);
  }

  /* Schatten rechts vom sticky block */
  .table th:nth-child(2),
  .table td:nth-child(2) {
    box-shadow: 10px 0 14px rgba(0, 0, 0, 0.35);
  }
}

/* Medaillen fuer Rang 1–3 */
.rank.medal {
  font-weight: 800;
}

.rank.medal-1 { color: #f5d76e; } /* Gold */
.rank.medal-2 { color: #cbd5e1; } /* Silber */
.rank.medal-3 { color: #d6a06a; } /* Bronze */


/* Verganene Events Button */
.past-events{
  margin-top:16px;
}

.btn-events{
  display:inline-block;
  padding:10px 18px;
  border-radius:999px;
  background:#f2f4f7;
  color:#1a1a1a;
  text-decoration:none;
  font-weight:600;
  border:1px solid #e2e5ea;
  transition:all .2s ease;
}

.btn-events:hover{
  background:#e9edf3;
  border-color:#cfd6df;
}


/* ===================================== */
/* Live2 – nur Zusatzregeln fuer externes Live */
/* ===================================== */


/* Live2 */
.live2-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.live2-info{
  margin:0 0 12px;
  color:var(--muted);
}

.live2-frame-wrap{
  position: relative;
  z-index: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

/* Standard fuer ALGE / FIS / Verschiedene */
.live2-frame-wrap iframe{
  display:block;
  width:100%;
  height:calc(100vh - 220px);
  border:0;
  background:#fff;
}

/* VOLA: horizontal scrollbar statt kaputtes Skalieren */
.live2-frame-wrap--vola{
  background:#f3f3f3;
}

.live2-frame-scroll{
  width:100%;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

.live2-frame-wrap--vola iframe{
  display:block;
  width:1280px;
  min-width:1280px;
  height:900px;
  border:0;
  background:#fff;
}

/* Mobile nur fuer Live2 */
@media (max-width: 768px){
  .live2-actions .btn-events{
    width:100%;
    text-align:center;
    padding:12px 16px;
  }

  .live2-frame-wrap{
    border-radius:10px;
  }

  .live2-frame-wrap iframe{
    height:calc(100vh - 200px);
  }

  .live2-frame-wrap--vola iframe{
    width:1280px;
    min-width:1280px;
    height:900px;
  }
}

@media (max-width: 480px){
  .live2-frame-wrap iframe{
    height:calc(100vh - 180px);
  }
}




/* Infobox */

/* ============================= */
/* Event-Popup Countdown */
/* ============================= */

.event-popup[hidden] {
  display: none !important;
}

.event-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-popup-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.event-popup-box {
  position: relative;
  z-index: 10;
  width: min(720px, calc(100% - 32px));
  padding: 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, #13233a, #1f4268);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.event-popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  pointer-events: auto;
}

.event-countdown__inner {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
}

.event-countdown__logo img {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
  object-fit: contain;
}

.event-countdown__content h2 {
  margin: 0 0 8px 0;
}

.event-countdown__desc {
  margin: 0 0 8px 0;
}

.event-countdown__date {
  margin: 0 0 14px 0;
  font-weight: 700;
}

.event-countdown__timer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.count-box {
  min-width: 90px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a1a1a;
  text-align: center;
}

.count-box span {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.count-box small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .event-countdown__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .event-countdown__logo img {
    margin: 0 auto;
  }

  .event-countdown__timer {
    justify-content: center;
  }
}



