/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    --bg-grad-start: #667eea;
    --bg-grad-end: #764ba2;
    --text-primary: #ffffff;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --panel-text: #2d3748;
    background: linear-gradient(135deg, var(--bg-grad-start) 0%, var(--bg-grad-end) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0;
    overflow-x: hidden;
}

@media (prefers-color-scheme: dark) {
    body {
        --bg-grad-start: #1f2937;
        --bg-grad-end: #111827;
        --text-primary: #e5e7eb;
        --panel-bg: rgba(17, 24, 39, 0.9);
        --panel-text: #e5e7eb;
    }
    .menu-title, .game-title, .leaderboard-name, .about-info h3 { color: var(--text-primary); }
    .menu-container, .overlay-content, .game-container { background: var(--panel-bg); color: var(--panel-text); }
}

/* Menu Principal - Design Moderne */
.main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: menuFadeIn 0.8s ease-out;
    overflow: hidden;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-section {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 90%;
}

.hero-content {
    margin-bottom: 60px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.title-main {
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.title-accent {
    color: #f093fb;
    text-shadow: 0 4px 20px rgba(240, 147, 251, 0.5);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 0;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #f093fb;
    text-shadow: 0 2px 10px rgba(240, 147, 251, 0.5);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

/* Widget de classement sur la page d'accueil */
.home-leaderboard {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 20px;
}

.leaderboard-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.home-leaderboard .leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
}

.home-leaderboard .tab-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.home-leaderboard .tab-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

/* Effet de survol supprimé pour éviter les animations agressives */

.home-leaderboard .leaderboard-content {
    max-height: 200px;
    overflow-y: auto;
}

.home-leaderboard .leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-leaderboard .leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Effet de survol supprimé pour éviter les animations agressives */

.home-leaderboard .leaderboard-item:first-child {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 193, 7, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.4);
}

.home-leaderboard .leaderboard-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3) 0%, rgba(169, 169, 169, 0.2) 100%);
    border-color: rgba(192, 192, 192, 0.4);
}

.home-leaderboard .leaderboard-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3) 0%, rgba(184, 115, 51, 0.2) 100%);
    border-color: rgba(205, 127, 50, 0.4);
}

.home-leaderboard .leaderboard-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f093fb;
    min-width: 30px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(240, 147, 251, 0.5);
}

.home-leaderboard .leaderboard-item:first-child .leaderboard-rank {
    color: #ffd700;
}

.home-leaderboard .leaderboard-item:nth-child(2) .leaderboard-rank {
    color: #c0c0c0;
}

.home-leaderboard .leaderboard-item:nth-child(3) .leaderboard-rank {
    color: #cd7f32;
}

.home-leaderboard .leaderboard-info {
    flex: 1;
    margin-left: 12px;
}

.home-leaderboard .leaderboard-name {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
    margin-bottom: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.home-leaderboard .leaderboard-stats {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.home-leaderboard .leaderboard-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4facfe;
    text-shadow: 0 2px 8px rgba(79, 172, 254, 0.5);
}

.home-leaderboard .leaderboard-item:first-child .leaderboard-score {
    color: #ffd700;
}

.home-leaderboard .leaderboard-item:nth-child(2) .leaderboard-score {
    color: #c0c0c0;
}

.home-leaderboard .leaderboard-item:nth-child(3) .leaderboard-score {
    color: #cd7f32;
}

/* Message quand aucun score */
.home-leaderboard .no-scores {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    font-size: 0.9rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.play-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 40px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.play-button:hover::before {
    left: 100%;
}

/* Effet de survol supprimé pour éviter les animations agressives */

.play-icon {
    font-size: 1.8rem;
}

.play-text {
    font-size: 1.3rem;
}

.secondary-actions {
    display: flex;
    gap: 20px;
}

.action-btn {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Effet de survol supprimé pour éviter les animations agressives */

/* Cartes flottantes */
.floating-cards {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 8s ease-in-out infinite;
}

.floating-card.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card.card-2 {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.floating-card.card-3 {
    top: 60%;
    left: 5%;
    animation-delay: 2s;
}

.floating-card.card-4 {
    top: 70%;
    right: 10%;
    animation-delay: 3s;
}

.floating-card.card-5 {
    top: 40%;
    left: 5%;
    animation-delay: 4s;
}

.floating-card.card-6 {
    top: 30%;
    right: 5%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(2deg);
    }
}

/* Menu de Difficulté - Design Moderne */
.difficulty-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: menuFadeIn 0.8s ease-out;
}

.difficulty-container {
    max-width: 900px;
    width: 90%;
    text-align: center;
}

.difficulty-header {
    margin-bottom: 50px;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) translateY(-2px);
}

.difficulty-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.difficulty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.difficulty-option {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.difficulty-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.difficulty-option:hover::before {
    left: 100%;
}

/* Effet de survol supprimé pour éviter les animations agressives */

.difficulty-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.difficulty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.difficulty-option h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.difficulty-option p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.difficulty-meta {
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.difficulty-meta .time,
.difficulty-meta .score {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* Classement */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Effet de survol supprimé pour éviter les animations agressives */

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

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Effet de survol supprimé pour éviter les animations agressives */

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    min-width: 40px;
    text-align: center;
}

.leaderboard-info {
    flex: 1;
    margin-left: 15px;
}

.leaderboard-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.leaderboard-stats {
    font-size: 0.9rem;
    color: #718096;
}

.leaderboard-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.best-score-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fbbf24;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
    animation: pulse 2s infinite;
}

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

/* Paramètres - Design Moderne */
.settings-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: menuFadeIn 0.8s ease-out;
}

.settings-container {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.settings-header {
    margin-bottom: 40px;
    position: relative;
    text-align: center;
}

.settings-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.settings-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 40px;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.settings-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.setting-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.section-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.setting-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Effet de survol supprimé pour éviter les animations agressives */

.option-info {
    flex: 1;
}

.option-info label {
    display: block;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.option-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* Toggle Switch Moderne */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: #f093fb;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.settings-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
}

/* Effet de survol supprimé pour éviter les animations agressives */

.action-btn.danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.4);
}

/* Effet de survol supprimé pour éviter les animations agressives */

.btn-icon {
    font-size: 1.2rem;
}

.btn-text {
    font-size: 1rem;
}

/* Tutoriel */
.tutorial-content {
    max-height: 500px;
    overflow-y: auto;
}

.tutorial-step {
    display: none;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.tutorial-step.active {
    display: block;
    animation: stepFadeIn 0.5s ease-out;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.tutorial-step h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 15px;
}

.tutorial-step p {
    color: #718096;
    line-height: 1.6;
}

.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

/* À propos */
.about-content {
    max-height: 500px;
    overflow-y: auto;
}

.about-info {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-info h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.about-info p {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 20px;
}

.features h4 {
    color: #2d3748;
    margin-bottom: 15px;
}

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    padding: 8px 0;
    color: #4a5568;
}

.version {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #718096;
}

/* Bouton Retour */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

/* Effet de survol supprimé pour éviter les animations agressives */

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(10px);
}

/* Header */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

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

.stat-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Contrôles */
.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Effet de survol supprimé pour éviter les animations agressives */

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

/* Effet de survol supprimé pour éviter les animations agressives */

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.difficulty-selector label {
    font-weight: 600;
    color: #2d3748;
}

.difficulty-selector select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.difficulty-selector select:focus {
    outline: none;
    border-color: #667eea;
}

/* Plateau de jeu */
.game-board {
    display: grid;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.game-board.easy {
    grid-template-columns: repeat(4, 1fr);
}

.game-board.medium {
    grid-template-columns: repeat(6, 1fr);
}

.game-board.hard {
    grid-template-columns: repeat(8, 1fr);
}

/* Cartes */
.card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-out;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Effet de clignotement supprimé */

/* Effet de survol supprimé pour éviter les animations agressives */

/* Effet de clignotement supprimé */

.card.flipped {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(240, 147, 251, 0.3);
}

.card.matched {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transform: scale(1.02);
    opacity: 1;
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.35);
}

/* Animation de pulsation supprimée */

.card-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card.flipped .card-content {
    opacity: 1;
}

.card.matched .card-content {
    opacity: 1;
}

/* Overlays */
.game-overlay, .pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: overlayFadeIn 0.4s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.overlay-content {
    background: linear-gradient(135deg, var(--panel-bg) 0%, var(--panel-bg) 100%);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: contentSlideIn 0.4s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

/* Canvas effets (fireworks, chart) */
.fx-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@keyframes contentSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.overlay-content h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.overlay-content p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.final-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.3);
}

@keyframes statsGlow {
    0% {
        box-shadow: 0 10px 30px rgba(240, 147, 251, 0.3);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 12px 35px rgba(240, 147, 251, 0.4);
        transform: scale(1.01);
    }
}

.final-stat {
    text-align: center;
}

.final-stat span:first-child {
    display: block;
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 5px;
}

.final-stat span:last-child {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Animations de clignotement supprimées */

/* Animations de chargement élégantes */
.game-board {
    animation: boardFadeIn 0.3s ease-out;
}

@keyframes boardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: cardAppear 0.3s ease-out both;
}

.card:nth-child(1) { animation-delay: 0.03s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.09s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.15s; }
.card:nth-child(6) { animation-delay: 0.18s; }
.card:nth-child(7) { animation-delay: 0.21s; }
.card:nth-child(8) { animation-delay: 0.24s; }
.card:nth-child(9) { animation-delay: 0.27s; }
.card:nth-child(10) { animation-delay: 0.30s; }
.card:nth-child(11) { animation-delay: 0.33s; }
.card:nth-child(12) { animation-delay: 0.36s; }
.card:nth-child(13) { animation-delay: 0.39s; }
.card:nth-child(14) { animation-delay: 0.42s; }
.card:nth-child(15) { animation-delay: 0.45s; }
.card:nth-child(16) { animation-delay: 0.48s; }

@keyframes cardAppear {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Respecter les préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-card {
        animation: none;
    }
    
    .play-button::before,
    .difficulty-option::before,
    .card::before {
        display: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .game-stats {
        gap: 15px;
    }
    
    .stat {
        padding: 10px 15px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .card {
        min-width: 60px;
        min-height: 60px;
    }
    
    .card-content {
        font-size: 1.5rem;
    }
    
    /* Widget de classement responsive */
    .home-leaderboard {
        margin: 20px 0;
        padding: 20px;
        max-width: 100%;
    }
    
    .leaderboard-title {
        font-size: 1.3rem;
    }
    
    .home-leaderboard .tab-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .home-leaderboard .leaderboard-content {
        max-height: 150px;
    }
    
    .home-leaderboard .leaderboard-item {
        padding: 10px 12px;
    }
    
    .home-leaderboard .leaderboard-name {
        font-size: 0.9rem;
    }
    
    .home-leaderboard .leaderboard-stats {
        font-size: 0.7rem;
    }
    
    .home-leaderboard .leaderboard-score {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .card {
        min-width: 50px;
        min-height: 50px;
    }
    
    .card-content {
        font-size: 1.2rem;
    }
}
