/* -----------------------------
   Design-Variablen (Tokens)
------------------------------ */
:root {
    /* Farben */
    --brand: #f0c040;
    /* Primäres Gelb */
    --brand-600: #e0b030;
    /* Dunkleres Gelb */
    --ink-900: #111;
    /* Sehr dunkles Grau */
    --ink-800: #1a1a1a;
    --ink-700: #222;
    --text: #444;
    /* Standardtextfarbe */
    --muted: #555;
    /* Abgeschwächte Textfarbe */
    --hint-bg: #fffbe6;
    /* Hintergrundfarbe für Hinweisboxen */
    --hint-border: #f0d96b;
    /* Rahmenfarbe für Hinweisboxen */
    --danger: #dc3545;
    /* Rot für Warnungen */
    --success: #5cb85c;
    /* Grün für Erfolg */

    /* Layout & Abstände */
    --radius: 8px;
    /* Standard-Eckenradius */
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 20px;
    --shadow-1: 0 2px 0 rgba(0, 0, 0, .12);
    --shadow-1h: 0 3px 0 rgba(0, 0, 0, .14);

    /* Timeline-Einstellungen */
    --rail-width: 4px;
    /* Senkrechte Linie */
    --dot-size: 35px;
    /* Punktdurchmesser */
    --dot-border: 4px;
    /* Randbreite um den Punkt */
    --top-offset: 130px;
    /* Scroll-Offset für Ankerpunkte */
}

/* Schriftarten für mehrere Bereiche */
:root,
.content,
.quickstart,
.hint-box {
    font-family: "Segoe UI", Arial, sans-serif;
}

/* Hilfsklasse */
.text-current {
    color: currentColor;
}

/* =================================================================
   Header-Bereich
================================================================= */
#header {
    background: url("../../images/mgpd.webp") no-repeat center / cover;
    min-width: 100%;
    min-height: 400px;
    height: 30vh;
    z-index: 0;
    display: flex;
    align-items: center;
    background-attachment: scroll;
}

/* =================================================================
   Hinweisboxen (Hinweis, Warnung, Erfolg)
================================================================= */
.hint-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    background: var(--hint-bg);
    border: 1px solid var(--hint-border);
    border-left: 6px solid var(--brand);
    padding: var(--space-3);
    border-radius: var(--radius);
    margin: var(--space-3) 0;
    color: var(--text);
}

.hint-box i {
    color: var(--brand);
    font-size: 1.6rem;
    margin-top: 0 !important;
    line-height: 1 !important;
    align-self: flex-start !important;
}

.hint-box p {
    margin: -2px 0 0 0 !important;
    line-height: 1.45;
    align-self: flex-start !important;
}

/* Varianten der Hinweisboxen */
.hint-box.warning {
    background: #fdecea;
    border-color: #f5b5b5;
    border-left-color: var(--danger);
}

.hint-box.warning i {
    color: var(--danger);
}

.hint-box.success {
    background: #e8f7e8;
    border-color: #b7e0b7;
    border-left-color: var(--success);
}

.hint-box.success i {
    color: var(--success);
}

.fa-hand-point-right {
    color: var(--brand);
    margin-right: 6px;
}

/* =================================================================
   Zurück-Button
================================================================= */
.button-wrapper {
    text-align: center;
    margin-top: 20px;
}

.back-button {
    display: inline-block;
    padding: 12px 20px;
    background-color: #ffd83d;
    color: var(--ink-700);
    font: 600 1rem "Segoe UI", Arial, sans-serif;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid var(--brand-600);
    line-height: 1.2;
    vertical-align: middle;
    cursor: pointer;
    box-shadow: var(--shadow-1);
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.back-button:hover {
    background-color: var(--brand);
    color: var(--ink-800);
    box-shadow: var(--shadow-1h);
}

.back-button:active {
    background-color: var(--brand-600);
    color: var(--ink-900);
    box-shadow: var(--shadow-1);
}

.back-button i {
    margin-right: 8px;
    font-size: 1.1rem;
    color: inherit;
}

/* =================================================================
   Schnellstart-Bereich
================================================================= */
.quickstart {
    background: var(--hint-bg);
    border-left: 6px solid var(--brand);
    padding: var(--space-4);
    margin: var(--space-3) 0 24px;
    border-radius: var(--radius);
    color: var(--text);
}

.quickstart h2 {
    margin-top: 0;
    color: var(--text);
}

.quickstart ol {
    list-style-type: decimal !important;
    margin-left: 1.5rem;
    color: var(--muted);
    line-height: 1.6;
}

.quickstart a {
    color: #c98d00;
    font-weight: 600;
    text-decoration: none;
}

.quickstart a:hover {
    text-decoration: underline;
}

.quickstart-cta {
    margin-top: 12px;
    font-weight: 600;
    color: var(--ink-700);
}

.quickstart ol li::marker {
    font-weight: bold;
}

.quickstart ol li i,
.quickstart-cta i,
.hint-box i,
.fa-hand-point-right {
    color: var(--brand);
}

.quickstart ol li i {
    margin-right: 6px;
    width: 20px;
    text-align: center;
}

.quickstart h2 i {
    color: #ff9800;
    transition: color .3s ease, transform .3s ease, text-shadow .3s ease;
}

.quickstart h2 i:hover {
    color: #ffc107;
    transform: scale(1.2) rotate(-5deg);
    text-shadow: 0 0 8px #ffc107;
}

/* =================================================================
   Inhalt & Video-Einbettung
================================================================= */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.content,
.content p,
.content ul,
.content ol,
.content li {
    color: var(--content-color, inherit);
}

.main-content ul,
.main-content ol {
    list-style: inherit;
}

.video-container {
    width: 100%;
    max-width: 100%;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
}

@supports not (aspect-ratio: 16 / 9) {
    .video-container {
        height: 0;
        padding-bottom: 56.25%;
    }
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    max-width: 100%;
}

/* =================================================================
   Fortschritts-Timeline
================================================================= */
.layout-with-timeline {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 64px;
    align-items: start;
}

.progress-container {
    position: sticky;
    top: 120px;
    width: 260px;
    min-width: 260px;
    z-index: 1;
}

.progress-timeline {
    --dot-left: calc(-0.5 * (var(--dot-size) + 2*var(--dot-border) + var(--rail-width)));
    position: relative;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    height: 80vh;
    min-height: 520px;
    border-left: var(--rail-width) solid var(--brand);
}

.progress-timeline li {
    position: absolute;
    left: 0;
    transform: translateY(-50%);
    padding-left: 30px;
    color: #888;
    cursor: pointer;
    transition: color .2s ease;
    line-height: 1.35;
    font-size: 1.02rem;
    max-width: 220px;
}

.progress-timeline li::before {
    content: "";
    position: absolute;
    left: var(--dot-left);
    top: 50%;
    transform: translateY(-50%);
    width: var(--dot-size);
    height: var(--dot-size);
    background: var(--ink-900);
    border: var(--dot-border) solid var(--brand);
    border-radius: 50%;
    z-index: 1;
}

.progress-timeline li>i {
    position: absolute;
    left: calc(var(--dot-left) + (var(--dot-size) + 2*var(--dot-border)) / 2);
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--dot-size) - 2 * var(--dot-border));
    height: calc(var(--dot-size) - 2 * var(--dot-border));
    line-height: calc(var(--dot-size) - 2 * var(--dot-border));
    text-align: center;
    font-size: 1.2rem;
    margin: 0 !important;
    color: currentColor;
    pointer-events: none;
    z-index: 2;
}

.progress-timeline li.active {
    color: var(--brand);
    font-weight: 600;
}

.progress-timeline li.active>i {
    color: var(--ink-900);
}

.progress-timeline li.active::before {
    background: var(--brand);
    box-shadow: 0 0 10px rgba(240, 192, 64, .6);
}

.progress-timeline li:hover {
    color: #555;
}

.main-content {
    position: relative;
    z-index: 2;
    display: block;
    min-width: 0;
}

.main-content .section-title {
    scroll-margin-top: var(--top-offset);
    margin-top: 40px;
    margin-bottom: 10px;
}

.main-content .description,
.main-content p {
    margin: 12px 0 18px;
}

.main-content ul {
    margin: 8px 0 18px 1.5rem !important;
    padding-left: 1.2rem !important;
}

.main-content .hint-box {
    margin: 18px 0 !important;
}

/* Überschriften-Abstände angleichen */
h1,
h2,
h4,
h5,
h6 {
    margin-bottom: .85em !important;
}

h2[id],
section[id] {
    scroll-margin-top: var(--top-offset);
}

/* =================================================================
   Rollenliste & Badges
================================================================= */
.role-badges {
    list-style: none;
    margin: 0;
    padding: 0;
}

.role-badges li {
    display: grid;
    grid-template-columns: minmax(130px, max-content) 1fr;
    column-gap: 16px;
    align-items: start;
    justify-items: start;
    margin: 10px 0;
    line-height: 1.55;
    color: var(--content-color, inherit);
}

.role-badges li>.role-badge {
    margin-left: -12px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1;
}

.role-badge i {
    margin: 0 !important;
    font-size: 0.95em;
}

/* Rollenfarben */
.role-badge.admin {
    color: #e74c3c;
    background: #e74c3c1a;
    border-color: #e74c3c33;
}

.role-badge.moderator {
    color: #e67e22;
    background: #e67e221a;
    border-color: #e67e2233;
}

.role-badge.streamer {
    color: #9b59b6;
    background: #9b59b61a;
    border-color: #9b59b633;
}

.role-badge.spieler {
    color: #3498db;
    background: #3498db1a;
    border-color: #3498db33;
}

/* =================================================================
   Feineinstellungen Design
================================================================= */
.content,
.content p,
.content li {
    line-height: 1.7;
}

.section-title {
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    letter-spacing: 0.2px;
}

/* =================================================================
   Responsive Anpassungen
================================================================= */
@media (max-width: 1000px) {
    .layout-with-timeline {
        display: block;
    }

    .progress-container {
        display: none;
    }

    #contacts .content {
        padding-left: 10px;
    }
}

@media (max-width: 768px) {
    .button-wrapper {
        margin-top: 28px;
    }

    .role-badges li {
        grid-template-columns: minmax(120px, max-content) 1fr;
        column-gap: 12px;
    }

    .role-badge {
        padding: 5px 10px;
        gap: 6px;
    }

    .role-badge i {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .role-badges li {
        grid-template-columns: 1fr;
        row-gap: 6px;
        column-gap: 0;
    }

    .role-badge {
        justify-self: start;
    }

    .role-badges li> :last-child {
        word-break: break-word;
        hyphens: auto;
    }
}

/* Timeline-Anpassung bei geringer Fensterhöhe */
@media (max-height: 700px) {
    .progress-timeline {
        --dot-size: 28px;
        --dot-border: 3px;
    }

    .progress-timeline li {
        font-size: 0.95rem;
    }

    .progress-timeline li i {
        font-size: calc(var(--dot-size) * 0.45);
    }
}

@media (max-height: 560px) {
    .progress-timeline {
        --dot-size: 22px;
        --dot-border: 2px;
    }

    .progress-timeline li {
        font-size: 0.9rem;
    }

    .progress-timeline li i {
        font-size: calc(var(--dot-size) * 0.45);
    }
}