/* ==========================================================
   Hockey Dynasty Manager — Design-System
   Leitidee: Eisfläche statt Bootstrap-Weiß, Bande statt Card-Schatten,
   Anzeigetafel-Typografie statt generischer UI-Sans.
   Palette: Arena bei Nacht (Navy) + frisch resurfacte Eisfläche (Off-White)
   + Schiedsrichter-Orange als einziger Signalakzent.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Public+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
    /* Arena / Eisfläche */
    --navy:        #0a1929;   /* Bande bei Nacht — Header, dunkle Flächen */
    --navy-light:  #142b45;
    --navy-mid:    #1c3a5c;
    --ice:         #eef4f8;   /* Grundfläche: frisch resurfacte Eisfläche */
    --ice-card:    #ffffff;
    --ice-line:    #d7e3ec;   /* dezente Bandenlinie zwischen Elementen */

    /* Signalfarbe: Schiedsrichter-Orange — bewusst sparsam eingesetzt */
    --whistle:       #ff6a00;
    --whistle-light: #ff8c33;
    --whistle-dark:  #d95900;

    /* Rink-Markierungen als Statusfarben statt generischem Grün/Rot */
    --goal-line:  #c81e3a;   /* Torlinie — Fehler/Alarm */
    --blue-line:  #14528c;   /* Blaue Linie — sekundäre Akzente/Links */
    --ok:         #1f8a5f;

    --ink:        #0a1929;
    --ink-muted:  #5b7086;
    --radius:     10px;
    --radius-lg:  16px;

    --font-display: 'Oswald', 'Arial Narrow', sans-serif;
    --font-body:    'Public Sans', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.55;
    background:
        repeating-linear-gradient(135deg, rgba(20,82,140,.035) 0 2px, transparent 2px 42px),
        var(--ice);
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------------- Header / Navigation ---------------- */
.site-header {
    background: var(--navy);
    background-image:
        linear-gradient(100deg, rgba(255,106,0,.16) 0%, transparent 40%),
        radial-gradient(ellipse at top left, rgba(255,106,0,.14), transparent 55%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 3px solid var(--whistle);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 20px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: .01em;
    white-space: nowrap;
}
.brand em { font-style: normal; color: var(--whistle-light); font-weight: 700; }
.brand-mark { width: 26px; height: 26px; color: var(--whistle); flex-shrink: 0; }

.site-header nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.site-header nav a {
    color: #c3d2e0;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .88rem;
    letter-spacing: .01em;
    transition: background .15s ease, color .15s ease;
}
.site-header nav a:hover,
.site-header nav a:focus-visible { color: #fff; background: rgba(255,255,255,.08); }
.site-header nav a.nav-cta { background: var(--whistle); color: #fff; }
.site-header nav a.nav-cta:hover { background: var(--whistle-light); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px; height: 36px;
    background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span { width: 100%; height: 2px; background: #fff; border-radius: 2px; }

/* ---------------- Layout ---------------- */
main.wrap { padding: 32px 20px 64px; min-height: 60vh; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--navy); letter-spacing: .01em; }
h1 {
    font-size: 2rem;
    margin: 0 0 6px;
    text-transform: uppercase;
    padding-left: 14px;
    border-left: 5px solid var(--whistle);
}
h1.centered { border-left: none; padding-left: 0; }
.team-header-card { text-align: center; }
h2 {
    font-size: 1.2rem;
    text-transform: uppercase;
    margin: 34px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ice-line);
    display: flex;
    align-items: center;
}
h2::after {
    content: '';
    width: 7px; height: 7px;
    margin-left: 10px;
    background: var(--whistle);
    border-radius: 50%;
}
h3 { font-size: 1rem; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .02em; }

.subtitle { color: var(--ink-muted); margin: 0 0 20px; font-size: .95rem; }

a { color: var(--blue-line); }
a:hover { color: var(--whistle-dark); }

/* ---------------- Cards ---------------- */
.card {
    background: var(--ice-card);
    border-radius: var(--radius-lg);
    border-top: 3px solid var(--whistle);
    padding: 22px 24px;
    box-shadow: 0 1px 2px rgba(10,25,41,.06), 0 8px 24px -16px rgba(10,25,41,.25);
    margin-bottom: 18px;
    position: relative;
}
.card::before {
    content: '';
    position: absolute;
    top: -3px; left: 0;
    width: 34px; height: 3px;
    background: var(--blue-line);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

/* ---------------- Vereinsembleme ---------------- */
.team-crest {    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 0 0 2px rgba(255,255,255,.5), 0 2px 6px rgba(10,25,41,.35);
    flex-shrink: 0;
    vertical-align: middle;
}
.team-crest-logo { object-fit: cover; background: #fff; }

/* ---------------- Trikot-Grafik ---------------- */
.team-jersey { filter: drop-shadow(0 4px 10px rgba(10,25,41,.25)); }

/* ---------------- Flaggen-Icons ---------------- */
.flag-icon {
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(10,25,41,.12);
    border-radius: 4px;
}

/* ---------------- Live-Ticker (Broadcast-Leiste) ---------------- */
.live-ticker {
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    box-shadow: 0 8px 24px -16px rgba(10,25,41,.4);
}
.live-ticker .ticker-label {
    background: var(--whistle);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
    margin-right: -10px;
}
.live-ticker .ticker-items {
    display: flex;
    gap: 26px;
    overflow-x: auto;
    padding: 10px 20px 10px 24px;
    font-family: var(--font-mono);
    font-size: .82rem;
    scrollbar-width: thin;
}
.live-ticker .ticker-items a { color: #c3d2e0; text-decoration: none; white-space: nowrap; }
.live-ticker .ticker-items a:hover { color: #fff; }
.live-ticker .ticker-items strong { color: var(--whistle-light); }
.live-ticker .ticker-items a { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------- Liga-Übersichtsleiste (Startseite) ---------------- */
.league-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    margin-bottom: 8px;
}
.league-strip a {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    background: var(--navy);
    color: #fff;
    width: 84px;
    padding: 10px 6px;
    border-radius: var(--radius);
    text-align: center;
    border-top: 3px solid var(--whistle);
    transition: transform .12s ease;
}
.league-strip a:hover { transform: translateY(-2px); }
.league-strip a .code {
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.league-strip a .fill {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: #c3d2e0;
}

/* ---------------- Große Titelmeldung (Cover-Story) ---------------- */
.cover-story {
    background: var(--navy);
    background-image: linear-gradient(100deg, rgba(255,106,0,.20) 0%, transparent 55%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--whistle);
}
.cover-story .meta {
    font-family: var(--font-mono);
    font-size: .74rem;
    color: var(--whistle-light);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}
.cover-story h2 {
    color: #fff;
    border: none;
    margin: 0 0 10px;
    padding: 0;
    font-size: 1.5rem;
}
.cover-story h2::after { display: none; }
.cover-story p { color: #c3d2e0; margin: 0; }

/* ---------------- Zweispaltiges Spiele/Tabelle-Widget ---------------- */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 720px) {
    .split-grid { grid-template-columns: 1fr; }
}
.mini-table td, .mini-table th { padding: 8px 10px; font-size: .84rem; }
.mini-game-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ice-line);
    font-size: .86rem;
}
.mini-game-row:last-child { border-bottom: none; }
.mini-game-row .teams { display: flex; align-items: center; gap: 8px; }
.mini-game-row .when { color: var(--ink-muted); font-family: var(--font-mono); font-size: .78rem; white-space: nowrap; }

/* ---------------- Tables: Anzeigetafel-Look ---------------- */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ice-card);
    border-radius: var(--radius);
    overflow: hidden;
}
table.card-table { box-shadow: 0 1px 2px rgba(10,25,41,.06), 0 8px 24px -16px rgba(10,25,41,.25); }
th, td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--ice-line);
    font-size: .92rem;
    font-variant-numeric: tabular-nums;
}
th {
    background: var(--navy);
    background-image: linear-gradient(100deg, rgba(255,106,0,.28) 0%, transparent 35%);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: rgba(20,82,140,.035); }
tr:hover td { background: rgba(255,106,0,.06); }
td strong { font-family: var(--font-mono); font-weight: 600; }

/* ---------------- Badges (Liga-Tier als Trikot-Chip) ---------------- */
.badge {
    display: inline-block;
    padding: 3px 12px 3px 14px;
    font-family: var(--font-display);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--navy);
    color: #fff;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.badge-tier1 { background: var(--whistle); }
.badge-tier2,
.badge-tier3,
.badge-tier4,
.badge-tier5,
.badge-tier6,
.badge-tier7,
.badge-tier8,
.badge-tier9,
.badge-tier10 { background: var(--navy); }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-block;
    background: var(--whistle);
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
    text-decoration: none;
    transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
    box-shadow: 0 2px 0 var(--whistle-dark);
}
.btn:hover { background: var(--whistle-light); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--whistle-dark); }
.btn-secondary { background: var(--navy); box-shadow: 0 2px 0 #000f1c; }
.btn-secondary:hover { background: var(--navy-mid); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { background: #c7cfd8; box-shadow: none; cursor: not-allowed; transform: none; }

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--blue-line);
    outline-offset: 2px;
}

/* ---------------- Forms ---------------- */
form.stacked label {
    display: block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--ink-muted);
    margin: 14px 0 5px;
}
form.stacked input,
form.stacked select,
form.stacked textarea,
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ice-line);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: .95rem;
    background: #fff;
    color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--blue-line); }

/* ---------------- Flash-Meldungen ---------------- */
.flash {
    padding: 13px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: .92rem;
    border-left: 4px solid transparent;
}
.flash-error { background: #fcecee; color: var(--goal-line); border-left-color: var(--goal-line); }
.flash-ok    { background: #e7f5ef; color: var(--ok);        border-left-color: var(--ok); }

/* ---------------- Tabs ---------------- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--ice-line);
    overflow-x: auto;
}
.tabs a {
    padding: 9px 16px;
    text-decoration: none;
    color: var(--ink-muted);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color .15s ease, border-color .15s ease;
}
.tabs a:hover { color: var(--navy); }
.tabs a.active { color: var(--whistle-dark); border-bottom-color: var(--whistle); }

/* ---------------- News-Feed ---------------- */
.news-item { padding: 15px 0; border-bottom: 1px solid var(--ice-line); }
.news-item:last-child { border-bottom: none; }
.news-item .meta {
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.news-item h4 { margin: 5px 0 4px; font-size: 1rem; font-family: var(--font-display); font-weight: 500; }

/* ---------------- Stat-Kacheln ---------------- */
.stat-box { text-align: center; }
.stat-box .value {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--navy);
}
.stat-box .label {
    color: var(--ink-muted);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 2px;
}

/* ---------------- Hero (Startseite) ---------------- */
.hero {
    background: var(--navy);
    background-image:
        linear-gradient(115deg, rgba(255,106,0,.22) 0%, transparent 45%),
        radial-gradient(ellipse at top right, rgba(255,106,0,.18), transparent 50%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 46px);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--whistle);
}
.hero::before {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 220px; height: 220px;
    border: 2px solid rgba(255,106,0,.35);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    right: 0; bottom: 0;
    width: 46%; height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255,106,0,.08) 100%);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
    pointer-events: none;
}
.hero h1 { color: #fff; margin-bottom: 10px; }
.hero .subtitle { color: #c3d2e0; margin-bottom: 0; font-size: 1.02rem; }

/* ---------------- Footer ---------------- */
.site-footer {
    background: var(--navy);
    color: #7f93a8;
    padding: 26px 0;
    font-size: .82rem;
    border-top: 3px solid var(--whistle);
}
.site-footer a { color: var(--whistle-light); }
.site-footer .footer-links { margin-top: 8px; font-size: .82rem; }

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .site-header nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        padding: 8px 20px 16px;
        border-bottom: 3px solid var(--whistle);
    }
    .site-header nav.open { display: flex; }
    .site-header nav a { padding: 12px 8px; border-radius: 6px; }
    h1 { font-size: 1.5rem; }
    .hero { padding: 28px 20px; }
}
