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

body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    overflow-x: hidden;
}

/* 导航栏样式 */
.header {
    background-color: #f8f8f8;
    width: 280px;
    min-height: 100vh;
    border-right: 1px solid #e0e0e0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

/* 导航栏头部 */
.nav-header {
    padding: 30px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.nav-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333333;
    letter-spacing: 1px;
}

/* 折叠按钮 */
.nav-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666666;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background-color: #e8e8e8;
    color: #000000;
}

/* 导航标签区域 */
.nav-tabs {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tab-btn {
    padding: 14px 24px;
    border: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    color: #666666;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: left;
    position: relative;
    margin-bottom: 8px;
    width: 100%;
}

.tab-btn:hover {
    color: #000000;
    background-color: #e8e8e8;
    border-color: #cccccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-btn.active {
    background-color: #ffffff;
    color: #000000;
    border-color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 导航栏底部信息 */
.nav-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.nav-footer p {
    font-size: 12px;
    color: #666666;
    margin: 0;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 40px;
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    background-color: #ffffff;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* 折叠状态 */
.header.collapsed {
    transform: translateX(-240px);
}

.header.collapsed .nav-tabs,
.header.collapsed .nav-footer {
    display: none;
}

.header.collapsed .nav-header {
    padding: 20px 10px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: 100vh;
    width: 40px;
    border-bottom: none;
    border-right: 1px solid #e0e0e0;
}

.header.collapsed .nav-header h1 {
    font-size: 16px;
    margin-bottom: 20px;
}

.header.collapsed .nav-toggle {
    transform: rotate(180deg);
}

.main-content.expanded {
    margin-left: 40px;
    width: calc(100% - 40px);
}

/* 折叠状态的悬停提示 */
.header.collapsed::after {
    content: 'NAV';
    position: absolute;
    bottom: 20px;
    left: 10px;
    font-size: 12px;
    color: #999;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* 站点区域 */
.site-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: inline-block;
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.site-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: #333333;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-card:hover {
    color: #000000;
    background-color: #f8f8f8;
    border-color: #cccccc;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.site-name {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    text-align: center;
    display: block;
    transition: color 0.3s ease;
}

.site-section.hidden {
    display: none;
}

/* 像素小恐龙动画 */
@keyframes dinoWalk {
    0% { transform: translateX(0) scaleX(1); }
    25% { transform: translateX(2px) scaleX(1); }
    50% { transform: translateX(4px) scaleX(-1); }
    75% { transform: translateX(2px) scaleX(-1); }
    100% { transform: translateX(0) scaleX(1); }
}

@keyframes dinoJump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pixelBlink {
    0%, 70% { opacity: 1; }
    71%, 100% { opacity: 0.3; }
}

/* 在卡片上添加可爱的像素装饰 */
.site-card::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background-color: #ff6b6b;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.site-card:hover::before {
    opacity: 1;
    animation: dinoJump 1.5s infinite ease-in-out;
}

/* 随机像素装饰 */
.pixel-random {
    position: fixed;
    width: 4px;
    height: 4px;
    background-color: #ffd93d;
    border-radius: 1px;
    pointer-events: none;
    z-index: 1000;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .header {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
    
    .header.collapsed {
        transform: translateX(-210px);
    }
    
    .main-content.expanded {
        margin-left: 40px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .header {
        width: 100%;
        min-height: auto;
        position: relative;
        height: auto;
        display: block;
    }
    
    .header.collapsed {
        transform: none;
        height: auto;
    }
    
    .header.collapsed .nav-tabs,
    .header.collapsed .nav-footer {
        display: block;
    }
    
    .header.collapsed .nav-header {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        height: auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .nav-header {
        padding: 20px;
    }
    
    .nav-header h1 {
        font-size: 20px;
    }
    
    .nav-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 15px;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
        text-align: center;
        flex: 1;
        min-width: 120px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    
    .main-content.expanded {
        margin-left: 0;
        width: 100%;
    }
    
    .nav-footer {
        display: none;
    }
    
    .site-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .site-card {
        padding: 20px;
        min-height: 70px;
    }
}

@media (max-width: 480px) {
    .nav-tabs {
        gap: 4px;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 100px;
    }
    
    .site-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .site-card {
        padding: 16px;
        min-height: 60px;
        font-size: 14px;
    }
}