:root {
    /*--active: oklch(74.6% 0.16 232.661);
    --dark: oklch(50% 0.134 242.749);
    --passive: oklch(95.1% 0.026 236.824);*/
    --active: #cf8618;
    --dark: #44403b;
    --passive: #ffffff;
    --advice-green: #97d644;
    --advice-yellow: #f8b943;
    --advice-red: #f33363;
    --advice-green-dark: #2f6600;
    --advice-yellow-dark: #b96510;
    --advice-red-dark: #af0030;
    --drain: 0;
    /* wird per JS dynamisch pro .segment gesetzt */
}

body {
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}

.font-display {
    font-family: 'Luckiest Guy', cursive;
}

.crashpoint {
    background-image: url('../img/crashpoint-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.schlange {
    border-color: var(--dark);
}

.schlangenabschnitt {
    align-items: center;
    background: var(--passive);
    border: none;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    flex: 1;
    font-size: clamp(1rem, 1.2rem, 1.5rem);
    /*font-size: clamp(1.6rem, 3.5vw, 3rem);*/
    /*font-weight: 800;*/
    height: 120px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    position: relative;
    touch-action: manipulation;
    transition: color 0.15s;
    user-select: none;
}

.schlangenabschnitt+.schlangenabschnitt {
    border-left: 4px solid var(--dark);
}

.schlangenabschnitt:active {
    filter: brightness(0.9);
}

.schlangenabschnitt:disabled {
    cursor: default;
    pointer-events: none;
}

.segment::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--active);
    pointer-events: none;
    transform: scaleY(var(--drain, 0));
    transform-origin: bottom center;
}

.segment>span {
    position: relative;
    z-index: 1;
}

.segment.filled,
.segment.active {
    color: var(--dark);
}

.segment.advice--green::before {
    background: var(--advice-green);
}

.segment.advice--yellow::before {
    background: var(--advice-yellow);
}

.segment.advice--red::before {
    background: var(--advice-red);
}

/* --- Info-Popup --- */
#info-modal:not(.hidden) {
    display: flex;
}

@keyframes timer-drain {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: 125.66; }
}

#timer-ring.running {
    animation: timer-drain 60s linear forwards;
}

#info-close:hover span {
    color: #1c1917;
}

/* --- Ende Info-Popup --- */

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}

.output-info .advice {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.output-info .advice.advice--green {
    color: var(--advice-green-dark);
}

.output-info .advice.advice--yellow {
    color: var(--advice-yellow-dark);
}

.output-info .advice.advice--red {
    color: var(--advice-red-dark);
}

@media (max-width: 1023px) {

    /* Stage füllt den gesamten Bildschirm */
    .stage {
        width: 100vw !important;
        height: 100dvh !important;
        border-radius: 0 !important;
    }

    /* Schlange ausblenden */
    .schlange {
        display: none !important;
    }

    /* Logo kleiner und angepasst */
    .logo img {
        height: 64px;
        width: auto;
    }

    /* Crashpoint-Layout: Inhalt zentrieren */
    .crashpoint {
        justify-content: center !important;
        align-items: center !important;
        gap: 2rem;
    }

    /* Überschrift ausblenden auf Handy */
    .headline h1 {
        /*display: none;*/
    }

    /* Info-Bereich: volle Breite, zentriert, größer */
    .info {
        width: 100% !important;
        border-radius: 0 !important;
        justify-content: center !important;
    }

    .info>div {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 2rem !important;
        width: 100%;
        gap: 1.5rem !important;
    }

    .input-info span {
        font-size: 1.2rem !important;
    }

    .output-info {
        align-items: center !important;
    }

    .advice {
        font-size: 1.8rem !important;
        font-weight: bold;
        line-height: 1.3;
    }

    .last-clicked {
        font-size: 1rem !important;
        color: #94a3b8;
    }

    /* Warmup / Break / Sleep Screens */
    .warmup h2,
    .break h2 {
        font-size: 2rem !important;
    }

    .warmup p,
    .break p {
        font-size: 1.2rem !important;
        text-align: center;
        padding: 0 1rem;
    }

    .countdown {
        font-size: 3.5rem !important;
    }

    .break-countdown {
        font-size: 3.5rem !important;
    }

    .sleep p {
        font-size: 1.5rem !important;
        text-align: center;
        padding: 0 1rem;
    }
}
