/* Shared CSS for ah88 */

:root {
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --bg-color: #0A0A0A;
    --card-bg-color: #111111;
    --text-main-color: #FFF6D6;
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --btn-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --header-offset: 122px; /* Desktop: 68px (top bar) + 52px (main nav) + 2px buffer */
}

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color);
    background-color: var(--bg-color);
    padding-top: var(--header-offset);
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* --- Header Styles --- */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--card-bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    min-height: 68px; /* Minimum height for header-top, main-nav will add to it */
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
}

.logo {
    flex-shrink: 0;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    padding: 10px 0;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    order: 1;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .hamburger-icon:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.main-nav {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 0 20px;
}

.nav-link {
    color: var(--text-main-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 0;
    transition: color 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.desktop-nav-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.mobile-nav-buttons {
    display: none !important; /* Hidden on desktop */
}

.btn {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    background: var(--btn-gradient);
    color: var(--text-main-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 15px var(--glow-color);
}

.mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 998;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* --- Footer Styles --- */
.site-footer {
    background-color: var(--card-bg-color);
    color: var(--text-main-color);
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-color);
}

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

.footer-top-row {
    margin-bottom: 30px;
}

.footer-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 15px;
}

.footer-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-main-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-nav a {
    color: var(--text-main-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--secondary-color);
}

.footer-mid-slots {
    margin-bottom: 30px;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-bottom {
    text-align: center;
    font-size: 13px;
    color: var(--text-main-color);
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-slot-anchor-inner {
    min-height: 10px; /* Ensure slot anchors are visible for content injection */
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    :root {
        --header-offset: 110px; /* Mobile: 60px (top bar) + 48px (main nav) + 2px buffer */
    }

    .header-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
        justify-content: flex-start;
    }

    .hamburger-menu {
        display: block;
        order: 1;
        position: relative;
        z-index: 1001;
        padding: 8px;
    }

    .logo {
        order: 2;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 8px 0;
    }

    .desktop-nav-buttons {
        display: none !important;
    }

    .mobile-nav-buttons {
        display: flex !important;
        gap: 8px;
        order: 3;
        flex-shrink: 0;
    }

    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .main-nav {
        display: none; /* Hidden by default */
        position: fixed;
        top: var(--header-offset);
        left: 0;
        width: 280px;
        max-width: 80%;
        height: calc(100vh - var(--header-offset));
        background-color: var(--card-bg-color);
        flex-direction: column;
        padding: 20px;
        transform: translateX(-100%); /* Slide out of view */
        transition: transform 0.3s ease;
        z-index: 999;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
    }

    .main-nav.active {
        display: flex; /* Crucial for visibility */
        transform: translateX(0); /* Slide into view */
    }

    .nav-link {
        padding: 12px 0;
        font-size: 18px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }

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

    .footer-cols {
        flex-direction: column;
        gap: 20px;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
    }

    .page-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-content {
        overflow-x: hidden;
        max-width: 100%;
    }
    body {
        overflow-x: hidden;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
