/* ========== Navbar (带下拉) ========== */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: #fff; border-bottom: 1px solid #e5e7eb; height: 64px;
    display: flex; align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.nav-inner {
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 20px; font-weight: 700; color: #1a6fff;
}
.logo-mark {
    width: 32px; height: 32px; border-radius: 6px;
    background: linear-gradient(135deg, #1a6fff 0%, #4a90ff 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px; font-weight: 700;
}
.nav-menu { display: flex; gap: 0; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
    display: block; padding: 22px 16px;
    font-size: 15px; color: #333; font-weight: 500;
    transition: color 0.2s;
    display: flex; align-items: center; gap: 4px;
}
.nav-menu > li > a:hover, .nav-menu > li.active > a { color: #1a6fff; }
.nav-menu > li.active > a::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: 0;
    height: 2px; background: #1a6fff;
}
.nav-arrow {
    width: 10px; height: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px; opacity: 0.7;
}
.dropdown {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    min-width: 160px;
    background: #fff; border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 6px 0;
    opacity: 0; visibility: hidden;
    transform: translateX(-50%) translateY(8px);
    transition: all 0.2s ease;
}
.nav-menu > li:hover .dropdown {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown li a {
    display: block; padding: 10px 18px;
    font-size: 14px; color: #4b5563;
    transition: all 0.15s; white-space: nowrap;
}
.dropdown li a:hover { color: #1a6fff; background: #f0f6ff; }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.search-box { position: relative; }
.search-box input {
    width: 180px; height: 34px; border: 1px solid #e5e7eb;
    border-radius: 17px; padding: 0 16px 0 36px; font-size: 13px;
    background: #f9fafb; outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.search-box input:focus { border-color: #1a6fff; background: #fff; }
.search-box svg {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%); color: #9ca3af;
}
.btn-login {
    padding: 7px 18px; border: 1px solid #1a6fff; color: #1a6fff;
    border-radius: 4px; font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.btn-login:hover { background: #1a6fff; color: #fff; }
.nav-toggle {
    display: none; flex-direction: column; gap: 4px;
    cursor: pointer; background: none; border: none; padding: 4px;
}
.nav-toggle span { width: 22px; height: 2px; background: #333; border-radius: 2px; }


/* Mobile Hamburger Menu Styles */
.mobile-menu-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1; visibility: visible;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0; right: 0;
    width: 280px; max-width: 80vw;
    height: 100vh;
    background: #fff;
    z-index: 999;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 60px 0 24px;
}
.mobile-menu-drawer.active {
    transform: translateX(0);
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.mobile-menu-list > li {
    position: relative;
    border-bottom: 1px solid #f0f2f5;
}
.mobile-menu-list > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.mobile-menu-list > li > a:hover {
    color: #1a6fff;
    background: #f0f6ff;
}
.mobile-menu-list > li.active > a {
    color: #1a6fff;
}

/* Mobile dropdown */
.mobile-menu-list .dropdown {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9fafb;
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}
.mobile-menu-list li.open > .dropdown {
    max-height: 500px;
}
.mobile-menu-list .dropdown li a {
    display: block !important;
    padding: 10px 20px 10px 36px !important;
    font-size: 14px !important;
    color: #4b5563 !important;
    font-weight: 400 !important;
    background: transparent !important;
    transition: all 0.15s !important;
    text-decoration: none !important;
}
.mobile-menu-list .dropdown li a:hover {
    color: #1a6fff !important;
    background: #eef2ff !important;
}
.mobile-menu-list .dropdown li a::after {
    display: none !important;
}

/* Mobile nav-arrow indicator */
.mobile-menu-list > li > a .nav-arrow {
    transition: transform 0.3s ease;
}
.mobile-menu-list > li.open > a .nav-arrow {
    transform: rotate(-135deg);
}

/* Toggle button animation (hamburger → X) */
.nav-toggle {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px; height: 44px;
    gap: 0;
    cursor: pointer;
    background: none; border: none;
    padding: 0;
    z-index: 1000;
}
.nav-toggle span {
    position: absolute;
    width: 22px; height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 14px; }

.nav-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* 仅移动端显示汉堡按钮 */
@media (max-width: 1024px) {
    .nav-toggle { display: flex !important; }
}


/* ========== Footer (深色5列+友情链接) ========== */
.footer {
    background: #1f2937; color: #d1d5db;
    padding: 56px 24px 0;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 32px; padding-bottom: 40px;
    border-bottom: 1px solid #374151;
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand .logo-mark { font-size: 14px; }
.footer-brand p { font-size: 13px; color: #9ca3af; line-height: 1.8; }
.footer-contact { margin-top: 16px; }
.footer-contact li {
    font-size: 13px; color: #9ca3af; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.footer-col h4 {
    font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    font-size: 13px; color: #9ca3af; transition: color 0.2s;
}
.footer-col ul li a:hover { color: #60a5fa; }
.footer-bottom {
    padding: 20px 0; text-align: center;
    font-size: 12px; color: #6b7280;
}
.friend-links {
    padding: 20px 0; border-top: 1px solid #374151;
    margin-top: 24px;
}
.friend-links h5 {
    font-size: 13px; color: #d1d5db; margin-bottom: 12px; font-weight: 500;
}
.friend-links ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.friend-links ul li a {
    font-size: 12px; color: #6b7280; transition: color 0.2s;
}
.friend-links ul li a:hover { color: #60a5fa; }

/* Float Sidebar (right-side toolbar) */
.float-sidebar {
    position: fixed; right: 16px; top: 50%; transform: translateY(-50%);
    z-index: 99;
    display: flex; flex-direction: column; gap: 8px;
}

.float-btn {
    position: relative;
    width: 48px; height: 48px; border-radius: 12px;
    background: #fff; color: #6b7280;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.25s;
    border: 1px solid #eef0f3;
}
.float-btn:hover {
    background: #1a6fff; color: #fff; border-color: #1a6fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,111,255,0.3);
}
.float-btn.to-top { display: none; }
.float-btn.to-top.visible { display: flex; }

/* Tooltip label on hover */
.float-btn .btn-tip {
    position: absolute; right: 58px; top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: #1f2937; color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0; visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}
.float-btn .btn-tip::after {
    content: '';
    position: absolute; right: -5px; top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid #1f2937;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}
.float-btn:hover .btn-tip {
    opacity: 1; visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* WeChat Modal */
.wechat-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.wechat-modal-overlay.active {
    opacity: 1; visibility: visible;
}

.wechat-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    width: 320px; max-width: 90vw;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.wechat-modal-overlay.active .wechat-modal {
    transform: scale(1);
}

.wechat-modal .modal-close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px;
    border: none; background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}
.wechat-modal .modal-close:hover {
    background: #e5e7eb; color: #1f2937;
}

.wechat-modal h3 {
    font-size: 18px; font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px;
}

.wechat-qrcode {
    width: 220px; height: 220px;
    margin: 0 auto 16px;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.wechat-qrcode img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.wechat-modal .qr-tip {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Mobile: reduce size */
@media (max-width: 768px) {
    .float-sidebar {
        right: 10px;
        gap: 6px;
    }
    .float-btn {
        width: 42px; height: 42px;
        border-radius: 10px;
    }
    .float-btn .btn-tip { display: none; }
}
