* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #ff0000, #ff4d4d);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 1s ease-out;
}

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2rem;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    margin: 0 auto 30px;
    max-width: 300px;
}

.cell {
    aspect-ratio: 1;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cell:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

.cell.x {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.cell.o {
    color: #ffcccc;
    text-shadow: 0 0 10px rgba(255, 204, 204, 0.7);
}

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

button {
    background-color: white;
    color: #ff0000;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(1px);
}

.message {
    font-size: 1.5rem;
    margin: 20px 0;
    min-height: 40px;
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-out;
}

.winning-cell {
    animation: winPulse 1s infinite;
}

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

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

@keyframes winPulse {
    0% { background-color: rgba(255, 255, 255, 0.4); }
    50% { background-color: rgba(255, 255, 255, 0.7); }
    100% { background-color: rgba(255, 255, 255, 0.4); }
}

.turn-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.turn-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
}

.turn-dot.active {
    background-color: white;
    box-shadow: 0 0 10px white;
}

@media (max-width: 500px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
    }
}