/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
#head {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    overflow: hidden;
}

.logo {
    padding-left: 10px;
    height: 70px;
    color: #1a1a1a;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    background: none;
    text-indent: 0;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #165DFF;
}

.nav {
    height: 70px;
    overflow: hidden;
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav a {
    display: inline-block;
    padding: 10px 0;
    border-bottom: solid 2px transparent;
    font: 16px/50px "微软雅黑", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav a:hover, .nav a.selected {
    background: transparent;
    border-bottom: solid 5px #165DFF !important;
    color: #165DFF;
}

/* 移动端菜单按钮 */
.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #1a1a1a;
    cursor: pointer;
    padding: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
        flex-direction: column;
        gap: 0;
        height: auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav a {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-bottom: none;
        border-left: 4px solid transparent;
    }
    
    .nav a:hover, .nav a.selected {
        border-bottom: none !important;
        border-left: 4px solid #165DFF;
        background: rgba(22, 93, 255, 0.05);
    }
    
    .menu-btn {
        display: block;
    }
}

/* 主容器样式 */
.box {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.yin-h {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 分类标题样式 */
yt {
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    cursor: pointer;
    user-select: none;
}

/* 可折叠分类容器 */
.category-container {
    margin-bottom: 24px;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.category-header {
    padding: 18px 24px;
    background-color: #ffffff;
    border-bottom: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.category-header:hover {
    background-color: #fefefe;
}

.category-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #222222;
}

.category-toggle {
    font-size: 14px;
    color: #666666;
    transition: transform 0.3s ease, color 0.3s ease;
}

.category-toggle.active {
    transform: rotate(180deg);
    color: #3b7c00;
}

.category-content {
    padding: 24px;
    display: block;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.category-content.collapsed {
    display: none;
    padding: 0;
}

/* 导航链接样式 */
.yin-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.yin-nav a {
    display: block;
    padding: 20px 24px;
    background-color: #f0f4f8;
    border: none;
    border-radius: 16px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.yin-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #165DFF, #4080FF);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yin-nav a:hover {
    background-color: #ffffff;
    border: none;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(22, 93, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
    color: #165DFF;
}

.yin-nav a:hover::before {
    opacity: 1;
}

.yin-nav a:active {
    transform: translateY(0);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(22, 93, 255, 0.08),
        inset 0 1px 0 rgba(0, 0, 0, 0.05);
}

.yin-nav a b {
    color: #0d0d0d;
    font-weight: 700;
    font-size: 17px;
}

/* 卡片选中效果 */
.yin-nav a:focus {
    outline: none;
    background-color: #ffffff;
    border: none;
    box-shadow: 
        0 0 0 4px rgba(22, 93, 255, 0.15),
        0 12px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: #165DFF;
}

.yin-nav a:focus::before {
    opacity: 1;
}

/* 页脚样式 */
#footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    margin-top: 40px;
}

.footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    font-size: 14px;
}

.footer a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wrap {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav a {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .box {
        padding: 0 10px;
    }
    
    .yin-h {
        padding: 15px;
    }
    
    .yin-nav {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .yin-nav a {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .category-header {
        padding: 12px 15px;
    }
    
    .category-header h3 {
        font-size: 15px;
    }
    
    .category-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }
    
    .nav a {
        font-size: 13px;
        padding: 5px 8px;
    }
    
    .yin-h {
        padding: 10px;
    }
    
    yt {
        font-size: 16px;
    }
    
    .yin-nav a {
        font-size: 12px;
        padding: 8px 12px;
    }
}