:root {
    --bg-color: #0c0c0e;
    --card-bg-top: linear-gradient(180deg, #2b2b30 0%, #1f1f23 100%);
    --card-bg-bottom: linear-gradient(180deg, #1b1b1e 0%, #131315 100%);
    --number-color-top: #f5f5f7;
    --number-color-bottom: #e5e5e8;
    --card-shadow: 0 clamp(10px, 2.5vw, 28px) clamp(20px, 4vw, 55px) rgba(0, 0, 0, 0.82),
                   0 3px 10px rgba(0, 0, 0, 0.6),
                   inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    --hinge-color: #0c0c0e;
    --label-color: #63636b;
    --font-fliqlo: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: #ffffff;
    font-family: var(--font-fliqlo);
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    background: 
        radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.11) 0%, rgba(15, 23, 42, 0.03) 45%, transparent 75%),
        radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        var(--bg-color);
    background-size: 100% 100%, 30px 30px, 100% 100%;
    animation: ambientBreathe 10s ease-in-out infinite alternate;
}

@keyframes ambientBreathe {
    0% {
        background-color: #0c0c0e;
    }
    100% {
        background-color: #0a0c10;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(1000px, 90vw);
    height: min(600px, 70vh);
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.04) 0%, rgba(30, 58, 138, 0.02) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body.hide-cursor {
    cursor: none;
}

.fliqlo-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 40px);
    position: relative;
    z-index: 1;
}

.fliqlo-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.8vw, 24px);
    width: 100%;
    max-width: 800px;
}

.fliqlo-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flip-card {
    position: relative;
    width: clamp(66px, 12vw, 138px);
    height: clamp(80px, 14.5vw, 164px);
    container-type: inline-size;
    perspective: 1200px;
    border-radius: clamp(8px, 1.4vw, 14px);
    box-shadow: var(--card-shadow);
}

.card-half {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.card-half.top {
    top: 0;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    background: var(--card-bg-top);
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
    transform-origin: bottom center;
}

.card-half.top .number {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: clamp(2.4rem, 8vw, 5.8rem);
    font-size: 68cqw;
    font-weight: 800;
    color: var(--number-color-top);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    box-sizing: border-box;
    padding: 0 4px;
}

.card-half.bottom {
    bottom: 0;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
    background: var(--card-bg-bottom);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transform-origin: top center;
}

.card-half.bottom .number {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: clamp(2.4rem, 8vw, 5.8rem);
    font-size: 68cqw;
    font-weight: 800;
    color: var(--number-color-bottom);
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    box-sizing: border-box;
    padding: 0 4px;
}

.hinge {
    position: absolute;
    top: calc(50% - 1px);
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--hinge-color);
    z-index: 10;
    pointer-events: none;
}

.hinge::before,
.hinge::after {
    content: '';
    position: absolute;
    top: -5px;
    width: clamp(5px, 0.8vw, 8px);
    height: clamp(9px, 1.4vw, 12px);
    background: var(--hinge-color);
    border-radius: 4px;
    z-index: 11;
}

.hinge::before {
    left: -3px;
}

.hinge::after {
    right: -3px;
}

.flap-top {
    display: none;
    z-index: 3;
}

.flap-bottom {
    display: none;
    z-index: 4;
    transform: rotateX(90deg);
}

.flip-card.flipping .flap-top {
    display: flex;
    animation: flipDownTop 0.28s ease-in forwards;
}

.flip-card.flipping .flap-bottom {
    display: flex;
    animation: flipDownBottom 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28) 0.26s forwards;
}

@keyframes flipDownTop {
    0% {
        transform: rotateX(0deg);
        filter: brightness(1);
    }
    100% {
        transform: rotateX(-90deg);
        filter: brightness(0.35);
    }
}

@keyframes flipDownBottom {
    0% {
        transform: rotateX(90deg);
        filter: brightness(1.25);
    }
    100% {
        transform: rotateX(0deg);
        filter: brightness(1);
    }
}

.unit-label {
    font-family: var(--font-fliqlo);
    font-size: clamp(0.65rem, 1.2vw, 0.85rem);
    font-weight: 700;
    letter-spacing: clamp(2px, 0.4vw, 4px);
    color: var(--label-color);
    text-transform: uppercase;
    margin-top: clamp(14px, 2.5vw, 24px);
}

@media (max-width: 480px) {
    .fliqlo-wrapper {
        padding: 12px 6px;
    }

    .fliqlo-clock {
        gap: 6px;
    }

    .flip-card {
        width: clamp(62px, 21vw, 76px);
        height: clamp(74px, 25vw, 92px);
    }

    .card-half.top .number,
    .card-half.bottom .number {
        font-size: clamp(2.2rem, 11vw, 2.7rem);
        font-size: 68cqw;
        letter-spacing: -0.04em;
    }

    .unit-label {
        font-size: 0.55rem;
        letter-spacing: 1.5px;
        margin-top: 8px;
    }
}




