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

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    font-family: Arial, sans-serif;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-container {
    position: relative;
    min-width: 1000px;
    min-height: 600px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    margin: 0;
    color: #333;
    font-size: 32px;
    text-align: center;
}

#board {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    margin: 20px 0;
}

.row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.tile {
    width: 60px;
    height: 60px;
    border: 2px solid #d3d6da;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.tile.correct {
    background-color: #6aaa64;
    border-color: #6aaa64;
    color: white;
}

.tile.present {
    background-color: #c9b458;
    border-color: #c9b458;
    color: white;
}

.tile.absent {
    background-color: #787c7e;
    border-color: #787c7e;
    color: white;
}

#keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

#keyboard button {
    min-width: 43px;
    height: 58px;
    border-radius: 4px;
    border: none;
    background-color: #d3d6da;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 1.25rem;
    color: #1a1a1b;
}

#keyboard button.wide {
    min-width: 65px;
}

#keyboard button:hover {
    background-color: #c5c8cc;
}

#keyboard button.correct {
    background-color: #6aaa64;
    color: white;
}

#keyboard button.present {
    background-color: #c9b458;
    color: white;
}

#keyboard button.absent {
    background-color: #787c7e;
    color: white;
}

#message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 5px;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    text-align: center;
    min-width: 200px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#message.error {
    opacity: 1;
    visibility: visible;
    background: rgba(255, 0, 0, 0.8);
}

#message.success {
    opacity: 1;
    visibility: visible;
    background: rgba(76, 175, 80, 0.8);
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

@keyframes flip {
    0% { transform: rotateX(0); }
    100% { transform: rotateX(90deg); }
}

.flip {
    animation: flip 0.5s;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

#new-game {
    padding: 10px 20px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#new-game:hover {
    background: #45a049;
} 