/**
 * 首页专用样式 — 龙城传奇风格
 */

/* ===== Hero 区 ===== */
.hero {
    margin: 20px 0;
    background: linear-gradient(135deg, #f0f5ff 0%, #eef5fb 50%, #f5f7ff 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    display: flex;
    overflow: hidden;
    box-shadow: var(--color-shadow);
}

.hero-main {
    flex: 1;
    padding: 28px 32px;
}

.hero-main .hero-tag {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-main h2 {
    font-size: 1.5rem;
    color: var(--color-text);
    line-height: 1.35;
    margin-bottom: 8px;
}

.hero-main p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    max-width: 500px;
}

.hero-main .hero-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 28px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.25);
}

.hero-main .hero-btn:hover {
    background: var(--color-primary-light);
}

.hero-side {
    width: 300px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid var(--color-border);
    padding: 20px;
}

.hero-side-title {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-side-item {
    padding: 7px 0;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.hero-side-item:last-child {
    border: none;
}

.hero-side-item .dot {
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    margin-right: 2px;
}

.hero-side-item a {
    font-size: 0.84rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.hero-side-item a:hover {
    color: var(--color-primary);
}

/* ===== 通用区块 ===== */
.section {
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    padding-left: 10px;
    border-left: 3px solid var(--color-primary);
}

.more-link {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.more-link:hover {
    color: var(--color-primary);
}

/* ===== 开服表格 ===== */
.server-table-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--color-shadow);
}

.server-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.82rem;
    transition: background 0.15s;
}

.server-row:last-child {
    border: none;
}

.server-row:hover {
    background: var(--color-bg);
}

.server-row.featured {
    background: linear-gradient(135deg, #f0f5ff, #eef5fb);
    border-bottom: 1px solid var(--color-border);
}

.server-row.featured:hover {
    background: linear-gradient(135deg, #e8f0ff, #e6f0fa);
}

.server-icon {
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.server-name {
    font-weight: 600;
    color: var(--color-text);
    width: 90px;
    flex-shrink: 0;
}

.server-version {
    color: var(--color-text-muted);
    width: 90px;
    flex-shrink: 0;
    font-size: 0.76rem;
}

.server-time {
    color: var(--color-text-muted);
    width: 80px;
    flex-shrink: 0;
    font-size: 0.76rem;
}

.server-badge {
    font-size: 0.68rem;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 700;
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.badge-hot {
    background: rgba(255, 129, 86, 0.12);
    color: #ff8156;
}

.badge-new {
    background: rgba(46, 204, 113, 0.12);
    color: #27ae60;
}

.server-desc {
    flex: 1;
    min-width: 0;
    font-size: 0.74rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-link {
    font-size: 0.78rem;
    color: var(--color-primary);
    font-weight: 600;
    flex-shrink: 0;
}

.server-link:hover {
    color: var(--color-primary-light);
}

/* ===== 两栏布局 ===== */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.column-left,
.column-right {
    display: flex;
    flex-direction: column;
}

/* ===== 文章列表 ===== */
.article-list {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 4px 20px;
    box-shadow: var(--color-shadow);
}

.article-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border-light);
    transition: padding-left 0.15s;
}

.article-item:last-child {
    border: none;
}

.article-item:hover {
    padding-left: 6px;
}

.article-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-text-muted);
}

.article-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-tag {
    font-size: 0.68rem;
    padding: 1px 8px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    width: fit-content;
    border-radius: 10px;
    font-weight: 600;
}

.article-body h3 {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-body h3 a {
    color: var(--color-text);
}

.article-body h3 a:hover {
    color: var(--color-primary);
}

.article-body p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.article-meta {
    font-size: 0.74rem;
    color: var(--color-text-muted);
    display: flex;
    gap: 12px;
}

/* ===== 资讯列表 ===== */
.news-list {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 4px 20px;
    box-shadow: var(--color-shadow);
}

.news-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.news-item:last-child {
    border: none;
}

.news-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-text-muted);
}

.news-body {
    flex: 1;
}

.news-tag {
    font-size: 0.66rem;
    padding: 1px 7px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    width: fit-content;
    border-radius: 10px;
    font-weight: 600;
    margin-bottom: 3px;
    display: inline-block;
}

.news-body h3 {
    font-size: 0.88rem;
    font-weight: 600;
}

.news-body h3 a {
    color: var(--color-text);
}

.news-body h3 a:hover {
    color: var(--color-primary);
}

.news-meta {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 3px;
}

/* ===== 分类卡片 ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 16px 18px;
    box-shadow: var(--color-shadow);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.85rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

.category-header i {
    color: var(--color-primary);
    margin-right: 6px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-list li {
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.82rem;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    color: var(--color-text-secondary);
    transition: color 0.2s;
}

.category-list li a:hover {
    color: var(--color-primary);
    padding-left: 4px;
}

/* ===== 响应式 ===== */
@media (max-width: 1000px) {
    .hero {
        flex-direction: column;
    }
    .hero-side {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--color-border);
    }
    .two-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .server-row {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 14px;
    }
    .server-row .server-icon {
        display: none;
    }
    .server-row .server-name {
        width: 100%;
    }
    .server-row .server-desc {
        width: 100%;
        white-space: normal;
    }
    .category-grid {
        grid-template-columns: 1fr;
    }
    .hero-main {
        padding: 20px;
    }
    .hero-main h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .server-row {
        padding: 12px;
    }
    .server-row .server-version,
    .server-row .server-time {
        width: auto;
        flex: 1;
    }
    .article-list,
    .news-list {
        padding: 0 12px;
    }
    .article-item {
        flex-direction: column;
        gap: 8px;
    }
    .article-icon {
        width: 100%;
        height: 60px;
    }
}