/* Game-specific styles */

.game-section {
    padding: 50px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.game-interface {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.score-item {
    text-align: center;
}

.score-item .label {
    display: block;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.score-item span:last-child {
    font-size: 1.5em;
    color: #3498db;
    font-weight: bold;
}

.question-area {
    text-align: center;
    margin: 30px 0;
}

.question-area h2 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.answer-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.answer-section input {
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 200px;
    text-align: center;
}

.answer-section button {
    padding: 15px 25px;
    font-size: 1.1em;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.answer-section button:hover {
    background: #2980b9;
}

.answer-section button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.difficulty-selector {
    text-align: center;
    margin: 20px 0;
}

.difficulty-selector select {
    padding: 10px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-left: 10px;
}

.game-stats {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #3498db;
}

.stat-card h4 {
    color: #666;
    margin-bottom: 10px;
}

.stat-card span {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
}

.educational-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.benefit-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #27ae60;
}

.benefit-card h4 {
    color: #27ae60;
    margin-bottom: 10px;
}

/* Word Puzzle Styles */
.game-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: #ecf0f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-btn:hover {
    background: #d5dbdb;
}

.tab-btn.active:hover {
    background: #2980b9;
}

.game-container {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.game-container.active {
    display: block;
}

.game-info {
    text-align: center;
    margin-bottom: 30px;
}

.game-info p {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 15px;
}

.score {
    font-size: 1.2em;
    font-weight: bold;
    color: #3498db;
}

.scrambled-word {
    font-size: 2.5em;
    font-weight: bold;
    color: #e74c3c;
    text-align: center;
    margin: 20px 0;
    letter-spacing: 5px;
    font-family: 'Courier New', monospace;
}

.hint {
    text-align: center;
    font-style: italic;
    color: #666;
    margin: 15px 0;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.hint strong {
    color: #3498db;
}

/* Wordle Styles */
.wordle-grid {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    max-width: 300px;
    margin: 20px auto;
}

.wordle-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.wordle-cell {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    background: white;
}

.wordle-cell.correct {
    background: #6aaa64;
    color: white;
    border-color: #6aaa64;
}

.wordle-cell.present {
    background: #c9b458;
    color: white;
    border-color: #c9b458;
}

.wordle-cell.absent {
    background: #787c7e;
    color: white;
    border-color: #787c7e;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    max-width: 500px;
    margin: 20px auto;
}

.key {
    padding: 10px 12px;
    background: #d5dbdb;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}

.key:hover {
    background: #bdc3c7;
}

.key.special {
    padding: 10px 20px;
    background: #3498db;
    color: white;
}

.key.correct {
    background: #6aaa64;
    color: white;
}

.key.present {
    background: #c9b458;
    color: white;
}

.key.absent {
    background: #787c7e;
    color: white;
}

/* Crossword Styles */
.crossword-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.crossword-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    max-width: 300px;
}

.crossword-cell {
    width: 50px;
    height: 50px;
    border: 1px solid #333;
    text-align: center;
    font-size: 1.2em;
    text-transform: uppercase;
    font-weight: bold;
}

.crossword-cell.blocked {
    background: #333;
    border: none;
}

.crossword-cell:focus {
    background: #e3f2fd;
    outline: 2px solid #2196f3;
}

.clues {
    padding: 20px;
}

.clues-section h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.clues-section ol {
    padding-left: 20px;
}

.clues-section li {
    margin-bottom: 8px;
    color: #666;
}

/* Feedback Styles */
.feedback {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.feedback.success {
    background: #d5f4e6;
    color: #27ae60;
    border: 2px solid #27ae60;
}

.feedback.error {
    background: #ffeaa7;
    color: #e17055;
    border: 2px solid #e17055;
}

.feedback.level-up {
    background: #a29bfe;
    color: white;
    border: 2px solid #6c5ce7;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-interface {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .score-board {
        flex-direction: column;
        gap: 15px;
    }
    
    .answer-section {
        flex-direction: column;
    }
    
    .answer-section input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .crossword-container {
        grid-template-columns: 1fr;
    }
    
    .game-tabs,
    .game-controls {
        flex-wrap: wrap;
    }
    
    .scrambled-word {
        font-size: 2em;
        letter-spacing: 3px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .crossword-cell {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    .wordle-cell {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .game-section {
        padding: 30px 0;
    }
    
    .game-interface {
        padding: 15px;
        margin: 15px 5px;
    }
    
    .scrambled-word {
        font-size: 1.5em;
        letter-spacing: 2px;
    }
    
    .question-area h2 {
        font-size: 1.5em;
    }
}