/* 🎮 MINI GAMES STYLES */

/* Hero flex container */
.hero-flex-container {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    text-align: left;
    max-width: 550px;
}

.hero-universe-logo {
    text-align: center;
    margin-bottom: 20px;
}

/* Mini Games Container */
.mini-games-container {
    flex: 1;
    max-width: 550px;
    margin-left: 25%;
    margin-top: 60px;
    position: relative;
    z-index: 10;
}

/* Game Selector Buttons */
.game-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.game-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: rgba(241, 245, 249, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.game-btn:hover {
    border-color: rgba(139, 92, 246, 0.6);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    transform: translateY(-2px);
}

.game-btn.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(168, 85, 247, 0.3));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.game-icon {
    font-size: 1.5rem;
}

.game-name {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Game Display */
.game-display {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(139, 92, 246, 0.2);
}

.game-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.game-canvas canvas {
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

/* Game Info */
.game-info {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
}

.game-score,
.game-high-score {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.game-score span,
.game-high-score span {
    color: var(--primary);
    font-size: 1.3rem;
    font-family: 'Courier New', monospace;
}

/* Restart Button */
.restart-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.restart-btn:active {
    transform: translateY(0);
}

/* Game Controls */
.game-controls {
    text-align: center;
    color: rgba(241, 245, 249, 0.5);
    font-size: 0.9rem;
    padding: 8px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 6px;
}

/* 📱 Responsive */
@media (max-width: 1200px) {
    .hero-flex-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
    
    .mini-games-container {
        width: 100%;
        max-width: 550px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .mini-games-container {
        max-width: 100%;
        width: calc(100% - 20px);
    }
    
    .game-selector {
        flex-direction: row;
        gap: 5px;
    }
    
    .game-btn {
        padding: 10px 5px;
    }
    
    .game-canvas canvas {
        max-width: 100%;
        height: auto;
    }
    
    .game-name {
        font-size: 0.7rem;
    }
    
    .game-icon {
        font-size: 1.2rem;
    }
}

/* Animation pour l'apparition */
@keyframes gameSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mini-games-container {
    animation: gameSlideIn 0.6s ease-out;
}

/* Leaderboard */
.leaderboard {
    margin-top: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.leaderboard-header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.2));
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.leaderboard-icon {
    font-size: 1.5rem;
}

.leaderboard-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border-left: 3px solid rgba(139, 92, 246, 0.5);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateX(5px);
}

.leaderboard-item.top-1 {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.leaderboard-item.top-2 {
    border-left-color: #c0c0c0;
    background: rgba(192, 192, 192, 0.1);
}

.leaderboard-item.top-3 {
    border-left-color: #cd7f32;
    background: rgba(205, 127, 50, 0.1);
}

.rank {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 50px;
}

.player {
    flex: 1;
    font-family: 'Courier New', monospace;
    color: rgba(241, 245, 249, 0.8);
}

.score {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.leaderboard-loading,
.leaderboard-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(241, 245, 249, 0.5);
}

.speed-mode-btn {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid #8b5cf6;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.speed-mode-btn.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
    animation: speedPulse 0.5s infinite;
}

@keyframes speedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
