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

:root {
    --grayish-blue: hsl(237, 18%, 59%);
    --soft-red: hsl(345, 95%, 68%);
    --white: hsl(0, 0%, 100%);
    --dark-desaturated-blue: hsl(236, 21%, 26%);
    --very-dark-blue: hsl(235, 16%, 14%);
    --very-dark-mostly-black-blue: hsl(234, 17%, 12%);
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    font-family: "Red Hat Text", sans-serif;
    background-color: var(--very-dark-blue);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-image: url(./images/bg-stars.svg);
}

.content {
    min-width: 50%;
    width: fit-content;
    height: fit-content;
    margin: 0 auto;
    margin-top: 7rem;
}



/*  i just make a simple flip card (with chatGPT help),
 and update it to 2 card can flip */
.card {
    perspective: 1000px;
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.top_wrapper,
.bot_wrapper {
    width: 100%;
    height: 50%;
    position: relative;
    transition: transform 0.5s ease-in-out;
    transform-style: preserve-3d;
    transform-origin: center center;
    backface-visibility: hidden;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 75px;
    backface-visibility: hidden;
    /* min-width: 200px; */
    border-radius: 1rem;
    background-color: var(--dark-desaturated-blue);
    z-index: 0;
    font-size: 5rem;
    font-weight: bolder;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: opacity 0.6s ease-in-out;
    color: var(--soft-red);
}



.top,
.bot {
    z-index: 2;
}

.top,
.top-back {
    opacity: .7;
    box-shadow: 0 -9px .5rem 1px black;

}

.bot,
.bot-back {
    box-shadow: 0 9px .5rem 1px black;
}

.top-back {
    transform: rotateX(180deg);
}

.top span,
.top-back span {
    transform: translateY(2.25rem);
}

.bot-back {
    transform: rotateX(-180deg);
}

.bot span,
.bot-back span {
    transform: translateY(-2.25rem);
}

.top_wrapper.flipped {
    transform: rotateX(180deg);
}

.bot_wrapper.flipped {
    transform: rotateX(-180deg);
}


.clock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;

}

.content h1 {
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: 7.5px;
    text-transform: uppercase;
    margin-bottom: 6.5rem;
    text-align: center;
    color: var(--white);
}

.card-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 200px;
}

.label {
    color: var(--grayish-blue);
    font-weight: bold;
    font-size: 0.875rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    display: block;
    text-align: center;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 270px;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-image: url(./images/pattern-hills.svg);
    transform: translateY(20%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem
}

.footer .icon {
    display: block;
    background-color: var(--white);
    width: 1.5rem;
    height: 1.5rem;
}

.footer .icon:hover {
    background-color: var(--soft-red);
}

@media (max-width:767px) {
    .content {
        width: 99%;
        margin: 0 auto;
    }

    .clock {
        gap: .5rem;
    }

    .card {
        height: 130px;
    }

    .card-container {
        min-width: 75px;
        gap: 3rem;
    }

    .card-face {
        font-size: 2rem;
        height: 65px;
    }

    .top span,
    .top-back span {
        transform: translateY(2rem);
    }

    .bot span,
    .bot-back span {
        transform: translateY(-2rem);
    }

    .label {
        letter-spacing: 2px;
    }
}