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

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

.container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 40px rgba(255, 20, 147, 0.6), 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 100%;
    border: 2px solid #ff1493;
}

.game-title {
    text-align: center;
    color: white;
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 0 0 20px #ff4500, 0 0 40px #ff1493;
}

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

.player-turn {
    text-align: center;
    font-size: 1.5em;
    color: white;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    border-radius: 10px;
    border: 2px solid #ff4500;
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.6);
}

.score-board {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 20px;
}

.score {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    flex: 1;
    border: 2px solid #ff4500;
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.5);
}

.player-label {
    display: block;
    font-size: 0.9em;
    color: #ff1493;
    margin-bottom: 5px;
    text-shadow: 0 0 5px #ff1493;
}

.score span:last-child {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px #ff4500;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(3, 120px);
    gap: 10px;
    margin: 30px auto;
    width: 390px;
}

.cell {
    width: 120px;
    height: 120px;
    background: black;
    border: 3px solid #ff1493;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.5);
}

.cell:hover:not(.taken) {
    background: #1a1a1a;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 69, 0, 0.8);
    border-color: #ff4500;
}

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

.cell.x {
    color: #ff4500;
    text-shadow: 0 0 20px #ff4500;
}

.cell.o {
    color: #ff1493;
    text-shadow: 0 0 20px #ff1493;
}

.cell.winner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    animation: pulse 0.5s ease-in-out;
}

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

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border: 2px solid #ff1493;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    color: white;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.6), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.8), 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: #ff4500;
}

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

.btn.secondary {
    background: rgba(0, 0, 0, 0.7);
    border-color: white;
}

.game-mode {
    margin-top: 30px;
    text-align: center;
}

.game-mode h3 {
    color: #333;
    margin-bottom: 15px;
}

.mode-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mode-btn {
    padding: 12px 25px;
    font-size: 1em;
    border: 2px solid #667eea;
    border-radius: 10px;
    background: white;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.mode-btn:hover {
    background: #f0f0f0;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

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

.modal-content h2 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .game-title {
        font-size: 2em;
    }

    .cell {
        font-size: 3em;
    }

    .score-board {
        flex-direction: column;
        gap: 10px;
    }
}

