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

* {
    margin: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    user-select: none;
    color: white;
}

main {
    background: #0A0519;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
}

/* Header */
#header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 50px;
    flex-wrap: wrap; /* allow wrapping in small screens */
    max-width: 100%;
}

#header .player {
    background: #17122A;
    width: 80px;  /* fixed size */
    height: 80px; /* fixed size */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 12px;
    border: solid 4px #17122A;
    opacity: 0.5;
    transition: 0.3s;
}

#header .player:hover {
    border: solid 4px #2A2343;
}
#header .player-active {
    opacity: 1;
    border: solid 4px #2A2343;
}
#header #xPlayerDisplay {
    color: #1892EA;
}
#header #oPlayerDisplay {
    color: #A737FF;
}

/* Board */
#board {
    display: grid;
    grid-template-columns: repeat(3, 90px); /* fixed size cells */
    grid-template-rows: repeat(3, 90px);
    gap: 12px;
    justify-content: center; /* center align board */
    max-width: 100%;
    overflow-x: auto; /* allow scroll on very small screens */
}

#board .cell {
    background: #17122A;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 39px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s background;
}
#board .cell:hover {
    background: #2A2343;
}

/* Restart Button */
#restartBtn {
    margin-top: 30px;
    width: 235px;
    background: #17122A;
    padding: 10px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s background;
    visibility: hidden;
}
#restartBtn:hover {
    background: #2A2343;
}

/* Responsive tweaks */
@media (max-width: 480px) {
    main {
        padding: 10px;
    }
    #header {
        gap: 1rem;
        margin-bottom: 30px;
    }
    #restartBtn {
        width: 200px;
        font-size: 15px;
    }
}
