@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* 核心色板 - Obsidian & Slate */
    --bg-deep: #020617;
    --bg-surface: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.5);
    
    /* 强调色 - 高饱和金融感 */
    --accent: #06b6d4;      /* Cyan */
    --accent-glow: rgba(6, 182, 212, 0.2);
    --success: #10b981;     /* Emerald */
    --danger: #f43f5e;      /* Rose */
    
    /* 文字 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* 边框与间距 */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(6, 182, 212, 0.4);
    --radius-lg: 24px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* 统一排版 */
h1, h2, h3 {
    letter-spacing: -0.03em;
    font-weight: 700;
}

/* 首页：Bento 布局 */
.bento-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto repeat(2, 1fr); /* 试图锁定高度 */
    gap: 20px;
    height: 100vh;
    overflow: hidden; /* 禁止主屏滚动 */
}

@media (max-width: 1024px) {
    .bento-container {
        height: auto;
        overflow-y: auto;
        grid-template-columns: repeat(4, 1fr);
    }
}

.hero-cell {
    grid-column: span 12;
    padding: 20px 0;
    text-align: left;
}

.hero-cell h1 {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 12px;
}

.hero-cell p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 700px;
}

/* Bento Card 基础样式 */
.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-glow);
}

.bento-card .icon-box {
    width: 48px;
    height: 48px;
    flex-shrink: 0; /* 防止被拉伸 */
    aspect-ratio: 1/1;
    background: rgba(6, 182, 212, 0.1); /* 淡淡的青色背景 */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 0; /* 移除 padding，改用 font-size 控制比例 */
}

.bento-card .icon-box i {
    font-size: 1.2rem;
    line-height: 1;
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.bento-card .tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* 具体格子定位 */
.card-large { grid-column: span 8; grid-row: span 2; }
.card-medium { grid-column: span 4; grid-row: span 2; }
.card-small { grid-column: span 4; }

/* 详情页布局：极简主义 */
.layout-wrapper {
    display: flex;
}

.sidebar {
    width: 300px;
    height: 100vh;
    background: var(--bg-deep);
    border-right: 1px solid var(--border);
    padding: 40px 24px;
    position: fixed;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.logo {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

.main-content {
    margin-left: 300px;
    flex: 1;
    padding: 60px 80px;
    max-width: 1200px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--accent);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%); /* 默认隐藏 */
        width: 80%;
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }

    .sidebar.open {
        transform: translateX(0); /* 展开 */
    }

    .main-content {
        margin-left: 0;
        padding: 80px 24px 40px 24px;
    }

    .hero-cell h1 {
        font-size: 2.5rem;
    }

    .card-large, .card-medium, .card-small {
        grid-column: span 12;
    }
    
    .bento-container {
        height: auto;
        overflow-y: auto;
        padding: 24px;
    }
}

/* 导航链接优化 */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 600;
}

.nav-parent {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 8px;
    padding: 0 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-parent::after {
    content: '\f0da'; /* Font Awesome angle-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: transform 0.3s;
}

.expanded > .nav-parent::after {
    transform: rotate(90deg);
}

/* 折叠逻辑 */
.nav-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding-left: 12px; /* 层级缩进 */
}

.expanded > .nav-children {
    max-height: 1000px; /* 展开后的高度 */
}

/* 模块列表按钮 */
.btn-enter {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-enter svg {
    transition: transform 0.3s;
}

.bento-card:hover .btn-enter svg {
    transform: translateX(4px);
}
