:root {
    --bg-global: #f7f8fb;
    --bg-secondary: #eff3ff;
    --card-bg: rgba(255, 255, 255, 0.72);
    --text-main: #1d1e2c;
    --text-sub: #5c6b8c;
    --accent-blue: #0070f3;
    --accent-green: #00b37e;
    --glow-blue: rgba(0, 112, 243, 0.15);
    --glow-green: rgba(0, 179, 126, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-global);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    /* 浅蓝/浅绿渐变蒙层作为背景的打底 */
    background: radial-gradient(circle at 15% 50%, var(--glow-blue) 0%, transparent 50%),
                radial-gradient(circle at 85% 30%, var(--glow-green) 0%, transparent 50%),
                linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}

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

/* 3D 背景容器层，位于底层 */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none; /* 让鼠标事件穿透给下方的卡片和文字 */
}

/* 顶部导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 60px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 8px 20px rgba(10, 27, 68, 0.18);
    background: transparent;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 112, 243, 0.1);
    color: #18406c;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(18, 35, 74, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-link-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 112, 243, 0.2);
    box-shadow: 0 14px 28px rgba(18, 35, 74, 0.12);
}

/* 主体区域 */
.hero-section {
    min-height: calc(100vh - 80px); /* 减去顶部导航和底部留白 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 120px 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInDown 1s ease-out forwards;
}

.main-title {
    font-size: 56px;
    font-weight: 800;
    color: #111;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    background: linear-gradient(120deg, #111 0%, #444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 20px;
    color: var(--text-sub);
    max-width: 600px;
    margin: 0 auto;
}

/* 卡片容器 */
.cards-container {
    display: flex;
    gap: 40px;
    max-width: 1000px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

/* 毛玻璃卡片设计 */
.glass-card {
    flex: 1;
    min-width: 320px;
    max-width: 460px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 48px 40px;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03), 
                inset 0 0 0 1px rgba(255,255,255,0.5);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* 卡片内部发光效果 */
.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 112, 243, 0.08), 
                inset 0 0 0 1px rgba(255,255,255,0.8);
    border-color: rgba(0, 112, 243, 0.2);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card * {
    position: relative;
    z-index: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0,112,243,0.1), rgba(0,179,126,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    border: 1px solid rgba(255,255,255,0.6);
    flex-shrink: 0;
}

.glass-card:nth-child(2) .card-icon {
    color: var(--accent-green);
}

.card-icon svg {
    width: 30px;
    height: 30px;
}

.glass-card h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.card-desc {
    font-size: 16px;
    color: var(--text-sub);
    line-height: 1.7;
    margin-bottom: 24px;
}

.card-action {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-blue);
    transition: transform 0.2s;
}

.glass-card:hover .card-action {
    transform: translateX(4px);
}

/* 底部区域 */
.footer {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    padding: 80px 60px 40px;
    position: relative;
    z-index: 1;
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.footer-brand p {
    margin-top: 16px;
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.8;
    max-width: 280px;
}

.footer-col h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-sub);
    font-size: 15px;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: #8c98b0;
    font-size: 14px;
}

/* 隐藏导航触发器 (右下角隐蔽角落) */
.hidden-trigger {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 136px;
    height: 52px;
    padding: 0 18px 0 14px;
    border: 1px solid rgba(0, 112, 243, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 36px rgba(18, 35, 74, 0.12);
    color: #15305c;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hidden-trigger:hover {
    background: rgba(255, 255, 255, 0.94);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(18, 35, 74, 0.16);
}

.hidden-trigger-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.14), rgba(0, 179, 126, 0.18));
    color: var(--accent-blue);
    font-size: 15px;
    font-weight: 700;
}

.hidden-trigger-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* 隐藏导航面板 */
.hidden-panel {
    position: fixed;
    bottom: 92px;
    right: 28px;
    width: min(380px, calc(100vw - 32px));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(15, 35, 84, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.85);
    padding: 24px;
    z-index: 101;
    transform: translateY(18px) scale(0.97);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.28s ease;
}

.hidden-panel.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 16px;
}

.panel-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(21, 48, 92, 0.48);
}

.panel-header h3 {
    font-size: 22px;
    color: #16325c;
    letter-spacing: -0.03em;
}

#close-panel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 35, 84, 0.05);
    border: 1px solid rgba(15, 35, 84, 0.06);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #7d89a5;
    flex-shrink: 0;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

#close-panel-btn:hover {
    color: #183866;
    background: rgba(0, 112, 243, 0.08);
    transform: rotate(90deg);
}

.panel-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.08), rgba(0, 179, 126, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.panel-badge {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #17406e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.panel-meta p {
    font-size: 13px;
    color: #4f6288;
    line-height: 1.6;
}

.bookmark-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 35, 84, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    color: #20345a;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bookmark-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 112, 243, 0.16);
    box-shadow: 0 16px 30px rgba(18, 35, 74, 0.1);
    background: rgba(255, 255, 255, 0.96);
}

.bookmark-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.12), rgba(0, 179, 126, 0.16));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-blue);
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.bookmark-item:hover .bookmark-icon {
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.18), rgba(0, 179, 126, 0.24));
    transform: scale(1.04);
}

.bookmark-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bookmark-name {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: #1b3157;
}

.bookmark-url {
    font-size: 12px;
    color: #6b7a96;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-empty {
    padding: 28px 18px;
    text-align: center;
    font-size: 13px;
    color: #71809e;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed rgba(15, 35, 84, 0.12);
}

.panel-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-tip {
    font-size: 12px;
    color: #7483a0;
}

.add-btn {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.08), rgba(0, 179, 126, 0.1));
    border: 1px dashed rgba(0, 112, 243, 0.22);
    border-radius: 14px;
    color: #1e4f86;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.add-btn:hover {
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.12), rgba(0, 179, 126, 0.14));
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-1px);
}

.nav-page-body {
    min-height: 100vh;
    background: radial-gradient(circle at 12% 18%, rgba(0, 112, 243, 0.12), transparent 30%),
                radial-gradient(circle at 88% 16%, rgba(0, 179, 126, 0.14), transparent 24%),
                linear-gradient(135deg, #f7f9ff 0%, #eef4ff 52%, #f8fbff 100%);
}

.nav-page-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}

.nav-page-topbar,
.nav-search-panel {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 26px 70px rgba(15, 35, 84, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-page-topbar {
    align-items: flex-start;
    margin-bottom: 24px;
}

.nav-page-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #35517d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-page-topbar h1,
.nav-search-copy h2 {
    margin: 16px 0 10px;
    font-size: 34px;
    letter-spacing: -0.04em;
    color: #14284a;
}

.nav-page-topbar p,
.nav-search-copy p {
    max-width: 680px;
    color: #607292;
    font-size: 15px;
    line-height: 1.8;
}

.nav-page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-search-panel {
    align-items: flex-end;
    margin-bottom: 28px;
}

.nav-search-copy {
    flex: 1;
}

.nav-search-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.1), rgba(0, 179, 126, 0.12));
    color: #214b7e;
    font-size: 12px;
    font-weight: 700;
}

.nav-search-box {
    width: min(460px, 100%);
    position: relative;
}

.nav-input-wrap {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 35, 84, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav-input-wrap input {
    flex: 1;
    height: 48px;
    border: 0;
    background: transparent;
    color: #17365f;
    font-size: 15px;
    outline: none;
}

.nav-input-wrap input::placeholder {
    color: #7a8aa6;
}

.nav-input-wrap button {
    min-width: 86px;
    height: 48px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.12), rgba(0, 179, 126, 0.14));
    color: #1d4f86;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.nav-search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 35, 84, 0.08);
    box-shadow: 0 26px 50px rgba(15, 35, 84, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 20;
}

.nav-search-suggestions.active {
    display: grid;
}

.nav-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    background: rgba(243, 247, 255, 0.88);
    color: #183662;
    cursor: pointer;
    text-align: left;
}

.nav-suggestion-name {
    font-size: 14px;
    font-weight: 600;
}

.nav-suggestion-url {
    color: #70819f;
    font-size: 12px;
}

.nav-grid-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.nav-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 102px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 52px rgba(15, 35, 84, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.nav-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 112, 243, 0.18);
    box-shadow: 0 30px 60px rgba(15, 35, 84, 0.12);
}

.nav-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.12), rgba(0, 179, 126, 0.18));
    color: var(--accent-blue);
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-card-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-card-name {
    color: #17315a;
    font-size: 18px;
    font-weight: 700;
}

.nav-card-url {
    color: #6f809d;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-all;
}

.nav-empty-state {
    padding: 36px 24px;
    text-align: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px dashed rgba(15, 35, 84, 0.14);
    color: #6d7e9a;
    font-size: 14px;
}

/* 动画定义 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 992px) {
    .footer-columns {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-brand {
        grid-column: span 3;
        margin-bottom: 20px;
    }
    .footer-brand p {
        max-width: 100%;
    }
    .nav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .nav-page-topbar,
    .nav-search-panel {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-search-box {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 40px;
    }
    .cards-container {
        flex-direction: column;
        align-items: center;
    }
    .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand {
        grid-column: span 1;
    }
    .navbar {
        padding: 20px;
    }
    .nav-link-pill {
        min-width: 88px;
        height: 40px;
        padding: 0 14px;
    }
    .nav-page-shell {
        padding: 18px 16px 64px;
    }
    .nav-page-topbar,
    .nav-search-panel {
        padding: 20px;
        border-radius: 22px;
    }
    .nav-page-topbar h1,
    .nav-search-copy h2 {
        font-size: 28px;
    }
    .nav-grid {
        grid-template-columns: 1fr;
    }
    .nav-card {
        min-height: 92px;
        padding: 18px;
        border-radius: 20px;
    }
    .nav-input-wrap {
        flex-direction: column;
    }
    .nav-input-wrap button {
        width: 100%;
    }
    .hidden-trigger {
        right: 16px;
        bottom: 16px;
        min-width: 100px;
        height: 48px;
        padding: 0 16px 0 12px;
    }
    .hidden-panel {
        right: 16px;
        bottom: 76px;
        width: calc(100vw - 32px);
        padding: 20px;
        border-radius: 20px;
    }
    .bookmark-grid {
        grid-template-columns: 1fr;
        max-height: 280px;
    }
}
