/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Watermark */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
    font-size: 100px;
    font-family: 'Times New Roman', Times, serif;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
    user-select: none;
}

/* Main Container */
.container {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    max-width: 500px;
    width: 90%;
    margin: 6rem auto 4rem;
    padding: 3rem 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    text-align: center;
    position: relative;
    z-index: 1;
}

.container h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Game Info */
.game-container p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Board */
.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.cell {
    width: 100px;
    height: 100px;
    background-color: #fff;
    color: #1e3c72;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.cell:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.cell:active {
    transform: scale(0.98);
}

#game-status {
    margin-top: 1.5rem;
    font-size: 1.5rem;
}

/* Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 1rem;
}

.custom-modal.show {
    display: flex;
}

.custom-modal-content {
    background-color: #fff;
    color: #1e3c72;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.custom-modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-actions button {
    background-color: #1e3c72;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-actions button:hover {
    background-color: #274b8a;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: bold;
    color: orangered;
    background-color: rgba(0, 0, 0, 0.6);
    border-top-left-radius: 10px;
    z-index: 10;
}

.footer a {
    color: orangered;
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .board {
        grid-template-columns: repeat(3, 80px);
        grid-gap: 10px;
    }

    .cell {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }

    #game-status {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .watermark {
        font-size: 50px;
    }

    .board {
        grid-template-columns: repeat(3, 70px);
        grid-gap: 8px;
    }

    .cell {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }

    .custom-modal-content {
        padding: 1.5rem;
    }

    .modal-actions button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
