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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
}

.word-info {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #667eea;
}

.game-board {
    display: grid;
    grid-template-rows: repeat(6, 60px);
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.word-row {
    display: grid;
    gap: 10px;
}

.letter-box {
    border: 2px solid #d3d6da;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    background: white;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
}

.letter-box.filled {
    border-color: #787c7e;
    animation: pop 0.3s ease;
}

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

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

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

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.keyboard {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    margin-top: 20px;
}

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

.key {
    background: #d3d6da;
    border: none;
    border-radius: 4px;
    padding: 12px 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 35px;
    text-transform: uppercase;
}

.key:hover {
    background: #bbb;
}

.key.wide {
    min-width: 60px;
    font-size: 0.7rem;
}

.key.correct {
    background: #6aaa64;
    color: white;
}

.key.present {
    background: #c9b458;
    color: white;
}

.key.absent {
    background: #787c7e;
    color: white;
}

.input-section {
    text-align: center;
    margin: 20px 0;
}

.word-input {
    padding: 12px 20px;
    font-size: 1.2rem;
    border: 2px solid #d3d6da;
    border-radius: 8px;
    text-align: center;
    text-transform: uppercase;
    max-width: 250px;
    margin-right: 10px;
}

.submit-btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    background: #6aaa64;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #5a9a54;
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.message {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 25px;
}

.success {
    color: #6aaa64;
}

.error {
    color: #e74c3c;
}

.info {
    color: #3498db;
}

.stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}

.new-game-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.new-game-btn:hover {
    background: #5a6fd8;
}

.rules {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.rules h3 {
    margin-bottom: 10px;
    color: #333;
}

.color-example {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin: 0 5px;
    vertical-align: middle;
}

.example-correct { background: #6aaa64; }
.example-present { background: #c9b458; }
.example-absent { background: #787c7e; }

/* Responsive design */
@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .letter-box {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .word-input {
        max-width: 180px;
        margin-bottom: 10px;
    }
    
    .submit-btn {
        margin-left: 0;
    }
}
