/* Viking-inspired theme with background and flexbox layout */
body {
    font-family: 'Georgia', serif;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('viking-background.png'); /* Ensure the correct path */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #d4af37;
    margin: 0;
    padding: 0;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-bottom: 3px solid #d4af37;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Flexbox layout for logo and buttons on the same row */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;  /* Adjust the width to control spacing */
    margin: 0 auto;
}

/* Style for the navigation links */
a.discord-link, a.youtube-link {
    color: #d4af37 !important;  /* Viking-inspired gold color */
    font-size: 1.5em;
    text-decoration: none !important;  /* Removes the underline */
    border: 2px solid #d4af37;
    padding: 10px 20px;
    border-radius: 10px;
    margin: 0 20px;
}

a.discord-link:hover, a.youtube-link:hover {
    background-color: #d4af37;
    color: #2e2e2e !important; /* Make sure the text color changes without underline */
    text-decoration: none !important;  /* Prevent underline on hover */
}

/* Center the logo */
.logo {
    display: flex;
    justify-content: center;
}

.logo img {
    height: 150px; /* Adjusted for a smaller logo height */
}

/* Video section and embed styling */
.video-section {
    margin-top: 20px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #d4af37;
    border-radius: 10px;
}

/* Footer styling with flexbox */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: #d4af37;
    padding: 10px;
    border-top: 3px solid #d4af37;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    bottom: 0;
}

/* Align PayPal Donation Button to the right in the footer */
.donation-button {
    margin-right: 20px;  /* Aligns button to the right */
}

/* Tic Tac Toe Section */
.tic-tac-toe-section {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #d4af37;
    border-radius: 10px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* Grid for the 4x4 Tic Tac Toe */
.tic-tac-toe-grid {
    display: grid;
    grid-template-columns: repeat(4, 100px); /* 4 columns */
    grid-template-rows: repeat(4, 100px); /* 4 rows */
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

/* Style for each Tic Tac Toe cell */
.cell {
    background-color: #2e2e2e;
    border: 2px solid #d4af37;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #d4af37;
    cursor: pointer;
}

.cell:hover {
    background-color: #d4af37;
    color: #2e2e2e;
}

/* Restart Button styling */
#restartButton {
    margin-top: 20px;
    padding: 10px 20px;
    border: 2px solid #d4af37;
    background-color: #2e2e2e;
    color: #d4af37;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 10px;
}

#restartButton:hover {
    background-color: #d4af37;
    color: #2e2e2e;
}
/* Mute Button Styling */
.mute-button {
    padding: 10px 20px;
    background-color: #2e2e2e;
    color: #d4af37;
    border: 2px solid #d4af37;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    position: absolute;
    right: 0;   /* Align to the right of the section */
    top: 0;     /* Place at the top-right of the game section */
    margin: 10px;
}

.mute-button:hover {
    background-color: #d4af37;
    color: #2e2e2e;
}



/* Mobile Styles for Screens up to 768px */
@media only screen and (max-width: 768px) {

    body {
        font-size: 1em;
        justify-content: center; /* Vertically center the content */
        align-items: center;  /* Horizontally center the content */
        padding: 10px;
        display: flex;  /* Ensure flexbox centering on mobile */
        flex-direction: column;  /* Stack elements vertically */
    }

    .header-content {
        flex-direction: column;  /* Stack logo and buttons vertically */
        width: 100%;  /* Full width for mobile */
        align-items: center;  /* Center the content inside the header */
    }

    .logo img {
        height: 100px;  /* Reduce logo size */
    }

    a.discord-link, a.youtube-link {
        font-size: 1.2em;  /* Smaller font size for buttons */
        padding: 8px 15px;
        margin: 10px 0;  /* Stack buttons vertically with spacing */
        width: 80%;  /* Make buttons take up more width on mobile */
        text-align: center;  /* Center text inside buttons */
    }

    .video-section, .tic-tac-toe-section {
        width: 100%;  /* Ensure sections take full width */
        margin: 10px 0;
    }

    .tic-tac-toe-grid {
        grid-template-columns: repeat(4, 60px);  /* Smaller cells for mobile */
        grid-template-rows: repeat(4, 60px);
        gap: 3px;
    }

    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
    }

    .donation-button {
        margin-right: 0;
        margin-top: 10px;
        width: 80%;  /* Make donation button wider */
        text-align: center;
    }
}
