/* Navigation Styles */

/* ===== DESKTOP NAVIGATION ===== */
.desktop-nav {
    display: block;
}

.site-header {
    background: var(--glass-background);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-bottom: 1.5px solid transparent;
    border-image: var(--glass-border) 1;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--primary-color);
}

.logo-img {
    height: 60px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    transition: all 0.3s ease;
}

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

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 35px;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    letter-spacing: 0.02em;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: -10px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 2px;
}

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

.main-nav a:hover::after {
    width: 100%;
    left: 0;
}

.header-cta {
    font-weight: 700;
    font-size: 0.9rem;
    color: #000;
    background: var(--primary-color);
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.header-cta:hover {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

/* 双品牌注册按钮样式 */
.register-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.register-buttons .header-cta {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.register-2028,
.register-qiusu {
    background: var(--primary-color) !important;
    color: #000 !important;
}

.register-2028:hover,
.register-qiusu:hover {
    background: #fff !important;
    color: var(--primary-color) !important;
    box-shadow: 0 0 15px var(--primary-color) !important;
}

/* ===== MOBILE NAVIGATION ===== */
.mobile-top-nav,
.mobile-bottom-nav {
    display: none;
}

/* Mobile Top Navigation */
.mobile-top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0.8rem 0;
    padding-top: calc(0.8rem + env(safe-area-inset-top));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.mobile-top-nav.nav-hidden {
    transform: translateY(-100%);
}

.mobile-top-nav.nav-visible {
    transform: translateY(0);
}

.mobile-top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.mobile-top-nav .logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    max-width: 40%;
}

.mobile-top-nav .logo span {
    color: var(--text-color);
}

.mobile-top-nav .logo-img {
    height: 30px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.mobile-top-nav .current-page {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    background: rgba(224, 184, 160, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(224, 184, 160, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 30%;
}

.mobile-top-nav .register-btn {
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: var(--primary-color);
    color: #000;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.mobile-top-nav .register-btn:hover {
    background: #fff;
    color: var(--primary-color);
}

/* 移动端双注册按钮样式 */
.mobile-register-buttons {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.mobile-register-buttons .register-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 50px;
    text-align: center;
}

.mobile-register-buttons .register-2028,
.mobile-register-buttons .register-qiusu {
    background: var(--primary-color);
    color: #000;
}

.mobile-register-buttons .register-2028:hover,
.mobile-register-buttons .register-qiusu:hover {
    background: #fff;
    color: var(--primary-color);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    justify-content: space-around;
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.mobile-bottom-nav.nav-hidden {
    transform: translateY(100%);
}

.mobile-bottom-nav.nav-visible {
    transform: translateY(0);
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.mobile-bottom-nav .nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.4rem 0.05rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    min-height: 50px;
}

.mobile-bottom-nav .nav-item a:hover,
.mobile-bottom-nav .nav-item a.active {
    color: var(--primary-color);
    background: rgba(224, 184, 160, 0.15);
    transform: translateY(-2px);
}

.mobile-bottom-nav .nav-icon {
    font-size: 1.3rem;
    margin-bottom: 0.15rem;
    display: block;
    transition: all 0.3s ease;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro";
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: auto;
    line-height: 1;
}

/* FontAwesome图标样式 */
.mobile-bottom-nav .fas {
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

/* 图标内容 */
.mobile-bottom-nav .fas.fa-trophy::before { content: "\f091"; }
.mobile-bottom-nav .fas.fa-bolt::before { content: "\f0e7"; }
.mobile-bottom-nav .fas.fa-gamepad::before { content: "\f11b"; }
.mobile-bottom-nav .fas.fa-futbol::before { content: "\f1e3"; }
.mobile-bottom-nav .fas.fa-gift::before { content: "\f06b"; }
.mobile-bottom-nav .fas.fa-newspaper::before { content: "\f1ea"; }

/* 备用图标 */
.mobile-bottom-nav .nav-item:nth-child(1) .nav-icon::after { content: "🏆"; }
.mobile-bottom-nav .nav-item:nth-child(2) .nav-icon::after { content: "⚡"; }
.mobile-bottom-nav .nav-item:nth-child(3) .nav-icon::after { content: "🎮"; }
.mobile-bottom-nav .nav-item:nth-child(4) .nav-icon::after { content: "⚽"; }
.mobile-bottom-nav .nav-item:nth-child(5) .nav-icon::after { content: "🎁"; }
.mobile-bottom-nav .nav-item:nth-child(6) .nav-icon::after { content: "📰"; }

/* 隐藏备用图标如果FontAwesome正常工作 */
.mobile-bottom-nav .fas::after {
    display: none;
}

.mobile-bottom-nav .nav-item a:hover .nav-icon,
.mobile-bottom-nav .nav-item a.active .nav-icon {
    transform: scale(1.1);
}

.mobile-bottom-nav .nav-text {
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1;
    margin-top: 1px;
}

/* ===== HAMBURGER MENU ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    position: relative;
    transition: transform 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.menu-toggle.active .hamburger {
    transform: rotate(45deg);
}

.menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(90deg);
}

.menu-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(90deg);
}

.main-nav.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-background);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem 0;
    border-bottom: 1.5px solid transparent;
    border-image: var(--glass-border) 1;
}

/* ===== RESPONSIVE NAVIGATION ===== */
@media (max-width: 768px) {
    /* Hide desktop navigation completely */
    .desktop-nav {
        display: none !important;
    }
    
    /* Show mobile navigation */
    .mobile-top-nav {
        display: block !important;
    }
    
    .mobile-bottom-nav {
        display: flex !important;
        bottom: 0;
        position: fixed;
    }
    
    /* Adjust body padding for fixed navigation */
    body {
        padding-top: calc(60px + env(safe-area-inset-top));
        padding-bottom: 0;
        overflow-x: hidden;
    }
    
    /* Adjust main content bottom margin */
    main {
        margin-bottom: calc(70px + env(safe-area-inset-bottom));
        min-height: calc(100vh - 130px);
    }
    
    /* Fix container width issues */
    .mobile-top-nav .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    /* Ensure bottom nav doesn't overflow */
    .mobile-bottom-nav {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* ===== NAVIGATION ANIMATIONS ===== */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.mobile-top-nav {
    animation: slideInDown 0.3s ease-out;
}

.mobile-bottom-nav {
    animation: slideInUp 0.3s ease-out;
}

/* ===== ADDITIONAL MOBILE FIXES ===== */
@media (max-width: 480px) {
    .mobile-top-nav .container {
        padding: 0 0.8rem;
    }
    
    .mobile-top-nav .logo-img {
        max-width: 100px;
    }
    
    .mobile-top-nav .current-page {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
        max-width: 25%;
    }
    
    .mobile-register-buttons .register-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        min-width: 45px;
    }
    
    /* 6项导航优化 */
    .mobile-bottom-nav .nav-text {
        font-size: 0.6rem;
    }
    
    .mobile-bottom-nav .nav-icon {
        font-size: 1.2rem;
    }
    
    .mobile-bottom-nav .nav-item a {
        padding: 0.3rem 0.02rem;
        min-height: 45px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .mobile-bottom-nav .nav-text {
        font-size: 0.55rem;
    }
    
    .mobile-bottom-nav .nav-icon {
        font-size: 1.1rem;
        margin-bottom: 0.1rem;
    }
    
    .mobile-bottom-nav .nav-item a {
        padding: 0.25rem 0.01rem;
        min-height: 42px;
    }
}

/* ===== SAFE AREA SUPPORT ===== */
@supports (padding: max(0px)) {
    .mobile-top-nav {
        padding-top: max(0.8rem, env(safe-area-inset-top));
    }
    
    .mobile-bottom-nav {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
} 