* {
    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;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 500px;
    width: 100%;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.difficulty-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.difficulty-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.difficulty-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 150px;
}

.control-group label {
    display: block;
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.control-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
    background: white;
    cursor: pointer;
}

.control-group select:focus {
    outline: none;
    border-color: #667eea;
}

.apply-btn {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.apply-btn:hover {
    background: #218838;
}

.game-info {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.game-info p {
    color: #666;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.rules {
    font-size: 0.95em;
    color: #888;
    line-height: 1.6;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#guessInput {
    flex: 1;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #ddd;
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.3s;
}

#guessInput:focus {
    outline: none;
    border-color: #667eea;
}

#submitBtn {
    padding: 15px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s;
}

#submitBtn:hover {
    background: #5a67d8;
}

#submitBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.message {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: bold;
    display: none;
}

.message.show {
    display: block;
}

.message.success {
    background: #48bb78;
    color: white;
}

.message.error {
    background: #f56565;
    color: white;
}

.message.info {
    background: #4299e1;
    color: white;
}

.history {
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.history h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

#historyList {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-item .guess {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.history-item .result {
    display: flex;
    gap: 15px;
}

.hit {
    color: #48bb78;
    font-weight: bold;
}

.blow {
    color: #ed8936;
    font-weight: bold;
}

.new-game-btn {
    width: 100%;
    padding: 15px;
    background: #764ba2;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s;
}

.new-game-btn:hover {
    background: #6b46c1;
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .difficulty-controls {
        flex-direction: column;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    #submitBtn {
        width: 100%;
    }
}