/* General Body and Container Styles */
:root {
    --primary-color: #0056b3; /* From table header */
    --secondary-color: #28a745; /* From play button */
    --text-color: #333;
    --light-bg: #f9f9f9;
    --border-color: #ddd;
    --shadow-color: rgba(0,0,0,0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f4f7f6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: #2c3e50;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h1 {
    font-size: 2.5em;
    text-align: center;
    color: var(--primary-color);
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 1em;
}

h3 {
    font-size: 1.5em;
}

p {
    margin-bottom: 1em;
}

ul, ol {
    margin-bottom: 1em;
    padding-left: 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #003d82;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap; /* Prevent buttons from wrapping text */
}

.btn-play {
    background-color: var(--secondary-color);
    color: white;
    border: none;
}

.btn-play:hover {
    background-color: #218838;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-register {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-register:hover {
    background-color: #003d82;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Header */
header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.logo-img img {
    height: 50px; /* Adjust as needed */
    width: auto;
    display: block; /* Remove extra space below image */
}

.menu-toggle {
    display: none; /* Hidden by default, shown on small screens */
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: var(--primary-color);
    padding: 5px 10px;
}

#main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Horizontal navigation */
}

#main-nav ul li {
    margin-left: 25px;
}

#main-nav ul li a {
    font-weight: 600;
    color: var(--text-color);
    padding: 5px 0;
    position: relative;
}

#main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

#main-nav ul li a:hover::after {
    width: 100%;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.menu-close {
    display: none; /* Hidden by default, shown in mobile nav */
}

/* Main Layout */
.main-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.main-content {
    flex: 3; /* Takes more space */
    min-width: 65%; /* Ensures it doesn't get too small */
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.sidebar {
    flex: 1; /* Takes remaining space */
    min-width: 250px; /* Minimum width for sidebar */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky; /* Enable sticky positioning */
    top: 80px; /* Adjust based on your header height + some offset. 80px is a good starting point. */
    height: fit-content; /* Adjust height to content to prevent it from taking full viewport height */
}

.sidebar h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    display: block;
    padding: 8px 10px;
    background-color: var(--light-bg);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.sidebar .btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* Casino Table */
#casino-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    text-align: left;
    background-color: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color);
}

#casino-table thead {
    background-color: var(--primary-color);
    color: white;
}

#casino-table th,
#casino-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

#casino-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

#casino-table tbody tr:hover {
    background-color: #e6e6e6;
}

/* FAQ Section */
.faq-section {
    margin-top: 40px;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.faq-item {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    user-select: none; /* Prevent text selection on click */
}

.faq-question .arrow-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question .arrow-icon {
    transform: rotate(90deg); /* Rotate arrow when open */
}

.faq-answer {
    padding: 0 20px 15px;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.faq-answer p {
    margin: 0;
    padding-top: 10px; /* Space between border and text */
}


/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: center;
}

.footer-nav ul li a {
    color: white;
    font-weight: 400;
}

.footer-nav ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.site-info p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #ccc;
}


@media (max-width: 992px) {
    .main-wrapper {
        flex-direction: column;
    }

    .main-content,
    .sidebar {
        min-width: 100%;
        width: 100%;
        padding: 20px;
        /* Remove sticky positioning on smaller screens */
        position: static; /* Change back to static */
        top: auto; /* Remove top offset */
    }

    .sidebar .btn-group {
        flex-direction: row; /* Buttons side-by-side in sidebar on smaller screens */
        justify-content: center;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.7em;
    }

    .header-content {
        flex-wrap: nowrap;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: block; /* Show hamburger icon */
    }

    #main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 70%; /* Adjust width as needed */
        height: 100%;
        background-color: #fff;
        box-shadow: -2px 0 10px var(--shadow-color);
        transition: right 0.3s ease;
        z-index: 1001; /* Above header */
        display: flex;
        flex-direction: column;
        padding-top: 60px; /* Space for close button */
    }

    #main-nav.active {
        right: 0; /* Slide in */
    }

    #main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    #main-nav ul li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    #main-nav ul li a {
        display: block;
        padding: 15px 20px;
        color: var(--text-color);
    }

    #main-nav ul li a:hover {
        background-color: var(--light-bg);
    }

    #main-nav ul li a::after { /* Remove underline animation on mobile nav */
        display: none;
    }

    .menu-close {
        display: block; /* Show close button */
        position: absolute;
        top: 15px;
        right: 20px;
        background: none;
        border: none;
        font-size: 2.5em;
        cursor: pointer;
        color: var(--text-color);
    }

    .header-buttons {
        display: none; /* Hide top right buttons on smaller screens, can be moved to mobile nav if desired */
    }

    #casino-table th,
    #casino-table td {
        padding: 8px 10px; /* Reduce padding for smaller screens */
        font-size: 0.9em;
    }

    /* Adjust table action button size */
    #casino-table td .btn-play {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.5em;
    }
    .container {
        padding: 0 10px;
    }
    .main-content, .sidebar {
        padding: 15px;
    }
    .logo-img img {
        height: 40px;
    }
    .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}