* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.section {
    margin-bottom: 30px;
}

.hidden {
    display: none !important;
}

input[type="number"] {
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 10px;
    width: 100%;
    max-width: 200px;
    margin: 10px;
    text-align: center;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.btn {
    padding: 15px 30px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn.primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn.secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #ddd;
}

.btn.secondary:hover {
    background: #e9ecef;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.attempts, .range {
    font-weight: bold;
    color: #555;
}

.input-group {
    margin: 20px 0;
}

.feedback {
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.feedback.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

.feedback.warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.history {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.history h3 {
    margin-bottom: 10px;
    color: #555;
}

.guess-item {
    padding: 5px 10px;
    margin: 5px 0;
    background: white;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.warning {
    color: #856404;
    font-style: italic;
    margin-top: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    input[type="number"] {
        max-width: 100%;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
