/* =====================================================================
   Globale Basis & Hintergrund-Ebene
   ===================================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0b1320; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    cursor: pointer;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('kanzleramt.jpg');
    background-size: cover;
    background-position: 50% center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    z-index: 1;
    transition: background-position 0.4s ease-out;
}

/* =====================================================================
   Kopf- und Fußzeilen (Top / Bottom Bar) - Permanent Sichtbar
   ===================================================================== */
.top-bar, .bottom-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

.bar-center {
    font-weight: bold;
}

/* =====================================================================
   Asymmetrische Monumental-Überschrift & PHYSIKALISCHER STURZ
   ===================================================================== */
h1 {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    margin: 10px auto 0 auto;
    text-transform: uppercase;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.85);
    z-index: 10;
    color: #ffffff;
    padding: 0 20px;
    user-select: none;
}

h1 span.part-1 {
    font-size: 11vw;
    font-weight: 300;
    text-align: left;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.85);
    display: inline-block;
    transform-origin: bottom left;
}

h1 span.part-2 {
    font-size: 12vw;
    font-weight: 900;
    text-align: right;
    letter-spacing: 2px;
    margin-top: -5px;
    display: inline-block;
    transition: opacity 1.5s ease-out;
    white-space: nowrap; 
}

.kanzler-stuerzt {
    animation: kanzlerFall 1.8s forwards ease-in;
}

@keyframes kanzlerFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    15% { transform: translateY(5px) rotate(-3deg); }
    30% { transform: translateY(0) rotate(2deg); }
    100% { transform: translateY(120vh) rotate(-15deg); opacity: 0; }
}

#zeichen.phase-1-hidden {
    visibility: hidden;
}

#zeichen {
    color: #c0392b;
    font-weight: 900;
    margin-left: 2px;
    display: inline-block;
    visibility: visible;
}
/* =====================================================================
   Zentraler Block mit absolut starrer Monospace-Schrift
   ===================================================================== */
.center-block {
    z-index: 10;
    text-align: center;
    margin: auto auto;
    color: #ffffff;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.9);
    user-select: none;
    transition: opacity 1s ease-out;
}

.time-box {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 5px;
    font-family: 'Courier New', Courier, monospace; 
}

.countdown-box {
    font-size: 22px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 2px;
    font-family: 'Courier New', Courier, monospace;
}

.countdown-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #7f8c8d;
    margin-bottom: 2px;
}

/* =====================================================================
   Unterer Block (Datum & Button)
   ===================================================================== */
.bottom-block {
    margin-top: 0;
    margin-bottom: auto;
    text-align: center;
    z-index: 10;
    transition: opacity 1s ease-out;
}

.wahl-datum {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    user-select: none;
}

.btn {
    display: inline-block;
    background: #c0392b;
    color: #ffffff;
    text-decoration: none;
    padding: 16px 50px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
    transition: background 0.2s, transform 0.2s;
    border: none;
}

.btn:hover {
    background: #a93226;
    transform: translateY(-2px);
}

/* =====================================================================
   Interaktive Navigations-Pfeile
   ===================================================================== */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 28px;
    font-weight: bold;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 6px;
    z-index: 20;
    user-select: none;
    transition: background 0.2s, color 0.2s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.nav-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-arrow:hover {
    background: rgba(192, 41, 43, 0.8);
    color: #ffffff;
}

.arrow-left { left: 20px; }
.arrow-right { right: 20px; }

/* =====================================================================
   Bildnachweis & Mobile Abrundungen
   ===================================================================== */
.credit-bar {
    width: 100%;
    text-align: center;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    font-style: italic;
    z-index: 5;
    padding: 0 20px;
    margin-bottom: 5px;
    transition: opacity 0.3s ease-out;
}

.credit-bar a { color: rgba(255, 255, 255, 0.4); text-decoration: underline; }
.credit-bar a:hover { color: #ffffff; }

/* Desktop-Anpassung ohne störendes Leerzeichen */
@media (min-width: 1024px) {
    h1 {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        font-size: 5.5vw;
        letter-spacing: 6px;
        white-space: nowrap; 
        margin-top: 20px;
    }
    h1 span.part-1 { font-size: inherit; text-align: center; }
    h1 span.part-2 { 
        font-size: inherit; 
        text-align: center; 
        margin-top: 0; 
        margin-left: 0px; /* Radikal auf 0 gesetzt: Schließt die Lücke sofort! */
    }
}

@media (min-width: 1600px) { h1 { font-size: 88px; } }

@media (max-width: 600px) {
    .nav-arrow { padding: 10px 14px; font-size: 20px; }
    .top-bar, .bottom-bar { padding: 15px 20px; font-size: 11px; }
    .time-box { font-size: 28px; }
    .countdown-box { font-size: 16px; }
}
