@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

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

body {
    height: 100vh;
    font-family: 'Orbitron', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #0a192f, #112240);
    overflow: hidden;
}

.game-container {
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
    perspective: 1000px;
    transform-style: preserve-3d;
    text-align: center;
}

.title {
    margin-bottom: 20px;
    font-size: 3rem;
    color: #64ffda;
    text-shadow: 0 0 15px #64ffda;
}

#start-screen, #game-screen {
    display: none;
    flex-direction: column;
    align-items: center;
}

#start-screen {
    padding: 40px;
    border-radius: 15px;
    background: rgba(17, 34, 64, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#start-screen h2 {
    margin-bottom: 20px;
    color: #64ffda;
}

.mode-buttons {
    display: flex;
    gap: 20px;
}

.mode-btn, #reset-btn, #back-btn {
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #0a192f;
    background: linear-gradient(135deg, #64ffda, #4d4dff);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mode-btn:hover, #reset-btn:hover, #back-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.5);
}

#board {
    width: 100%;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: rgba(17, 34, 64, 0.8);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: rotateX(10deg);
    transition: transform 0.3s ease;
}

.cell {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #64ffda;
    background: linear-gradient(135deg, #112240, #0a192f);
    border: 3px solid #64ffda;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cell:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.5);
}

.cell.x {
    color: #ff4d4d;
    text-shadow: 0 0 15px #ff4d4d;
    cursor: not-allowed;
}

.cell.o {
    color: #4d4dff;
    text-shadow: 0 0 15px #4d4dff;
    cursor: not-allowed;
}

#status {
    margin-top: 20px;
    font-size: 1.5rem;
    color: #64ffda;
    text-shadow: 0 0 10px #64ffda;
}

#reset-btn, #back-btn {
    margin-top: 15px;
}

#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

@media (max-width: 600px) {
    .game-container {
        padding: 0 10px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .cell {
        font-size: 3rem;
    }
}
