/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
/* Ensure Font Awesome is linked for icons, e.g.: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> */

:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #CC0000; /* Red */
    --accent-color: #007bff; /* Blue for links */
    --text-color: #333333;
    --light-text-color: #f0f0f0;
    --background-dark: #222222;
    --background-light: #ffffff;
    --border-color: #e0e0e0;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f8f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-color);
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    border: none;
    white-space: nowrap;
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.btn-login:hover {
    background-color: #e6c200;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.btn-register {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
}

.btn-register:hover {
    background-color: #a30000;
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.5);
}

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

.header-top-bar {
    background-color: var(--background-dark);
    color: var(--light-text-color);
    font-size: 0.85em;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.announcement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}

.top-bar-actions {
    display: flex;
    gap: 15px;
    padding: 5px 0;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: var(--light-text-color);
    padding: 5px 10px;
    font-size: inherit;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--background-dark);
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    right: 0;
    border-top: 2px solid var(--primary-color);
    border-radius: 0 0 4px 4px;
}

.dropdown-content a {
    color: var(--light-text-color);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: #3a3a3a;
    color: var(--primary-color);
}

/* .dropdown:hover .dropdown-content { display: block; } */ /* Controlled by JS now */

.header-main-nav {
    padding: 15px 0;
}

.header-main-nav > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

.site-name {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-name-footer {
    color: var(--light-text-color);
    font-size: 1.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-navigation .nav-list {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease-out;
}

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

.header-user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-toggle, .menu-toggle, .close-mobile-nav {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-color);
    display: none; /* Hidden by default, shown on mobile */
    padding: 5px;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: all var(--transition-speed) ease;
    border-radius: 2px;
}

/* Mobile Navigation */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease-in-out;
}

.mobile-nav-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-nav-content {
    background-color: var(--background-dark);
    color: var(--light-text-color);
    width: 80%;
    max-width: 400px;
    padding: 30px;
    border-radius: 8px;
    position: relative;
    transform: translateY(-20px);
    transition: transform var(--transition-speed) ease-in-out;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateY(0);
}

.close-mobile-nav {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    color: var(--light-text-color);
    display: block; /* Always visible when overlay is active */
}

.mobile-nav-list {
    text-align: center;
    margin-top: 20px;
}

.mobile-nav-list li {
    margin-bottom: 15px;
}

.mobile-nav-list a {
    color: var(--light-text-color);
    font-size: 1.3em;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-list a:hover {
    color: var(--primary-color);
}

.mobile-auth-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-login-mobile, .btn-register-mobile {
    padding: 12px 25px;
    font-size: 1.1em;
}

/* Marquee Styles */
.marquee-section {
    background-color: var(--primary-color);
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    color: var(--text-color);
    font-weight: 500;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.marquee-container {
    display: inline-block; /* Allows content to flow horizontally */
    animation: marquee-scroll 25s linear infinite; /* CSS animation for continuous scroll */
    padding-right: 100%; /* Ensures content has space to scroll off-screen before looping */
    box-sizing: content-box;
    display: flex;
    align-items: center;
    gap: 15px;
}

.marquee-icon {
    font-size: 1.2em;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.marquee-wrapper {
    display: flex; /* Allow multiple spans to be inline */
    gap: 15px;
    align-items: center;
}

.marquee-text {
    display: inline-block;
}

.marquee-separator {
    color: rgba(0,0,0,0.3);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); } /* Scrolls one full copy of the content */
}

/* Footer Styles */
.main-footer {
    background-color: var(--background-dark);
    color: var(--light-text-color);
    padding: 50px 0 20px;
    font-size: 0.95em;
}

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

.footer-col h3 {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p {
    line-height: 1.8;
    margin-bottom: 20px;
}

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

.footer-col ul li a {
    color: var(--light-text-color);
    transition: color var(--transition-speed);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.site-logo-footer {
    height: 45px;
    filter: brightness(0) invert(1); /* Makes logo white if it's dark */
    margin-right: 10px;
}

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

.social-links a {
    color: var(--light-text-color);
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--background-dark);
    border-color: var(--primary-color);
}

.payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.payment-logos img {
    height: 30px;
    filter: grayscale(100%) brightness(150%);
    opacity: 0.7;
    transition: filter var(--transition-speed), opacity var(--transition-speed);
}

.payment-logos img:hover {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    font-size: 0.85em;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.copyright {
    color: rgba(255,255,255,0.7);
}

.responsible-gaming-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.responsible-gaming-logos img {
    height: 35px;
    opacity: 0.8;
    transition: opacity var(--transition-speed);
}

.responsible-gaming-logos img:hover {
    opacity: 1;
}

#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 30px; /* Place the button at the bottom of the page */\    right: 30px; /* Place the button at the right */
    z-index: 99; /* Make sure it does not overlap */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: var(--primary-color); /* Set a background color */
    color: var(--background-dark); /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    border-radius: 50%; /* Rounded corners */
    font-size: 18px; /* Increase font size */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

#backToTopBtn:hover {
    background-color: #e6c200;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* Hide main navigation on smaller screens */
    }
    .header-user-actions .btn {
        display: none; /* Hide login/register buttons on smaller screens */
    }
    .search-toggle, .menu-toggle {
        display: flex;
    }
    .header-main-nav > .container {
        justify-content: space-between;
    }
    .header-user-actions {
        gap: 15px;
    }
    .top-bar-actions {
        display: none; /* Hide language/currency on small screens */
    }
    .announcement {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .site-name {
        font-size: 1.5em;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col {
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .footer-col:last-child {
        border-bottom: none;
    }
    .footer-col h3 {
        margin-top: 20px;
    }
    .footer-logo, .social-links, .payment-logos, .responsible-gaming-logos {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
    }
    .marquee-container {
        animation-duration: 35s; /* Slow down marquee on smaller screens */
    }
}

@media (max-width: 480px) {
    .site-logo {
        height: 35px;
    }
    .site-name {
        font-size: 1.3em;
    }
    .header-user-actions {
        gap: 8px;
    }
    .search-toggle, .menu-toggle {
        font-size: 1.3em;
    }
    .mobile-nav-content {
        width: 95%;
        padding: 20px;
    }
    .mobile-nav-list a {
        font-size: 1.1em;
    }
    .btn-login-mobile, .btn-register-mobile {
        padding: 10px 20px;
        font-size: 1em;
    }
    .marquee-section {
        font-size: 0.85em;
    }
    .footer-col h3 {
        font-size: 1.1em;
    }
    .copyright {
        font-size: 0.8em;
    }
    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        padding: 12px;
        font-size: 16px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
