* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #f0f0f0;
    color: #1c1c1e;
    min-height: 100vh;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.2rem;
    color: #1c1c1e;
    font-weight: 700;
}

#game-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 30px;
}

.row {
    display: flex;
    gap: 5px;
}

.tile {
    width: 60px;
    height: 60px;
    border: 2px solid #d1d1d6;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

button {
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background-color: #ffffff;
    color: #1c1c1e;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.95);
}

.wide-button {
    padding: 15px 20px;
    font-size: 0.9rem;
    background-color: #e5e5ea;
}

.correct {
    background-color: #34c759;
    color: white;
    border-color: #34c759;
    animation: flipIn 0.5s ease forwards;
}

.present {
    background-color: #ffcc00;
    color: white;
    border-color: #ffcc00;
    animation: flipIn 0.5s ease forwards;
}

.absent {
    background-color: #8e8e93;
    color: white;
    border-color: #8e8e93;
    animation: flipIn 0.5s ease forwards;
}

@keyframes flipIn {
    0% {
        transform: rotateX(0);
    }
    50% {
        transform: rotateX(90deg);
    }
    100% {
        transform: rotateX(0);
    }
}

.win-animation {
    animation: bounce 0.5s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.win-message {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
