/* Reset and Base Styles */
* {
    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;
    color: #333;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.game-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.game-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Game Area */
.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-section {
    display: none;
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.game-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Game Selection */
.game-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.game-option {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.game-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.option-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.game-option h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.game-option p {
    color: #666;
    margin-bottom: 20px;
}

.word-list, .number-range {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.word-list span, .number-range span {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Game Info */
.game-info {
    margin-bottom: 30px;
}

.attempts {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.2rem;
}

.hint {
    color: #f39c12;
    font-style: italic;
    margin-top: 10px;
    font-weight: 500;
}

/* Input Section */
.input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.input-section input {
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    min-width: 250px;
    transition: border-color 0.3s ease;
}

.input-section input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-section button {
    padding: 15px 25px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.input-section button:active {
    transform: translateY(0);
}

/* Game History */
.game-history {
    margin-bottom: 30px;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.game-history:empty::before {
    content: "Your guesses will appear here...";
    color: #999;
    font-style: italic;
}

.guess-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guess-correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.guess-incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.guess-hint {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Buttons */
.back-btn, .play-again-btn {
    padding: 12px 25px;
    margin: 10px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn {
    background: #6c757d;
    color: white;
}

.play-again-btn {
    background: linear-gradient(145deg, #28a745, #20c997);
    color: white;
    font-weight: 600;
}

.back-btn:hover, .play-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Game Over */
.final-result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Footer */
.game-footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }
    
    .game-header h1 {
        font-size: 2.5rem;
    }
    
    .game-section {
        padding: 25px;
    }
    
    .game-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .input-section {
        flex-direction: column;
        align-items: center;
    }
    
    .input-section input {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 2rem;
    }
    
    .game-section {
        padding: 20px;
    }
    
    .option-icon {
        font-size: 3rem;
    }
}
