:root {
    --active: oklch(68.5% 0.169 237.323);
    --border: oklch(50% 0.134 242.749);
    --passive: oklch(97.7% 0.013 236.62);
    --drain: 0; /* wird per JS dynamisch pro .segment gesetzt */
}

body {
    font-family: 'Sniglet', cursive;
}

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

.schlangenabschnitt {
    align-items: center;
    background: var(--passive);
    border: none;
    color: #64748b;
    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: 2px solid var(--border);
}

.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: calc(var(--drain, 0) * 100%);
    background: var(--active);
    pointer-events: none;
}

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

.segment.filled,
.segment.active {
    color: #ffffff;
}

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

.advice--green {
    color: oklch(65% 0.2 145);
}

.advice--yellow {
    color: oklch(70% 0.18 85);
}

.advice--red {
    color: oklch(55% 0.22 25);
}

@media (max-width: 900px) {
    /* 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: 32px;
        width: auto;
    }

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

    /* Überschrift ausblenden auf Handy */
    .crashpoint > div:first-child {
        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;
    }
}
