:root {
    --primary-color-500: #0b94ca;
    --primary-color-600: #0a84b4;
    --primary-color-700: #075f86;

    --light-color: #ffffff;

    --dark-color-800: #0f172a;
    --dark-color-700: #1e293b;

    --card-light-color: #131313;
    --card-dark-color: #e5e7eb;

    --background-light-color: #e0f2fe;
    --background-dark-color: #0a0c0d;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, #ffffff 0%, #e0f2fe 35%, #bae6fd 100%);
    user-select: none;
    font-family: Arial, Helvetica, sans-serif;
}

.container {
    width: 100%;
    max-width: 48rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(12px);
}

h2 {
    font-size: 3em;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
}

.container .area-status {
    width: 100%;
    display: flex; 
    justify-content: space-around;
}

.container .area-status .area-timer {
    display: flex;
    flex-direction: column;
    align-items: center;

}

.container .area-status .area-timer .title-status,
.container .area-status .area-attempts .title-status{
    font-size: 16px;
    font-weight: 600;
}

.container .area-status .area-timer,
.container .area-status .area-attempts {
    display: flex;
    flex-direction: column;
    align-items: center;    
}

.area-btn {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
}

button {
    padding: 14px 24px;
    width: 100%;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: all ease-in-out 0.2s;
}

.start {
    background-color: var(--primary-color-500);
    color: var(--light-color);
}

.start:hover {
    background-color: var(--primary-color-600);
    
    transform: translateY(-2px);
}

.reset {
    background-color: var(--dark-color-800);
    color: var(--light-color);
}

.reset:hover {
    background-color: var(--dark-color-700);
    transform: translateY(-2px);
}

button:active {
    transform: scale(0.98);
}

.game {
    width: 100%;
    min-height: 26rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    transform-style: preserve-3d;
    perspective: 700px;
}

.item {
    position: relative;
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff, #dbeafe);
    border-radius: 16px;
    font-size: 2.4em;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transform: rotateY(180deg);
    transition: 0.35s;
    cursor: pointer;
}

.item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background:
        linear-gradient(135deg, var(--primary-color-500), var(--primary-color-700));
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
    transition: 0.35s;
    backface-visibility: hidden;
}

.item:hover {
    transform: rotateY(180deg) translateY(-4px);
}

.boxOpen,
.boxMatch {
    transform: rotateY(0deg);
    pointer-events: none;
}

.boxOpen::after,
.boxMatch::after {
    transform: rotateY(180deg);
}

.boxMatch {
    background: linear-gradient(145deg, #dcfce7, #bbf7d0);
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.25);
}

@media (max-width: 600px) {
    .container {
        max-width: 90%;
        padding: 28px 20px;
    }

    h2 {
        font-size: 2rem;
    }

    .item {
        width: 4.8rem;
        height: 4.8rem;
        font-size: 2em;
    }

    .game {
        min-height: auto;
    }
}