/* SpellingBee Main Styles - Kid-Friendly Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(255, 165, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 5px;
}

.logo p {
    font-size: 1.2rem;
    color: #fff;
    opacity: 0.9;
}

.progress-summary {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
}

.stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    color: #fff;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h2 {
    font-size: 2.2rem;
    color: #4a4a4a;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #666;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.game-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.game-card[data-game="phonics"] {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
}

.game-card[data-game="sight-words"] {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.game-card[data-game="word-building"] {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #333;
}

.game-card[data-game="patterns"] {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: #333;
}

.game-card[data-game="context"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.game-card[data-game="spell-check"] {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    color: #333;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.game-card p {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.9;
    line-height: 1.4;
}

.difficulty-level {
    margin-bottom: 20px;
}

.level {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.level.beginner {
    background: #4CAF50;
    color: white;
}

.level.intermediate {
    background: #FF9800;
    color: white;
}

.level.advanced {
    background: #F44336;
    color: white;
}

.play-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: inherit;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.word-examples {
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.word-examples small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    display: block;
    text-align: center;
}

/* Progress Section */
.progress-section {
    margin-bottom: 30px;
}

.progress-section h3 {
    font-size: 1.8rem;
    color: #4a4a4a;
    margin-bottom: 20px;
    text-align: center;
}

.progress-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.progress-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 20px;
    color: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.progress-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    height: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    background: #fff;
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.badge.unlocked {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-color: #fff;
    animation: badgeGlow 2s infinite;
}

.badge.locked {
    opacity: 0.6;
    filter: grayscale(100%);
}

/* Settings Section */
.settings-section {
    text-align: center;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.settings-btn, .progress-btn, .help-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.settings-btn:hover, .progress-btn:hover, .help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-content h3 {
    font-size: 1.8rem;
    color: #4a4a4a;
    margin-bottom: 20px;
    text-align: center;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

.setting-item select, .setting-item input[type="checkbox"] {
    margin-left: 10px;
}

.setting-item select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.save-btn, .cancel-btn, .close-btn, .print-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn, .print-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.cancel-btn, .close-btn {
    background: linear-gradient(45deg, #f44336, #da190b);
    color: white;
}

.save-btn:hover, .print-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
}

.cancel-btn:hover, .close-btn:hover {
    background: linear-gradient(45deg, #da190b, #f44336);
    transform: translateY(-2px);
}

.detailed-stats {
    margin-bottom: 20px;
}

.stat-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-group h4 {
    color: #4a4a4a;
    margin-bottom: 10px;
}

.help-content h4 {
    color: #4a4a4a;
    margin: 15px 0 8px 0;
}

.help-content p {
    margin-bottom: 12px;
    color: #666;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .stats {
        justify-content: center;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .welcome-section h2 {
        font-size: 1.8rem;
    }
    
    .settings-section {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .game-icon {
        font-size: 2.5rem;
    }
    
    .game-card h3 {
        font-size: 1.3rem;
    }
}
