/* MenTuZeXiao - Main Stylesheet */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.7;
}
a { color: #3b82f6; text-decoration: none; transition: color .2s; }
a:hover { color: #1d4ed8; }
img { max-width: 100%; display: block; }

/* ---------- Container ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    position: sticky; top: 0; z-index: 100;
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo a {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.4rem; font-weight: 700; color: #1e293b;
}
.logo-icon { font-size: 1.6rem; }
.logo-text em { color: #3b82f6; font-style: normal; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    padding: 6px 14px; border-radius: 8px;
    color: #475569; font-size: .95rem; transition: all .2s;
}
.main-nav a:hover { background: #f1f5f9; color: #1e293b; }
.btn-login  { border: 1.5px solid #3b82f6; color: #3b82f6 !important; }
.btn-login:hover { background: #eff6ff !important; }
.btn-register { background: #3b82f6 !important; color: #fff !important; font-weight: 600; }
.btn-register:hover { background: #2563eb !important; }
.btn-logout { border: 1.5px solid #fca5a5; color: #dc2626 !important; }
.btn-logout:hover { background: #fef2f2 !important; }
/* 付费会员购买按钮 - 金色渐变，区分于其他菜单 */
.nav-pay-btn {
    background: transparent !important;
    color: #f59e0b !important;
    border: 1.5px solid #f59e0b !important;
    border-radius: 6px !important;
    padding: 4px 13px !important;
    font-weight: 700 !important;
    font-size: .82rem !important;
    letter-spacing: .04em;
    box-shadow: none;
    transition: background .15s, color .15s !important;
}
.nav-pay-btn:hover {
    background: #f59e0b !important;
    color: #fff !important;
    opacity: 1 !important;
}
.nav-username {
    padding: 6px 12px;
    color: #94a3b8;
    font-size: .88rem;
    font-weight: 600;
    cursor: default;
    user-select: none;
    letter-spacing: .01em;
}

/* ---------- Main ---------- */
.site-main { min-height: calc(100vh - 64px - 180px); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 60%, #60a5fa 100%);
    color: #fff;
    padding: 80px 0 70px;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    padding: 5px 18px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 22px;
    letter-spacing: .04em;
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero h1 span { color: #fde68a; }
.hero > .container > p {
    font-size: 1.1rem;
    opacity: .88;
    margin-bottom: 36px;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
}

/* ---------- Hero Search Form ---------- */
.hero-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    max-width: 580px;
    margin: 0 auto 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.hero-search select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #374151;
    padding: 8px 4px;
    cursor: pointer;
    min-width: 80px;
}
.hero-search .sep {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 12px;
    flex-shrink: 0;
}
.hero-search input[type="number"] {
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #374151;
    flex: 1;
    padding: 8px 4px;
    min-width: 0;
}
.hero-search input[type="number"]::placeholder { color: #94a3b8; }
.hero-search button {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.hero-search button:hover { opacity: .9; }

/* ---------- Hero Stats ---------- */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.stat .num { font-size: 2rem; font-weight: 800; color: #fde68a; }
.stat .label { font-size: .88rem; opacity: .8; margin-top: 2px; }

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 1.9rem; font-weight: 800; color: #1e293b; margin-bottom: 10px; }
.section-header p { color: #64748b; font-size: 1rem; margin-bottom: 16px; }
.section-header .line {
    width: 48px; height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 2px;
    margin: 0 auto;
}

/* ---------- Steps ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 860px;
    margin: 0 auto;
}
.step {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .2s;
}
.step:hover { transform: translateY(-4px); }
.step-num {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 800;
    margin: 0 auto 16px;
}
.step h4 { font-size: 1.1rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.step p { font-size: .9rem; color: #64748b; }

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    padding: 72px 0;
    text-align: center;
}
.cta-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cta-section p { opacity: .85; margin-bottom: 28px; font-size: 1rem; }
.btn-cta {
    display: inline-block;
    background: #fff;
    color: #1e40af;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(0,0,0,.15);
    transition: all .2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); color: #1d4ed8; }

/* ---------- Footer ---------- */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 48px 0 24px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}
.footer-col h4 { color: #f1f5f9; font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.footer-col p { font-size: .88rem; line-height: 1.8; }
.footer-col a { display: block; color: #94a3b8; font-size: .88rem; margin-bottom: 6px; }
.footer-col a:hover { color: #e2e8f0; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 20px;
    text-align: center;
    font-size: .82rem;
}


/* ---------- Hamburger Button (mobile only) ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px; height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    gap: 5px;
    border-radius: 8px;
    transition: background .2s;
}
.hamburger:hover { background: #f1f5f9; }
.hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: all .3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99;
}
.nav-overlay.active { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    /* Hero */
    .hero h1 { font-size: 1.9rem; }
    .hero-search { flex-direction: column; border-radius: 16px; padding: 16px; gap: 10px; }
    .hero-search select,
    .hero-search input[type="number"] { width: 100%; }
    .hero-search .sep { display: none; }
    .hero-search button { width: 100%; border-radius: 10px; }
    .steps { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    .hero-stats { gap: 24px; }

    /* Header: 显示汉堡按钮，隐藏导航 */
    .hamburger { display: flex; }
    .main-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        position: fixed;
        top: 0; right: -280px;
        width: 260px;
        height: 100vh;
        background: #fff;
        box-shadow: -4px 0 24px rgba(0,0,0,.15);
        padding: 80px 20px 32px;
        z-index: 100;
        transition: right .3s cubic-bezier(.4,0,.2,1);
        overflow-y: auto;
    }
    .main-nav.open { right: 0; }
    .main-nav a {
        width: 100%;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 10px;
        color: #374151;
    }
    .main-nav a:hover { background: #f1f5f9; }
    .btn-login, .btn-register, .btn-logout {
        width: 100%;
        text-align: center;
        margin-top: 4px;
    }
    .btn-register { justify-content: center; display: flex; }
    .nav-pay-btn { width: 100%; text-align: center; }
    .nav-username { width: 100%; padding: 12px 16px; }
}