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

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

html.dark-mode body {
    background-color: #181a1b;
    color: #f1f1f1;
}

.page-wrapper {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 0;
}

.ad-container-left,
.ad-container-right {
    display: none;
    width: 160px;
    margin: 0 1rem;
}

.main-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 30, 80, 0.12);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    transition: background 0.3s, color 0.3s;
}

html.dark-mode .container {
    background-color: #23272b;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: #f1f1f1;
}

.main-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.nav-link {
    color: #333;
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.nav-link.active {
    background-color: #e0e0e0;
    font-weight: bold;
}

html.dark-mode .nav-link {
    color: #f1f1f1;
}

html.dark-mode .nav-link:hover {
    background-color: #2c2c2c;
}

html.dark-mode .nav-link.active {
    background-color: #3c3c3c;
}

.nav-link-support {
    color: #e74c3c;
    font-weight: bold;
}

html.dark-mode .nav-link-support {
    color: #ff7675;
}

/* Sélecteur de langue */
.language-selector {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

/* Style commun pour les boutons ronds (langue et thème) */
.language-btn, #theme-toggle {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
    padding: 0;
    transition: background 0.3s, border-color 0.3s;
}

.language-dropdown {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
}

.language-dropdown a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.language-dropdown a:hover { background-color: #f1f1f1; }
.language-selector:hover .language-dropdown { display: block; }

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

html.dark-mode h1 {
    color: #f1f1f1;
}

.section {
    margin-bottom: 2rem;
}

html.dark-mode #rules a {
    color: #66bb6a;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-card {
    background: #f8f8f8;
    padding: 1rem;
    height: 100%; /* Pour que les cartes aient la même hauteur */
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

html.dark-mode .feature-card {
    background: #2c2c2c;
}

.feature-card-link {
    text-decoration: none;
    color: inherit;
}

/* Rend le fond de la carte d'action identique à celui du conteneur principal */
.feature-card.feature-card-action {
    background: transparent;
    border: 1px solid #ddd;
}

html.dark-mode .feature-card.feature-card-action {
    background: transparent;
    border-color: #444;
}

.feature-card-action:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

html.dark-mode .feature-card-action:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin: 5px;
    transition: background 0.3s, color 0.3s;
}

button:hover {
    background-color: #45a049;
}

html.dark-mode button {
    background-color: #388e3c;
    color: #fff;
}

html.dark-mode button:hover {
    background-color: #2e7031;
}

input, select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 5px;
    font-size: 1rem;
    background: #fff;
    color: #222;
    transition: background 0.3s, color 0.3s;
}

html.dark-mode input, 
html.dark-mode select {
    background: #23272b;
    color: #f1f1f1;
    border: 1px solid #444;
}

#game-info {
    text-align: center;
    margin-top: 1rem;
}

#game-info p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.about-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

html.dark-mode .about-section {
    background: #2c2c2c;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.about-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

html.dark-mode .about-section h2 {
    color: #f1f1f1;
}

.about-section ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.recommendation-image {
    width: 80px;
    height: auto;
    flex-shrink: 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.recommendation-item p {
    margin: 0;
    line-height: 1.6;
}

.about-section li {
    margin-bottom: 0.5rem;
}

/* Style pour les liens dans les sections de contenu */
.about-section a {
    color: #2c3e50; /* Couleur sombre et discrète */
    text-decoration: underline;
    transition: color 0.3s;
}

html.dark-mode .about-section a {
    color: #9ec5e8; /* Bleu clair et lisible pour le mode sombre */
}

.about-section a:hover {
    color: #3498db; /* Un bleu plus vif au survol */
}

html.dark-mode .about-section a:hover {
    color: #cce5ff; /* Un bleu encore plus clair pour le survol en mode sombre */
}


.main-footer {
    margin-top: 2rem;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid #ddd;
    transition: border-color 0.3s;
}

.main-footer nav {
    margin-bottom: 1rem;
}

.main-footer nav a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    margin: 0 1rem;
    transition: color 0.3s;
}

.main-footer p {
    color: #666;
    font-size: 0.9rem;
    transition: color 0.3s;
}

html.dark-mode .main-footer { border-top-color: #444; }
html.dark-mode .main-footer nav a { color: #bdc3c7; }
html.dark-mode .main-footer p { color: #7f8c8d; }

/* Styles pour la modale de fin de partie */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.modal-actions button {
    margin: 0 0.5rem;
}

html.dark-mode .modal-content {
    background: #2c3e50;
}

.section-divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 3rem 0;
}

html.dark-mode .section-divider { background: #444; }
/* Styles pour la page de soutien */
.support-container {
    text-align: center;
    padding: 2rem 1rem;
}

.support-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.support-container p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

.support-intro {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

html.dark-mode .support-intro {
    color: #f1f1f1;
}

.kofi-button {
    display: inline-block;
    background-color: #29abe0;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 1rem 0;
    transition: background-color 0.3s;
}

.kofi-button:hover {
    background-color: #1e90c7;
}

/* Agrandir le plateau de jeu sur les grands écrans (PC) */
@media (min-width: 992px) {
    .container {
        max-width: 960px; /* On élargit le conteneur principal */
    }
    .board {
        max-width: 800px; /* On élargit le plateau de jeu lui-même */
    }
}

@media (min-width: 1200px) {
    .ad-container-left,
    .ad-container-right {
        display: block;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .board {
        max-width: 100%;
    }
    
    .cell {
        font-size: 1.1rem;
    }
    
    .about-section {
        padding: 1rem;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 0.5rem;
    }
    
    .board {
        max-width: 100%;
    }
    
    .cell {
        font-size: 0.9rem;
    }
    
    .nav-link {
        margin: 0 0.5rem;
        padding: 0.5rem;
    }
} 