@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&family=Bebas+Neue&display=swap');

:root {
    --bg-color: #1a1c23; /* Kühler dunkler Hintergrund */
    --text-color: #d1d5db; /* Helles Grau für gute Lesbarkeit */
    --sidebar-bg: #111318;
    --accent-color: #3b82f6; /* Kaltes Blau für Links und Akzente */
    --accent-hover: #60a5fa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Assistant, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Layout --- */
.layout-wrapper {
    display: flex;
    min-height: 100dvh;
}

/* --- Sidebar --- */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid #2d3748;
    transition: transform 0.3s ease, margin-left 0.3s ease;
    flex-shrink: 0;
    
    /* NEU: Flexbox, um den Inhalt vertikal zu ordnen */
    display: flex;
    flex-direction: column;
	user-select: none;
}

/* Klasse zum Einklappen per JS */
.sidebar.collapsed {
    margin-left: -300px; 
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #2d3748;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: #fff;
}

/* Diese Klasse wird per JavaScript hinzugefügt, solange gedrückt wird */
.sidebar.dragging {
    transition: none !important; 
}

.boss-nav {
    /* Nimmt den gesamten verfügbaren Platz ein und schiebt den Footer nach unten */
    flex-grow: 1; 
    /* Erlaubt das Scrollen der Boss-Liste, falls der Bildschirm mal sehr klein ist */
    overflow-y: auto; 
}

.boss-nav ul {
    list-style: none;
    padding: 20px 0;
}

.boss-nav li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    /* NEU: Ein transparenter Rand als Platzhalter */
    border-left: 3px solid transparent; 
}

.boss-nav li a:hover, .boss-nav li a.active {
    background-color: #2d3748;
    color: var(--accent-color);
    /* Hier ändert sich jetzt nur noch die Farbe des Randes, nicht mehr die Breite */
    border-left-color: var(--accent-color); 
}

/* --- Main Content --- */
.main-content {
    flex-grow: 1;
    padding: 20px;
    overflow-x: hidden;
}

.toggle-btn {
    background: var(--sidebar-bg);
    color: var(--text-color);
    border: 1px solid #2d3748;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 1rem;
    transition: background 0.2s;
}

.toggle-btn:hover {
    background: #2d3748;
}

/* --- Guide Container (Die Breitenbegrenzung!) --- */
.guide-container {
    max-width: 850px; /* Text wird nicht breiter als das */
    margin: 0 auto; /* Zentriert den Textblock in der Mitte */
    background-color: #222631;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.guide-container h1, .guide-container h2 {
    color: #fff;
    margin-bottom: 15px;
    margin-top: 30px;
}

.guide-container h1 { margin-top: 0; font-family: 'Bebas Neue'; }

.guide-container p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.guide-container a {
    color: var(--accent-color);
    text-decoration: none;
}

.guide-container a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.guide-container ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.guide-container li {
    margin-bottom: 8px;
}

/* --- Bilder im Text --- */
.guide-image {
    margin: 30px 0;
    text-align: center;
}

.guide-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in; /* Zeigt an, dass es klickbar ist */
    transition: transform 0.2s;
    border: 2px solid #2d3748;
}

.guide-image img:hover {
    transform: scale(1.02);
}

.guide-image figcaption {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 8px;
    font-style: italic;
}

/* --- Lightbox (Bildvergrößerung) --- */
.lightbox {
    display: none; /* Standardmäßig versteckt */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* --- Overlay für Mobile (Unschärfe & Klick-Fläche) --- */
.sidebar-overlay {
    display: none; /* Auf Desktop komplett ignoriert */
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        z-index: 100;
        margin-left: -300px; /* Standardmäßig auf Handys zugeklappt */
    }
	
	.sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.4); /* Leichtes Abdunkeln */
        backdrop-filter: blur(5px); /* Der Unschärfe-Effekt! */
        -webkit-backdrop-filter: blur(5px); /* Für Safari */
        z-index: 90; /* Unter der Sidebar (die ist 100), aber über dem Text */
        
        opacity: 0;
        pointer-events: none; /* Klicks gehen durch, wenn unsichtbar */
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto; /* Fängt Klicks ab, wenn sichtbar */
    }
    
    .sidebar.open {
        margin-left: 0;
        box-shadow: 2px 0 15px rgba(0,0,0,0.5);
    }

    .guide-container {
        padding: 20px;
    }
	
	.sidebar-footer {
        /* Nutzt den Standard-Abstand (20px) PLUS den sicheren Bereich des Handys */
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* --- Hinweisboxen (Alerts) --- */
.alert-box {
    padding: 15px 20px;
    margin: 25px 0;
    border-left: 4px solid;
    border-radius: 0 8px 8px 0; /* Nur rechts abgerundet, links ist der dicke Rand */
    font-size: 0.95rem;
}

/* Der Titel in der Box */
.alert-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Tank (Blau) */
.alert-tank {
    border-left-color: #3b82f6; 
    background-color: rgba(59, 130, 246, 0.1); /* Sehr transparentes Blau */
}
.alert-tank strong { color: #60a5fa; }

/* Heiler (Grün) */
.alert-healer {
    border-left-color: #10b981; 
    background-color: rgba(16, 185, 129, 0.1);
}
.alert-healer strong { color: #34d399; }

/* Warnung / Wichtige Mechanik (Rot) */
.alert-warning {
    border-left-color: #ef4444; 
    background-color: rgba(239, 68, 68, 0.1);
}
.alert-warning strong { color: #f87171; }

/* --- Phasen-Trenner --- */
.phase-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 40px 0 25px 0;
}

.phase-divider::before,
.phase-divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px dashed #3f3f46; /* Gestrichelte Linie */
}

.phase-divider span {
    padding: 0 15px;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Code / Makro Box --- */
.code-box {
    background-color: #0d0d0f;
    border: 1px solid #2d3748;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.code-header {
    background-color: #1f222b;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2d3748;
    font-size: 0.9rem;
    color: #9ca3af;
}

.code-box pre {
    padding: 15px;
    margin: 0;
    overflow-x: auto;
    color: #a78bfa; /* Leicht violetter Text für den Code */
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}

.copy-btn {
    background-color: #374151;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.copy-btn:hover { background-color: var(--accent-color); }

/* --- NEU: Footer und rundes Logo --- */
.sidebar-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #2d3748; /* Optische Trennung zur Boss-Liste */
    background-color: var(--sidebar-bg); /* Verhindert, dass Text beim Scrollen durchscheint */
}

.guild-logo {
    width: 80px; /* Größe deines Logos - gerne anpassen */
    height: 80px;
    border-radius: 50%; /* Macht das Bild perfekt rund! */
    object-fit: cover; /* Verhindert, dass das Bild verzerrt wird */
    border: 2px solid #2d3748;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.guild-logo:hover {
    transform: scale(1.05); /* Leichter Zoom-Effekt beim Drüberfahren */
    border-color: var(--accent-color); /* Rand leuchtet in deiner Akzentfarbe (Blau) */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); /* Leichter blauer Schein */
}

/* --- Standard (Desktop) --- */
.boss-header {
    margin: -40px -40px 30px -40px;
    height: 200px;
    border-radius: 10px 10px 0 0;
    position: relative;
    overflow: hidden;
	user-select: none;
}

.boss-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zauberwort: Bild füllt den Kasten perfekt aus, ohne zu verzerren */
    object-position: center 20%; /* Entspricht dem alten background-position */
    z-index: 0; /* Legt das Bild nach ganz hinten */
}

/* --- Mobile Fix (absolut erzwungen durch !important) --- */
@media (max-width: 768px) {
    .boss-header {
        /* Zieht exakt die 20px Padding des Mobile-Containers ab */
        margin: -20px -20px 20px -20px !important; 
        height: 150px !important;
        border-radius: 10px 10px 0 0 !important;
    }
	
	/* 1. Weniger Innenabstand im Overlay für mehr Text-Platz */
    .boss-header-overlay {
        padding: 20px !important; 
    }

    /* 2. Die Hauptüberschrift verkleinern und Umbrüche erlauben */
    .boss-header-overlay h1 {
        font-size: 1.5rem !important; /* Deutlich kleiner auf dem Handy */
        line-height: 1.2 !important; 
        overflow-wrap: break-word; /* Verhindert, dass ultralange Wörter das Layout sprengen */
        hyphens: auto; /* Erlaubt dem Browser im Notfall Silbentrennung */
    }

    /* 3. Den Untertitel ebenfalls anpassen */
    .boss-subtitle {
        font-size: 0.75rem !important;
        line-height: 1.3;
        display: block; /* Sorgt für einen sauberen Umbruch unter der Überschrift */
        margin-top: 5px;
    }
    
    /* Zur Sicherheit: Stellt sicher, dass der Container auf Mobile wirklich 20px Padding hat */
    .guide-container {
        padding: 20px !important;
    }
}

.boss-header-overlay {
position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
    background: linear-gradient(
        to bottom, 
        rgba(26, 28, 35, 0.3) 0%,   /* Startet oben schon leicht abgedunkelt (30%) */
        rgba(26, 28, 35, 0.85) 60%, /* Ist etwas über der Mitte schon sehr dunkel (85%) */
        rgba(26, 28, 35, 1) 100%    /* Unten beim Text komplett massiv (100%) */
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 40px;
    z-index: 1;
}

.boss-header-overlay h1 {
    margin: 0;
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.boss-subtitle {
    color: var(--accent-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.tldr-box {
    background-color: #262a33;
    border: 1px solid #4b5563;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.tldr-box strong {
    display: block;
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.tldr-box ul { margin-bottom: 0; }

/* --- YouTube Click-to-Load Container --- */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px; /* Passt sich an deinen Text-Container an */
    margin: 30px auto;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    aspect-ratio: 16 / 9; /* Erzwingt automatisch das 16:9 Format! */
    cursor: pointer;
    border: 2px solid #2d3748;
}

/* Das automatisch geladene Vorschaubild */
.video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.video-container:hover img {
    opacity: 1;
}

/* Der Play-Button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 50px;
    background-color: rgba(220, 38, 38, 0.9); /* YouTube-Rot */
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s, transform 0.2s;
}

/* Das kleine weiße Dreieck im Play-Button */
.play-button::before {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 5px; /* Optisch zentrieren */
}

.video-container:hover .play-button {
    background-color: #ef4444; /* Helles Rot beim Drüberfahren */
    transform: translate(-50%, -50%) scale(1.1); /* Wird leicht größer */
}

/* Das finale Iframe (das echte Video) */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Scroll to Top Button --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 50%; /* Macht den Button perfekt rund */
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); /* Leichter Schatten */
    z-index: 95; /* Unter der Sidebar, aber über dem Text */
    
    /* Flexbox für perfekte Zentrierung des Pfeils */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Animationen (Startzustand: unsichtbar und leicht nach unten versetzt) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
}

/* Diese Klasse wird per JS hinzugefügt, wenn man scrollt */
/* --- Scroll to Top Button --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    
    background-color: var(--sidebar-bg); /* Dunkler Hintergrund */
    border: 2px solid var(--accent-color); /* Leuchtender Rand in deiner Akzentfarbe */
    border-radius: 50%;
    
    /* Flexbox zum perfekten Zentrieren des SVGs */
    display: flex;
    justify-content: center;
    align-items: center;
    
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    z-index: 95;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* Das Vektor-Icon im Button stylen */
.scroll-to-top svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color); /* Der Pfeil leuchtet in deiner Akzentfarbe */
    transition: color 0.3s ease;
}

/* Zeigt den Button an (wird per JS gesteuert) */
.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover-Effekt */
.scroll-to-top:hover {
    background-color: var(--accent-color); /* Button füllt sich mit Farbe */
    transform: translateY(-5px); 
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); /* Blauer Glow-Effekt */
}

/* Beim Drüberfahren wird der Pfeil weiß */
.scroll-to-top:hover svg {
    color: #fff;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px; right: 20px;
        width: 45px; height: 45px;
    }
    .scroll-to-top svg {
        width: 20px; height: 20px;
    }
}