body {
    margin: 0;
    font-family: Arial, sans-serif;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    background: linear-gradient(135deg, #6a5acd, #c850c0);
    padding: 10px;
}

.container {
    text-align: center;
    color: white;
    width: 100%;
    max-width: 400px;
}

h1 {
    margin-bottom: 20px;
    font-size: 22px;
}

/* Board */
#board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 auto 20px;
}

/* Cells */
.cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* keeps square shape */
    background: #e6e6e6;
    border-radius: 10px;

    font-size: clamp(20px, 5vw, 32px);
    /* responsive text */
    font-weight: bold;
    color: #333;

    display: flex;
    justify-content: center;
    align-items: center;

    cursor: pointer;
    transition: 0.2s;
}

.cell:hover {
    transform: scale(1.05);
    background: #dcdcdc;
}

/* Status */
#status {
    margin: 15px 0;
    font-size: clamp(12px, 3vw, 16px);
    letter-spacing: 1px;
}

/* Button */
button {
    background: #111;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background: #333;
}

/* Popup */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.5);

    display: none;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.popup-content {
    background: #f1f1f1;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #333;
    width: 100%;
    max-width: 300px;
}

.popup-content button {
    margin-top: 15px;
    background: #2c3e50;
}

.popup-content button:hover {
    background: #1a252f;
}

/* 📱 Extra small screens */
@media (max-width: 480px) {
    h1 {
        font-size: 18px;
    }

    button {
        width: 100%;
    }
}