/* Number Hunt Game Specific Styles */

.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
    margin-bottom: 40px;
}

.game-header {
    text-align: center;
    margin-bottom: 2rem;
}

.game-header h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.game-header p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
    min-width: 120px;
}

.stat .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.stat span:last-child {
    font-size: 1.8rem;
    font-weight: 600;
}

.difficulty-selector {
    text-align: center;
    margin-bottom: 2rem;
}

.difficulty-selector h3 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-difficulty {
    background: #e0e7ff;
    color: #4f46e5;
    border: 2px solid transparent;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
}

.btn-difficulty:hover {
    background: #c7d2fe;
    transform: translateY(-2px);
}

.btn-difficulty.active {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #28a745, #20c997);
    border-radius: 15px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.game-board {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    margin: 2rem auto;
    border: 3px solid #dee2e6;
    overflow: hidden;
}

.number-circle {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    user-select: none;
}

.number-circle:hover {
    transform: scale(1.1);
    z-index: 10;
}

.number-circle.correct {
    background: linear-gradient(45deg, #28a745, #20c997);
    animation: correctFound 0.6s ease-in-out;
    pointer-events: none;
}

.number-circle.wrong {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    animation: wrongShake 0.5s ease-in-out;
}

.number-circle.next {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    animation: pulse 2s infinite;
}

.number-circle.default {
    background: linear-gradient(45deg, #6c757d, #495057);
}

.number-circle.found {
    background: linear-gradient(45deg, #28a745, #20c997);
    opacity: 0.7;
    pointer-events: none;
}

/* Player-specific found styles for co-op mode */
.number-circle.player1-found {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    opacity: 0.8;
    border: 2px solid #ff6b6b;
}

.number-circle.player2-found {
    background: linear-gradient(45deg, #4ecdc4, #45b7b8);
    opacity: 0.8;
    border: 2px solid #4ecdc4;
}

@keyframes correctFound {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 8px 16px rgba(255, 107, 53, 0.4); }
}

.game-controls {
    text-align: center;
    margin-top: 2rem;
}

.game-controls .btn {
    margin: 0 0.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 3rem;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
}

.modal-content p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.win-stats {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.win-stats p {
    margin: 0.5rem 0;
    font-weight: 600;
    color: #333;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.star {
    font-size: 2rem;
    color: #ffd700;
    animation: starTwinkle 0.5s ease-in-out;
}

@keyframes starTwinkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Educational Information Styles */
.educational-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    margin: 2rem 0;
    text-align: center;
}

.educational-info h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.learning-objectives {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.objective {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.age-recommendation {
    color: #666;
    font-weight: 600;
    margin-top: 1rem;
}

/* Game States */
.game-paused .number-circle {
    pointer-events: none;
    filter: blur(3px);
}

/* Fullscreen Styles */
.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    overflow: auto !important;
    margin: 0 !important;
}

.fullscreen-mode .game-container {
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.fullscreen-mode .header {
    position: relative !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.fullscreen-exit-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: rgba(255, 107, 53, 0.9);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fullscreen-exit-btn:hover {
    background: rgba(255, 107, 53, 1);
    transform: scale(1.05);
}

/* Co-op Mode Styles */
.game-mode-selector {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 2px solid #e0e0e0;
}

.game-mode-selector h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.mode-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-mode {
    padding: 0.8rem 1.5rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.btn-mode:hover {
    background: #f8f9fa;
    border-color: #4ECDC4;
    transform: translateY(-2px);
}

.btn-mode.active {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
    border-color: #4ECDC4;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.player-info {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.current-player {
    margin-bottom: 1rem;
}

.current-player .label {
    font-size: 1rem;
    margin-right: 0.5rem;
    opacity: 0.9;
}

#current-player-name {
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.player-scores {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.player-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.player-score .label {
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.coop-score-breakdown {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.coop-score-breakdown p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Mobile responsiveness for co-op elements */
@media (max-width: 768px) {
    .mode-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-mode {
        width: 100%;
        max-width: 200px;
    }
    
    .player-scores {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-mode-selector {
        padding: 0.8rem;
    }
}

@media (max-width: 768px) {
    .game-container {
        margin: 20px;
        padding: 15px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .stat {
        width: 180px;
    }
    
    .difficulty-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-difficulty {
        width: 200px;
    }
    
    .game-board {
        height: 300px;
    }
    
    .number-circle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 2rem;
    }
    
    .modal-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-buttons .btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 2rem;
    }
    
    .game-stats {
        gap: 0.5rem;
    }
    
    .stat {
        width: 150px;
        padding: 0.75rem 1rem;
    }
    
    .stat span:last-child {
        font-size: 1.5rem;
    }
    
    .game-board {
        height: 250px;
    }
    
    .number-circle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .progress-bar {
        height: 25px;
    }
    
    .progress-text {
        font-size: 0.8rem;
    }
}
