﻿.timer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0; /*clamp(10px, 2vw, 40px);*/
    justify-items: center;
}

.unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.label {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: clamp(12px, 1.2vw, 16px);
    font-weight: 700;
}

.labelVP {
    margin-top: 16px;
    color: rgba(255, 255, 255, 1);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: clamp(24px, 5vw, 60px);
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.labelVP2 {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.73);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: clamp(16px, 3vw, 41px);
    margin-top: 0px;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.countdown-container {
    margin-bottom: 30px;
}

.flip-card {
    position: relative;
    width: 90%;
    max-width: 200px;
    height: clamp(100px, 20vw, 200px);
    border-radius: 22px;
    overflow: hidden;
    perspective: 1200px;
    background: linear-gradient(180deg, #182131 0%, #101827 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -1px 0 rgba(0, 0, 0, 0.45);
    transform-style: preserve-3d;
}

.static-card,
.turn-page {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.static-card {
    z-index: 1;
    background: linear-gradient( 180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.03) 48%, rgba(0,0,0,0.10) 52%, rgba(0,0,0,0.18) 100% ), linear-gradient(180deg, #334155 0%, #172235 55%, #0f1728 100%);
}

.turn-page {
    z-index: 3;
    transform-origin: 50% 50%;
    background: linear-gradient( 180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.05) 48%, rgba(0,0,0,0.12) 52%, rgba(0,0,0,0.22) 100% ), linear-gradient(180deg, #41526b 0%, #1a2740 55%, #11192b 100%);
    box-shadow: inset 0 -14px 24px rgba(0, 0, 0, 0.22), inset 0 14px 24px rgba(0, 0, 0, 0.18);
    transform-style: preserve-3d;
    will-change: transform;
    transform-origin: center center;
}

    .static-card .digit,
    .turn-page .digit {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #f3f4f6;
        font-weight: 800;
        font-size: clamp(32px, 6vw, 76px);
        line-height: 1;
        text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
        pointer-events: none;
        text-align: center;
        font-variant-numeric: tabular-nums;
    }

    .turn-page .digit {
        transform: translateZ(2px);
    }

    .turn-page::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: 0;
        background: linear-gradient( to bottom, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.38) 100% );
    }

    .turn-page::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 22px;
        background: linear-gradient(180deg, #0b1220, #020617);
        transform: rotateX(180deg) translateZ(1px);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

.page-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(2px);
    backface-visibility: hidden;
}

.hinge-line {
    position: absolute;
    top: calc(50% - 1px);
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(7, 10, 16, 0.95);
    z-index: 5;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07), 0 -1px 0 rgba(0, 0, 0, 0.55);
}

.hinge-dot {
    position: absolute;
    top: calc(50% - 6px);
    width: clamp(7px, 1vw, 16px);
    height: clamp(7px, 1vw, 16px);
    border-radius: 50%;
    z-index: 6;
    background: radial-gradient(circle at 35% 35%, #4b5563, #111827 70%);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.16), 0 1px 2px rgba(0, 0, 0, 0.45);
}

    .hinge-dot.left {
        left: clamp(3px, 2vw, 20px);
    }

    .hinge-dot.right {
        right: clamp(3px, 2vw, 20px);
    }

.flip-card.animate .turn-page {
    animation: fullPageTurn 0.72s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

    .flip-card.animate .turn-page::after {
        animation: fullPageShade 0.72s ease forwards;
    }

@keyframes fullPageTurn {
    0% {
        transform: translateZ(1px) rotateX(0deg);
    }

    50% {
        transform: translateZ(1px) rotateX(-90deg);
    }

    100% {
        transform: translateZ(1px) rotateX(-180deg);
    }
}

@keyframes fullPageShade {
    0% {
        opacity: 0;
    }

    40% {
        opacity: 0.22;
    }

    100% {
        opacity: 0.42;
    }
}
