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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled {
    background: rgba(30, 30, 30, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 20px rgba(0, 0, 0, 0.25);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 12px;
}

/* 品牌区域 */
.nav-brand {
    flex-shrink: 0;
    margin-right: 8px;
}

.nav-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    height: 30px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}

.brand-author {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* 桌面端菜单 */
.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    position: relative;
    display: block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 16px;
    height: 2px;
    background: #519FE0;
    border-radius: 1px;
    transition: transform 0.25s ease;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.95);
}

.nav-link.active {
    color: #fff;
    font-weight: 600;
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* 操作按钮 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn-trial {
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
}

.btn-trial svg {
    opacity: 0.5;
}

.btn-trial:hover {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.btn-trial:hover svg {
    opacity: 0.85;
}

.btn-buy {
    color: #fff;
    background: linear-gradient(135deg, #519FE0 0%, #4088c9 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(81, 159, 224, 0.25);
}

.btn-buy:hover {
    background: linear-gradient(135deg, #5eaae8 0%, #519FE0 100%);
    box-shadow: 0 4px 16px rgba(81, 159, 224, 0.4);
    transform: translateY(-1px);
}

/* 汉堡按钮 */
.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.hamburger-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 16px;
    height: 16px;
}

.hamburger-line {
    display: block;
    width: 16px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

.hamburger-line:nth-child(2) {
    width: 11px;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* ===== 移动端遮罩 ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.open {
    opacity: 1;
}

/* ===== 移动端侧滑菜单 ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    z-index: 1002;
    background: #2a2a2a;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo {
    height: 26px;
    width: auto;
}

.mobile-brand-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.mobile-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.mobile-nav-list {
    list-style: none;
    padding: 12px 16px;
    flex: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
}

.mobile-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav-link.active {
    color: #519FE0;
    background: rgba(81, 159, 224, 0.08);
    font-weight: 600;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.25s;
    text-align: center;
}

.mobile-btn-trial {
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
}

.mobile-btn-trial:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.mobile-btn-buy {
    color: #fff;
    background: linear-gradient(135deg, #519FE0 0%, #4088c9 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(81, 159, 224, 0.3);
}

.mobile-btn-buy:hover {
    box-shadow: 0 4px 18px rgba(81, 159, 224, 0.45);
}

.mobile-menu-footer {
    padding: 16px 24px 24px;
    text-align: center;
}

.mobile-author {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3px;
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
    .nav-inner {
        padding: 0 16px;
    }

    .nav-list {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    .hamburger {
        display: flex;
        margin-left: auto;
    }

    .mobile-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-overlay.open {
        pointer-events: auto;
    }

    .mobile-menu {
        display: flex;
    }

    .mobile-nav-list {
        padding: 8px 12px;
    }

    .mobile-nav-link {
        padding: 12px 16px;
        font-size: 15px;
        min-height: 44px;
    }

    .mobile-actions {
        padding: 16px 20px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .navbar {
        background: rgba(30, 30, 30, 0.92);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
    }
}

@media (max-width: 480px) {
    .brand-text {
        display: none;
    }

    .nav-inner {
        padding: 0 12px;
        height: 56px;
    }

    .nav-logo {
        height: 26px;
    }

    .hamburger {
        width: 40px;
        height: 40px;
    }

    .mobile-menu {
        width: 100%;
        max-width: 100vw;
    }

    .mobile-menu-header {
        padding: 16px 16px;
    }

    .mobile-nav-link {
        padding: 14px 16px;
        font-size: 16px;
    }

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