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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Container principal */
.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Écran de configuration */
.setup-screen {
    text-align: center;
}

.setup-screen h2 {
    margin-bottom: 2rem;
    color: #555;
    font-size: 1.5rem;
}

.symbol-choice {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.symbol-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 15px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2rem;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.symbol-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.symbol-btn .symbol {
    font-size: 3rem;
    font-weight: bold;
}

.info {
    color: #666;
    font-style: italic;
    font-size: 1.1rem;
}

/* Écran de jeu */
.game-screen {
    text-align: center;
}

.hidden {
    display: none !important;
}

.game-info {
    margin-bottom: 2rem;
}

.player-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

#game-status {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    min-height: 2rem;
}

/* Indicateur IA qui réfléchit */
.ai-thinking {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    animation: pulse 2s infinite;
}

.thinking-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: bold;
    color: #2d3436;
}

.dots span {
    animation: blink 1.5s infinite;
}

.dots span:nth-child(2) {
    animation-delay: 0.3s;
}

.dots span:nth-child(3) {
    animation-delay: 0.6s;
}

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

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Plateau de jeu */
.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto 2rem;
    background: #333;
    padding: 10px;
    border-radius: 15px;
}

.cell {
    aspect-ratio: 1;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cell:hover:not(.taken) {
    background: #f0f0f0;
    transform: scale(1.05);
}

.cell.taken {
    cursor: not-allowed;
}

.cell.winning {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    animation: celebration 0.6s ease-in-out;
}

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

.cell.X {
    color: #e17055;
}

.cell.O {
    color: #0984e3;
}

/* Contrôles du jeu */
.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Score */
.score {
    display: flex;
    justify-content: space-around;
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 15px;
    margin-top: 1rem;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-item span:first-child {
    font-weight: bold;
    color: #666;
}

.score-item span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .symbol-choice {
        flex-direction: column;
        align-items: center;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .player-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}