:root {
    --primary: #0078d4;
    --bg: #f5f7f9;
    --header-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: sans-serif; background: var(--bg); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* LOGO 特效：蓝色、倾斜、科技感 */
.logo { 
    font-size: 22px; font-weight: 900; color: var(--primary); 
    font-style: italic; letter-spacing: -1px; 
}

.top-nav { height: var(--header-h); background: #fff; display: flex; align-items: center; padding: 0 15px; box-shadow: 0 1px 5px rgba(0,0,0,0.05); z-index: 100; }
.search-wrapper { display: flex; background: #f1f3f6; border-radius: 8px; flex: 1; margin: 0 10px; max-width: 400px; height: 36px; }
.search-wrapper select, .search-wrapper input { border: none; background: transparent; outline: none; padding: 0 8px; font-size: 14px; }
.search-wrapper input { flex: 1; }
.search-wrapper button { background: var(--primary); color: #fff; border: none; padding: 0 15px; border-radius: 0 8px 8px 0; }

.container { display: flex; flex: 1; overflow: hidden; position: relative; }

/* 侧边栏：电脑端在左，手机端在底 */
.sidebar { width: 200px; background: #fff; border-right: 1px solid #eee; display: flex; flex-direction: column; padding: 10px; flex-shrink: 0; }
.nav-item { display: flex; align-items: center; padding: 12px; text-decoration: none; color: #555; border-radius: 8px; margin-bottom: 5px; transition: 0.3s; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item i { margin-right: 10px; font-style: normal; }

.main { flex: 1; padding: 20px; overflow-y: auto; scroll-behavior: smooth; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }

/* 卡片动画 */
.card { 
    background: #fff; border-radius: 12px; padding: 15px; text-decoration: none; text-align: center; border: 1px solid #eee;
    animation: fadeIn 0.5s ease backwards; transition: 0.3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--primary); }
.card .icon { font-size: 30px; display: block; margin-bottom: 8px; }
.card span { font-size: 14px; font-weight: bold; color: #333; }
.card p { font-size: 11px; color: #999; }

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

/* 手机端适配：核心逻辑 */
@media (max-width: 768px) {
    .sidebar { position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; flex-direction: row; border-right: none; border-top: 1px solid #eee; z-index: 1000; padding: 0; }
    .nav-item { flex: 1; flex-direction: column; justify-content: center; margin: 0; font-size: 10px; }
    .nav-item i { margin: 0 0 3px 0; }
    .main { padding-bottom: 80px; }
    .grid { grid-template-columns: repeat(2, 1fr); }
}
