/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #0a0e17;
    color: #c8d6e5;
    line-height: 1.6;
    min-height: 100vh;
}
a {
    text-decoration: none;
    color: #4dabf7;
    transition: color 0.3s;
}
a:hover {
    color: #74c0fc;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #0f1923 0%, #1a2738 100%);
    border-bottom: 1px solid #2c3e50;
    padding: 15px 0;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    height: 40px;
}
.search-box {
    display: flex;
    align-items: center;
    background: #1e2a3a;
    border-radius: 30px;
    padding: 5px 15px;
    border: 1px solid #3a506b;
    transition: border-color 0.3s;
}
.search-box:focus-within {
    border-color: #4dabf7;
    box-shadow: 0 0 10px rgba(77, 171, 247, 0.3);
}
.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #c8d6e5;
    font-size: 14px;
    width: 220px;
    padding: 8px 0;
}
.search-input::placeholder {
    color: #5c7a99;
}
.search-btn {
    background: none;
    border: none;
    color: #4dabf7;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}
.search-btn:hover {
    color: #74c0fc;
}

/* 导航栏 */
.navbar {
    background: #111b27;
    border-bottom: 2px solid #2c3e50;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
.nav-list {
    display: flex;
    list-style: none;
    gap: 5px;
}
.nav-item {
    position: relative;
}
.nav-link {
    display: block;
    padding: 15px 20px;
    color: #8fa4b8;
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}
.nav-link:hover,
.nav-link.active {
    color: #4dabf7;
    border-bottom-color: #4dabf7;
    background: rgba(77, 171, 247, 0.05);
}

/* 主布局 */
.main {
    display: flex;
    gap: 30px;
    padding: 40px 0;
}
.content {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* 区块标题 */
.section {
    margin-bottom: 40px;
}
.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #e0e8f0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c3e50;
    position: relative;
}
.section-title span {
    position: relative;
    z-index: 1;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 60px;
    height: 2px;
    background: #4dabf7;
    box-shadow: 0 0 10px #4dabf7;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.article-card {
    display: flex;
    gap: 20px;
    background: #111b27;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #1e2a3a;
    transition: transform 0.3s, box-shadow 0.3s;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-color: #4dabf7;
}
.article-thumb {
    width: 200px;
    flex-shrink: 0;
    overflow: hidden;
}
.article-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.5s;
}
.article-card:hover .article-thumb img {
    transform: scale(1.05);
}
.article-info {
    padding: 15px 15px 15px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.article-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}
.article-info h3 a {
    color: #d0dce8;
}
.article-info h3 a:hover {
    color: #4dabf7;
}
.meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6b8299;
    margin-bottom: 8px;
}
.meta .click i {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236b8299"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>') no-repeat center;
    vertical-align: middle;
    margin-right: 3px;
}
.desc {
    font-size: 14px;
    color: #7a8fa3;
    line-height: 1.5;
}

/* 网格布局（热门攻略） */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.article-card.small .article-thumb {
    width: 100%;
    height: 120px;
}
.article-card.small .article-thumb img {
    height: 100%;
}
.article-card.small .article-info {
    padding: 10px;
}
.article-card.small h3 {
    font-size: 16px;
}

/* 侧边栏部件 */
.widget {
    background: #111b27;
    border: 1px solid #1e2a3a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}
.widget-title {
    font-size: 18px;
    color: #e0e8f0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2c3e50;
    position: relative;
}
.widget-title span {
    position: relative;
    z-index: 1;
}
.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40px;
    height: 2px;
    background: #4dabf7;
}

/* 热门点击列表 */
.hot-list {
    list-style: none;
}
.hot-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #1e2a3a;
    font-size: 14px;
}
.hot-list li:last-child {
    border-bottom: none;
}
.rank {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: #2c3e50;
    color: #8fa4b8;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 10px;
    font-weight: bold;
}
.hot-list li:nth-child(1) .rank,
.hot-list li:nth-child(2) .rank,
.hot-list li:nth-child(3) .rank {
    background: #4dabf7;
    color: #0a0e17;
}
.hot-list a {
    flex: 1;
    color: #b0c4d8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hot-list a:hover {
    color: #4dabf7;
}
.hot-count {
    margin-left: 10px;
    color: #5c7a99;
    font-size: 12px;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item {
    display: inline-block;
    padding: 4px 12px;
    background: #1e2a3a;
    border-radius: 20px;
    font-size: 13px;
    color: #8fa4b8;
    border: 1px solid #2c3e50;
    transition: all 0.3s;
}
.tag-item:hover {
    background: #4dabf7;
    color: #0a0e17;
    border-color: #4dabf7;
    box-shadow: 0 0 10px rgba(77, 171, 247, 0.4);
}

/* 页脚 */
.footer {
    background: #0d1520;
    border-top: 1px solid #2c3e50;
    padding: 25px 0;
    text-align: center;
    color: #5c7a99;
    font-size: 14px;
    margin-top: 40px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .article-card {
        flex-direction: column;
    }
    .article-thumb {
        width: 100%;
        height: 180px;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
    .nav-list {
        flex-wrap: wrap;
    }
}
