:root {
    --primary-color: #4facfe;
    --secondary-color: #00f2fe;
    --accent-color: #ff9a9e;
    --text-color: #333;
    --font-family: 'Rubik', sans-serif;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    color: var(--text-color);
}

.game-container {
    background-color: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 600px;
    width: 90%;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-top: 0;
}

canvas {
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.word-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.letter-slot {
    border-bottom: 3px solid #2c3e50;
    font-size: 2rem;
    width: 40px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.keyboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 10px;
    margin-bottom: 2rem;
}

.key {
    background-color: #e0e0e0;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    font-family: var(--font-family);
    transition: transform 0.1s, background-color 0.2s;
}

.key:hover:not(:disabled) {
    background-color: #d0d0d0;
    transform: scale(1.05);
}

.key.correct {
    background-color: #a8e6cf;
    color: #1b5e20;
}

.key.wrong {
    background-color: #ff8b94;
    color: #b71c1c;
    opacity: 0.6;
}

.key:disabled {
    cursor: not-allowed;
    transform: none;
}

.message {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    min-height: 1.8rem;
}

.reset-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    font-family: var(--font-family);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.reset-btn:active {
    transform: translateY(0);
}
