/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -999px;
    left: -999px;
    background-color: #007bff;
    color: white;
    padding: 8px;
    z-index: 9999;
    font-size: 1.1em;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    left: 0;
    clip: auto;
    height: auto;
    width: auto;
    position: static;
    margin: 10px;
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Header Styles */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar {
    background-color: #1a1a1a; /* Dark top bar */
    color: #f0f0f0;
    padding: 8px 0;
    font-size: 0.9em;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: none;
    border: none;
    color: #f0f0f0;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.lang-btn img {
    border-radius: 2px;
}

.lang-btn:hover, .lang-btn:focus {
    background-color: #333;
    outline: none;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2a2a;
    list-style: none;
    margin: 0;
    padding: 5px 0;
    min-width: 150px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.lang-dropdown[hidden] {
    display: none;
}

.lang-dropdown:not([hidden]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    color: #f0f0f0;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-dropdown li a:hover {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

.auth-buttons .btn {
    padding: 8px 15px;
    border-radius: 5px;
    margin-left: 10px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.auth-buttons .btn-primary {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.auth-buttons .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.auth-buttons .btn-secondary {
    background-color: #28a745; /* Green for register */
    color: white;
    border: 1px solid #28a745;
}

.auth-buttons .btn-secondary:hover {
    background-color: #218838;
    border-color: #218838;
}

.auth-buttons .btn-download {
    background-color: #ffc107; /* Gold/Yellow for download */
    color: #333;
    border: 1px solid #ffc107;
}

.auth-buttons .btn-download:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}

.header-main-nav {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.header-main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.navbar-brand .logo {
    height: 40px; /* Adjust as needed */
    width: auto;
    display: block;
    object-fit: contain;
}

.main-navigation {
    flex-grow: 1;
    text-align: center;
}

.menu-toggle {
    display: none; /* Hidden by default, shown on smaller screens */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: #333;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.menu-toggle:hover, .menu-toggle:focus {
    background-color: #f0f0f0;
    outline: none;
}

.menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.nav-item .nav-link {
    display: block;
    padding: 10px 0;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    color: #007bff;
    text-decoration: none;
}

.nav-item .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.nav-item .nav-link:hover::after,
.nav-item .nav-link.active::after {
    width: 100%;
}

.search-bar {
    margin-left: 20px;
}

.search-bar form {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
    background-color: #f8f8f8;
}

.search-bar input[type="search"] {
    border: none;
    padding: 8px 15px;
    outline: none;
    flex-grow: 1;
    background: transparent;
    font-size: 0.9em;
}

.search-bar .search-btn {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1em;
}

.search-bar .search-btn:hover {
    background-color: #0056b3;
}

/* Marquee Section Styles */
.marquee-section {
    background-color: #fff3cd; /* Light yellow background */
    color: #856404; /* Dark yellow text */
    padding: 10px 0;
    border-bottom: 1px solid #ffeeba;
    overflow: hidden;
    font-size: 0.95em;
}

.marquee-container {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
}

.marquee-icon {
    margin-right: 15px;
    font-size: 1.5em;
    flex-shrink: 0;
    line-height: 1;
}

.marquee-wrapper {
    overflow: hidden;
    flex-grow: 1;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%; /* Start off-screen */
    animation: marquee-scroll 45s linear infinite; /* Adjust duration as needed */
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: inline-block;
    margin-right: 60px; /* Space between items */
    font-weight: 500;
}

.marquee-item a {
    color: #856404;
    text-decoration: none;
}

.marquee-item a:hover {
    text-decoration: underline;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Footer Styles */
.main-footer {
    background-color: #1a1a1a; /* Dark footer background */
    color: #f0f0f0;
    padding: 40px 0 20px;
    font-size: 0.9em;
}

.footer-top {
    padding-bottom: 30px;
    border-bottom: 1px solid #333;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col {
    padding: 10px 0;
}

.footer-heading {
    color: #007bff; /* Accent color for headings */
    font-size: 1.2em;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 5px;
    text-transform: uppercase;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #28a745; /* Green accent */
}

.footer-col p {
    margin-bottom: 10px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #007bff;
    text-decoration: underline;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #f0f0f0;
    font-size: 1.5em;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

.contact-support p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-support p i {
    color: #007bff;
    font-size: 1.1em;
}

.payment-methods,
.gaming-regulations {
    margin-top: 30px;
    text-align: center;
}

.payment-icons,
.regulation-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.payment-icons img,
.regulation-badges img {
    height: 35px;
    width: auto;
    max-width: 90px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
    object-fit: contain;
}

.payment-icons img:hover,
.regulation-badges img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.age-restriction {
    height: 40px !important;
    width: 40px !important;
}

.license-badge {
    height: 45px !important;
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
}

.copyright {
    margin: 0;
    color: #ccc;
    font-size: 0.85em;
}

.disclaimer {
    color: #ffc107; /* Gold accent */
    font-weight: bold;
}

/* Back to top button styles */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .nav-list {
        gap: 15px;
    }
    .header-main-nav .container {
        flex-wrap: wrap;
    }
    .navbar-brand {
        flex-basis: 100px;
    }
    .main-navigation {
        flex-grow: 1;
        order: 2;
        margin-top: 15px;
    }
    .search-bar {
        order: 3;
        margin-left: 0;
        width: 100%;
        margin-top: 15px;
    }
    .search-bar form {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header-top-bar .container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .header-main-nav .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-brand {
        margin-bottom: 15px;
        flex-basis: auto;
        width: 100%;
        text-align: center;
    }
    .navbar-brand a {
        display: inline-block;
    }
    .main-navigation {
        width: 100%;
        text-align: left;
        order: initial; /* Reset order */
        margin-top: 0;
    }
    .menu-toggle {
        display: flex; /* Show for mobile */
        align-self: flex-end;
        order: -1; /* Puts toggle button to the right */
        position: absolute;
        top: 15px; /* Adjust based on actual header padding */
        right: 15px;
        background-color: #f0f0f0;
        border: 1px solid #ddd;
    }
    .nav-list {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default for mobile */
        border-top: 1px solid #eee;
        padding-top: 10px;
        gap: 0;
    }
    .nav-list.active {
        display: flex; /* Show when active */
    }
    .nav-item .nav-link {
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    .nav-item .nav-link::after {
        left: 15px;
        width: calc(100% - 30px);
        background-color: transparent; /* Hide on mobile */
    }
    .nav-item .nav-link:hover::after, .nav-item .nav-link.active::after {
        width: 0;
    }
    .search-bar {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        order: initial;
    }
    .search-bar form {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
    }
    .auth-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .auth-buttons .btn {
        margin-left: 0;
    }
    .marquee-icon {
        font-size: 1.2em;
        margin-right: 10px;
    }
    .marquee-item {
        font-size: 0.9em;
        margin-right: 30px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
