* {
    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;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.instructions {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
    line-height: 1.6;
}

.game-area {
    margin-bottom: 30px;
}

#guessInput {
    width: 200px;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-right: 10px;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

#guessInput:focus {
    border-color: #667eea;
}

#submitGuess {
    padding: 15px 25px;
    font-size: 1.1em;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

#submitGuess:hover {
    background: #5a67d8;
}

#submitGuess:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.feedback {
    margin-bottom: 30px;
}

#message {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.correct {
    color: #10b981;
}

.too-high {
    color: #f59e0b;
}

.too-low {
    color: #3b82f6;
}

#attempts {
    font-size: 1.1em;
    color: #666;
}

#attemptCount {
    font-weight: bold;
    color: #667eea;
}

#newGame {
    padding: 15px 30px;
    font-size: 1.2em;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 30px;
}

#newGame:hover {
    background: #059669;
}

.game-history {
    margin-top: 30px;
    text-align: left;
}

.game-history h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

#historyList {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

#historyList li {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #666;
}

#historyList li:last-child {
    border-bottom: none;
}

.history-guess {
    font-weight: bold;
    color: #333;
}

.history-result {
    font-size: 0.9em;
    margin-left: 10px;
}

@media (max-width: 600px) {
    .game-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #guessInput {
        width: 150px;
        margin-right: 5px;
        margin-bottom: 10px;
    }
    
    #submitGuess {
        padding: 12px 20px;
    }
}
