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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

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

.game-info {
    margin-bottom: 30px;
}

.status {
    font-size: 1.3em;
    font-weight: bold;
    color: #555;
    margin-bottom: 15px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status.winner {
    color: #4caf50;
    font-size: 1.5em;
    animation: pulse 0.5s ease-in-out;
}

.status.draw {
    color: #ff9800;
    font-size: 1.5em;
}

.restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
    background: #f0f0f0;
    padding: 10px;
    border-radius: 15px;
}

.cell {
    aspect-ratio: 1;
    background: white;
    border: none;
    border-radius: 10px;
    font-size: 3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cell:hover:not(:disabled) {
    background: #e8e8e8;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cell:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.cell.x {
    color: #e74c3c;
}

.cell.o {
    color: #3498db;
}

.cell.winning {
    background: #4caf50;
    color: white;
    animation: winPulse 0.6s ease-in-out;
}

.instructions {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
}

.instructions p {
    margin: 5px 0;
}

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

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

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .cell {
        font-size: 2.5em;
    }
}
