* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #548687;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    overflow: hidden;
}

h1 {
    font-size: 5vmin;
    margin-bottom: 1vmin;
}

#turn-indicator {
    font-size: 4vmin;
    margin-bottom: 2vmin;
    color: #ffffc7;
}

.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game {
    width: 60vmin;
    height: 60vmin;
    display: flex;
    flex-wrap: wrap;
    gap: 1vmin;
    justify-content: center;
    align-items: center;
}

.box {
    width: 18vmin;
    height: 18vmin;
    font-size: 8vmin;
    border-radius: 1rem;
    border: none;
    background-color: #fff;
    color: #b0413e;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
    user-select: none;
    transition: transform 0.2s ease;
}

.box:hover {
    background-color: #e0e0e0;
    cursor: pointer;
    transform: scale(1.05);
}

.winning-box {
    background-color: #90ee90 !important;
    color: #000;
    font-weight: bold;
    animation: flash 0.8s ease-in-out infinite alternate;
}

@keyframes flash {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

#reset, #new-btn {
    padding: 1rem 2rem;
    font-size: 1.25rem;
    background-color: #191913;
    color: white;
    border: none;
    border-radius: 1rem;
    margin: 1rem 0.5rem;
    transition: background-color 0.3s ease;
}

#reset:hover, #new-btn:hover {
    background-color: #333;
    cursor: pointer;
}

#msg {
    font-size: 5vmin;
    color: #ffffc7;
    margin-bottom: 1rem;
}

.msg-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.msg-container.show {
    display: flex;
}

footer {
    margin-top: auto;
}
