/* Basic Reset & Body Styles */
:root {
    --primary-color: #e44d26; /* Example: Orange */
    --secondary-color: #333;
    --accent-color: #007bff;
    --text-color: #555;
    --light-bg: #f8f8f8;
    --dark-bg: #222;
    --border-color: #eee;
    --header-height: 100px; /* Approximate height for sticky header offset */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

ul {
    list-style: none;
}

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

/* Utility classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Header Styles */
.site-header {
    background-color: var(--dark-bg);
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}

.top-bar {
    background-color: #1a1a1a;
    padding: 8px 0;
    font-size: 0.85em;
    border-bottom: 1px solid #333;
}

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

.top-bar-left a, .top-bar-right a {
    color: #ccc;
    margin-right: 15px;
    white-space: nowrap;
}

.top-bar-left a:last-child, .top-bar-right a:last-child {
    margin-right: 0;
}

.top-bar-left a:hover, .top-bar-right a:hover {
    color: #fff;
    text-decoration: none;
}

.top-bar-left .highlight-link {
    color: #ffd700; /* Gold color for promotions */
    font-weight: bold;
}

.language-selector, .currency-selector {
    display: inline-block;
    position: relative;
    margin-right: 10px;
}

.language-selector select, .currency-selector select {
    background-color: transparent;
    color: #ccc;
    border: 1px solid #555;
    padding: 5px 25px 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23cccccc%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.3%203.2-16.1%208.1-3.8%204.9-4.7%2011.6-2.9%2017.6l138%20170c3.9%205.9%2011.6%209.6%2019.5%209.6s15.6-3.7%2019.5-9.6l138-170c1.8-6-.9-12.7-4.7-17.6z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    transition: border-color 0.3s ease;
}

.language-selector select:hover, .currency-selector select:hover {
    border-color: var(--primary-color);
}

.language-selector select option, .currency-selector select option {
    background-color: #333;
    color: #fff;
}

.user-auth-link {
    background-color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 5px;
    color: #fff;
    margin-left: 10px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.user-auth-link:hover {
    background-color: #c73e1c;
    text-decoration: none;
}

.user-auth-link.register-btn {
    background-color: var(--accent-color);
}

.user-auth-link.register-btn:hover {
    background-color: #0056b3;
}

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

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo img {
    height: 50px; /* Adjust as needed */
    width: auto;
}

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

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.nav-menu .menu-item a {
    color: #fff;
    font-weight: bold;
    padding: 10px 0;
    display: block;
    text-transform: uppercase;
}

.nav-menu .menu-item a:hover,
.nav-menu .current-menu-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.menu-item-has-children {
    position: relative;
}

.menu-item-has-children > a i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover > a i {
    transform: rotate(180deg);
}

.sub-menu {
    display: none;
    position: absolute;
    background-color: #333;
    min-width: 200px;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 10px 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
    border-top: 3px solid var(--primary-color);
}

.menu-item-has-children:hover > .sub-menu {
    display: block;
}

.sub-menu li a {
    padding: 10px 20px;
    color: #fff;
    white-space: nowrap;
    text-transform: none;
    font-weight: normal;
    text-align: left;
}

.sub-menu li a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    outline: none;
}

.menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

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

.search-box {
    display: flex;
    align-items: center;
    background-color: #444;
    border-radius: 25px;
    padding: 5px 15px;
    transition: background-color 0.3s ease;
}

.search-box:focus-within {
    background-color: #555;
}

.search-box input {
    background: none;
    border: none;
    color: #fff;
    padding: 5px;
    outline: none;
    width: 150px;
    transition: width 0.3s ease;
}

.search-box input::placeholder {
    color: #aaa;
}

.search-box button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
}

.deposit-btn {
    background-color: #28a745; /* Green */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.deposit-btn:hover {
    background-color: #218838;
}

/* Sticky Header */
.site-header.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Footer Styles */
.site-footer {
    background-color: var(--dark-bg);
    color: #ccc;
    padding-top: 40px;
    font-size: 0.9em;
    border-top: 5px solid var(--primary-color);
}

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

.footer-top .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footer-col {
    flex: 1;
    min-width: 180px;
    margin-bottom: 20px;
}

.footer-col.about-us-col {
    flex-basis: 25%; /* Give more space to about us */
    min-width: 250px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 5px;
    text-transform: uppercase;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col ul {
    padding: 0;
}

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

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

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

.footer-logo img {
    height: 45px;
    margin-bottom: 15px;
}

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

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

.social-links a {
    color: #fff;
    font-size: 1.6em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    text-decoration: none;
}

.footer-bottom {
    background-color: #1a1a1a;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #333;
}

.footer-bottom .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.payment-methods img {
    height: 30px;
    margin: 0 5px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

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

.copyright p {
    margin: 0;
    line-height: 1.5;
}

.age-restriction img {
    height: 40px;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
        text-align: left;
    }
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        display: none; /* Hidden by default for mobile */
        width: 100%;
        background-color: #2a2a2a;
        padding: 15px 0;
        border-radius: 5px;
    }
    .nav-menu.active {
        display: flex; /* Show when active */
    }
    .menu-toggle {
        display: block; /* Show on mobile */
        order: 2;
        margin-left: auto;
    }
    .header-actions {
        order: 1;
    }
    .logo {
        order: 0;
    }
    .main-header .container {
        justify-content: space-between;
    }
    .nav-menu .menu-item a {
        padding: 12px 20px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #3a3a3a;
    }
    .nav-menu .menu-item:last-child a {
        border-bottom: none;
    }
    .sub-menu {
        position: static;
        transform: none;
        width: 100%;
        background-color: #444;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        border-left: 3px solid var(--primary-color);
    }
    .sub-menu li a {
        padding-left: 40px;
    }
    .menu-item-has-children:hover > .sub-menu {
        display: none; /* Handled by JS for mobile */
    }
    .menu-item-has-children.sub-menu-open > .sub-menu {
        display: block;
    }
    .menu-item-has-children > a i {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
    .menu-item-has-children.sub-menu-open > a i {
        transform: translateY(-50%) rotate(180deg);
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        padding-bottom: 10px;
    }
    .top-bar-left, .top-bar-right {
        width: 100%;
        text-align: center;
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
    }
    .top-bar-right a, .top-bar-left a {
        margin: 0 8px;
    }
    .language-selector, .currency-selector {
        margin-right: 8px;
    }

    .main-header .container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .logo, .header-actions, .main-nav {
        width: 100%;
        text-align: center;
    }
    .header-actions {
        justify-content: center;
        gap: 10px;
    }
    .search-box input {
        width: 100px; /* Smaller search input on small screens */
    }
    .search-box {
        flex-grow: 1;
        max-width: 250px;
    }
    .deposit-btn {
        padding: 8px 15px;
    }

    .footer-top .container {
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
    }
    .footer-col {
        min-width: unset;
        width: 100%;
        text-align: center;
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .social-links {
        justify-content: center;
    }
    .footer-bottom .container {
        flex-direction: column;
        gap: 20px;
    }
    .payment-methods, .copyright, .age-restriction {
        width: 100%;
    }
    .payment-methods {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .top-bar-left, .top-bar-right {
        flex-direction: column;
        gap: 5px;
    }
    .top-bar-left a, .top-bar-right a {
        margin: 0;
    }
    .language-selector, .currency-selector {
        margin: 5px 0;
    }
    .user-auth-link {
        margin: 5px 0;
        width: 80%;
    }
    .user-auth-link.register-btn {
        margin-top: 5px;
    }
    .search-box {
        max-width: 100%;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
