/* Shared CSS for Casino Brand */

/* --- Variables --- */
:root {
    --primary-color: #ffd700; /* Gold */
    --secondary-color: #2e8b57; /* Sea Green */
    --accent-color: #ff4500; /* Orange Red */
    --dark-bg: #1a1a1a;
    --light-bg: #f9f9f9;
    --text-color: #e0e0e0;
    --dark-text-color: #333;
    --border-color: #444;
    --font-family-primary: 'Roboto', sans-serif;
    --font-family-accent: 'Oswald', sans-serif;
    --header-height-desktop: 80px;
    --header-height-mobile: 60px;
}

/* --- Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

a:hover {
    color: var(--accent-color);
    transform: translateY(-1px);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-accent);
    color: var(--primary-color);
    margin-bottom: 0.5em;
    line-height: 1.2;
}

p {
    margin-bottom: 1em;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #246e43; /* Darken secondary color */
    transform: translateY(-2px);
}

.section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

/* --- Global Section Padding --- */
.section-padding {
    padding: 60px 0;
}
.bg-light-dark {
    background-color: #1f1f1f;
}

/* --- Header Specific Styles (General) --- */
.site-header {
    background-color: var(--dark-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar {
    background-color: #0d0d0d;
    padding: 8px 0;
    font-size: 0.9em;
    border-bottom: 1px solid var(--border-color);
}

.header-top-bar .top-bar-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.language-selector select {
    background-color: #222;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffd700'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
}

.user-actions .btn {
    padding: 6px 15px;
    font-size: 0.9em;
}

.btn-login {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-login:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.btn-register {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}
.btn-register:hover {
    background-color: var(--accent-color);
}

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

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.main-navigation .nav-item {
    position: relative;
}

.main-navigation .nav-link {
    color: var(--text-color);
    font-weight: bold;
    padding: 10px 0;
    display: block;
    position: relative;
}

.main-navigation .nav-link.active::after,
.main-navigation .nav-link:hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(1);
    transition: transform 0.3s ease;
}
.main-navigation .nav-link:not(.active)::after {
    transform: scaleX(0);
}

.main-navigation .has-submenu > .nav-link i {
    margin-left: 5px;
    font-size: 0.8em;
}

.main-navigation .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    min-width: 180px;
    padding: 10px 0;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.main-navigation .nav-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .submenu li a {
    padding: 8px 15px;
    display: block;
    color: var(--text-color);
}

.main-navigation .submenu li a:hover {
    background-color: #2a2a2a;
    color: var(--primary-color);
}

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

.header-utilities button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.header-utilities button:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none; /* Hidden on desktop */
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    display: flex;
    justify-content: flex-end;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-content {
    background-color: var(--dark-bg);
    width: 80%;
    max-width: 300px;
    padding: 20px;
    position: relative;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.close-menu-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    color: var(--primary-color);
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-list {
    margin-top: 50px;
}

.mobile-nav-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item a {
    display: block;
    color: var(--text-color);
    font-weight: bold;
    padding: 8px 0;
    font-size: 1.1em;
}

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

.mobile-nav-item.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-submenu {
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-nav-item.has-submenu.open .mobile-submenu {
    max-height: 200px; /* Adjust based on content */
    transition: max-height 0.5s ease-in;
}

.mobile-submenu li a {
    font-size: 1em;
    padding: 5px 0;
}

.mobile-submenu li a:hover {
    color: var(--primary-color);
}

.mobile-nav-item.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

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

/* --- Marquee Section --- */
.marquee-section {
    background-color: #222;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 999; /* Below header, above main content */
}

.marquee-container {
    display: flex;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
    padding: 0 15px; /* Ensure padding on sides */
}

.marquee-icon {
    flex-shrink: 0;
    font-size: 1.5em;
    color: var(--primary-color);
    margin-right: 15px;
}

.marquee-icon-emoji {
    display: inline-block;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

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

.marquee-content-track {
    display: inline-block; /* Allows content to be wider than its parent */
    animation: marquee-scroll 30s linear infinite; /* Adjust duration based on content length */
    padding-right: 20px; /* Space between duplicated content */
}

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

@keyframes marquee-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); } /* Scrolls half its width (assuming content is duplicated) */
}

.marquee-text {
    display: inline-block;
    color: #fff;
    font-size: 0.95em;
    margin: 0;
    padding-right: 50px; /* Space between messages */
}

.marquee-text .highlight {
    color: var(--primary-color);
    font-weight: bold;
}

.marquee-text .marquee-link {
    color: var(--accent-color);
    font-weight: bold;
    margin-left: 5px;
}

.marquee-text .separator {
    color: #777;
    margin: 0 20px;
}

/* --- Footer Specific Styles (General) --- */
.site-footer {
    background-color: #0d0d0d;
    color: #bbb;
    padding: 40px 0 20px;
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.footer-widget .widget-title {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
}

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

.footer-widget ul li a {
    color: #bbb;
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
}

.footer-about p {
    margin-bottom: 15px;
}

.social-links a {
    display: inline-block;
    color: #bbb;
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

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

.payment-methods-logos img, .licensing-logos img {
    height: 30px; /* Adjust as needed */
    width: auto;
    filter: grayscale(100%) brightness(150%);
    transition: filter 0.3s ease;
}

.payment-methods-logos img:hover, .licensing-logos img:hover {
    filter: grayscale(0%) brightness(100%);
}

.security-title {
    margin-top: 25px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color); /* Double border for aesthetics */
    margin-top: 20px;
}

.footer-bottom p {
    margin-bottom: 0.5em;
    color: #999;
}

/* --- Hero Banner --- */
.hero-banner {
    position: relative;
    height: 500px; /* Adjust height as needed */
    background: url('/assets/images/banner-bg.jpg') no-repeat center center/cover; /* Placeholder background */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.banner-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #eee;
}

.banner-actions .btn {
    margin: 0 10px;
    font-size: 1.1em;
    padding: 12px 25px;
}

/* --- Game Categories --- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.category-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block; /* Ensure the whole card is clickable */
    color: var(--text-color);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.category-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-card h3 {
    font-size: 1.4em;
    margin: 15px 0 5px;
    color: var(--primary-color);
}

.category-card p {
    font-size: 0.9em;
    color: #ccc;
    padding: 0 15px 15px;
}

/* --- Game List --- */
.game-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.game-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover img {
    transform: scale(1.05);
}

.game-info {
    padding: 15px;
    text-align: center;
}

.game-info h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.game-info p {
    font-size: 0.85em;
    color: #ccc;
    margin-bottom: 15px;
}

.game-info .btn-sm {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* --- Promotions Section --- */
.promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.promo-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.promo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.promo-content {
    padding: 20px;
    text-align: center;
}

.promo-content h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.promo-content p {
    font-size: 1em;
    color: #ccc;
    margin-bottom: 20px;
}

/* --- About Us Section --- */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
    color: #ddd;
}

.about-content p {
    font-size: 1.1em;
    margin-bottom: 1.5em;
}

/* --- Contact Us Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.contact-info-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.contact-info-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.contact-info-card h3 i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.contact-info-card p {
    color: #ccc;
    margin-bottom: 20px;
}

.contact-form-wrapper {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.contact-form-wrapper h3 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: bold;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: #333;
    color: var(--text-color);
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* Hide desktop nav */
    }
    .menu-toggle {
        display: block; /* Show hamburger menu */
    }
    .header-main .header-wrapper {
        justify-content: space-between;
    }
    .header-utilities {
        gap: 10px;
    }
    .header-top-bar .top-bar-content {
        justify-content: center;
    }
    .footer-widgets {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-widget ul {
        padding-left: 0;
    }
    .footer-widget ul li {
        display: inline-block;
        margin: 0 10px 8px;
    }
    .social-links {
        margin-top: 15px;
    }
    .payment-methods-logos, .licensing-logos {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        height: 400px;
    }
    .banner-content h1 {
        font-size: 2.5em;
    }
    .banner-content p {
        font-size: 1.1em;
    }
    .banner-actions .btn {
        font-size: 1em;
        padding: 10px 20px;
        margin: 5px;
    }
    .section-title {
        font-size: 2em;
    }
    .categories-grid, .game-cards-grid, .promotions-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .game-card img, .category-card img, .promo-card img {
        height: 160px;
    }
    .about-content {
        text-align: left;
    }
    .contact-form-wrapper {
        padding: 30px 20px;
    }
    .contact-form-wrapper h3 {
        font-size: 1.8em;
    }
}

@media (max-width: 576px) {
    .logo img {
        height: 40px;
    }
    .header-main {
        padding: 10px 0;
    }
    .header-top-bar {
        padding: 5px 0;
    }
    .user-actions {
        display: none; /* Hide login/register on very small screens, use mobile menu */
    }
    .language-selector {
        margin-right: auto;
    }
    .site-footer {
        padding: 30px 0 15px;
    }
    .footer-widgets {
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .footer-widget .widget-title {
        font-size: 1.1em;
    }
    .footer-bottom p {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 300px;
    }
    .banner-content h1 {
        font-size: 2em;
    }
    .banner-content p {
        font-size: 0.9em;
    }
    .banner-actions .btn {
        display: block;
        width: 80%;
        margin: 10px auto;
    }
    .section-padding {
        padding: 40px 0;
    }
    .section-title {
        font-size: 1.8em;
    }
    .marquee-text {
        font-size: 0.85em;
    }
    .marquee-text .separator {
        margin: 0 10px;
    }
    .game-card img, .category-card img, .promo-card img {
        height: 140px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
