@charset "utf-8";

/* ==========================================================================
   Modern Help Center Styles
   ========================================================================== */

:root {
    --primary-color: #0052d9;
    --primary-hover: #003cab;
    --text-main: #1d2129;
    --text-regular: #4e5969;
    --text-light: #86909c;
    --bg-body: #f7f9fc;
    --white: #ffffff;
    --border-color: #f0f2f5;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 24px rgba(0, 82, 217, 0.08);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.page-hero {
    position: relative;
    background: #fff;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 82, 217, 0.05) 0%, rgba(0, 82, 217, 0.01) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-regular);
    margin-bottom: 40px;
}

/* Search Box (Hero) */
.hero-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.hero-search input {
    width: 100%;
    height: 56px;
    padding: 0 60px 0 24px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 16px;
    background: #fff;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.hero-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 82, 217, 0.1);
    outline: none;
}

.hero-search button {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-search button:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* Main Layout */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: flex;
    gap: 40px;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.sidebar-area {
    width: 360px;
    flex-shrink: 0;
}

/* Help Category Card */
.help-category-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.help-category-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.cat-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.cat-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
    margin-right: 12px;
}

.cat-more {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.cat-more:hover {
    color: var(--primary-color);
}

.cat-more i {
    margin-left: 6px;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.article-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    background: transparent;
    min-width: 0; /* Prevents grid item overflow */
}

.article-item:hover {
    background: #f2f7ff;
}

.article-icon {
    width: 48px;
    height: 48px;
    background: #f2f3f5;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    margin-right: 16px;
    flex-shrink: 0;
    transition: var(--transition);
    overflow: hidden;
}

.article-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-item:hover .article-icon {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.article-info {
    flex: 1;
    min-width: 0;
    overflow: hidden; /* Ensure text truncation works */
}

.article-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
    display: block;
    width: 100%;
}

.article-item:hover .article-title {
    color: var(--primary-color);
}

.article-desc {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

/* Category Page - Article List (Vertical) */
.category-article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-article-item {
    display: flex;
    align-items: center;
    padding: 24px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
}

.category-article-item:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.cat-article-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f2f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 24px;
}

.cat-article-content {
    flex: 1;
    min-width: 0;
}

.cat-article-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.cat-article-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 500;
    margin-right: 10px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.cat-article-desc {
    font-size: 14px;
    color: var(--text-regular);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-article-meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    gap: 16px;
}

.cat-article-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    margin-left: 20px;
    flex-shrink: 0;
    transition: var(--transition);
    opacity: 0.9;
}

.category-article-item:hover .cat-article-arrow {
    transform: translateX(4px);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 82, 217, 0.3);
}


/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 0;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #e5e6eb;
}

/* Sidebar Widgets */
.widget {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f3f5;
}

.widget-title i, .widget-title .icon-bar {
    color: var(--primary-color);
    margin-right: 10px;
}
.widget-title .icon-bar {
    width: 4px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 2px;
    display: inline-block;
    margin-right: 12px;
}

/* Sidebar Search */
.sidebar-search {
    position: relative;
}
.sidebar-search input {
    width: 100%;
    height: 48px;
    padding: 0 48px 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: #f7f9fc;
    transition: var(--transition);
}
.sidebar-search input:focus {
    background: #fff;
    border-color: var(--primary-color);
    outline: none;
}
.sidebar-search button {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-search button:hover {
    background: var(--primary-hover);
}

/* Sidebar Tags */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.tag-item {
    display: inline-block;
    padding: 4px 12px;
    background: #f2f3f5;
    color: var(--text-regular);
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--transition);
}
.tag-item:hover {
    background: rgba(0, 82, 217, 0.1);
    color: var(--primary-color);
}

/* Sidebar Categories */
.sidebar-cat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-regular);
    text-decoration: none;
    transition: var(--transition);
}
.sidebar-cat-item:hover, .sidebar-cat-item.active {
    background: rgba(0, 82, 217, 0.05);
    color: var(--primary-color);
}
.sidebar-cat-item .cat-name {
    display: flex;
    align-items: center;
    font-weight: 500;
}
.sidebar-cat-item .dot {
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    margin-right: 12px;
    transition: var(--transition);
}
.sidebar-cat-item:hover .dot, .sidebar-cat-item.active .dot {
    background: var(--primary-color);
}

/* Hot Articles (Sidebar) */
.hot-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f2f3f5;
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-index {
    width: 24px;
    height: 24px;
    background: #f2f3f5;
    color: #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.hot-item:nth-child(1) .hot-index { background: linear-gradient(135deg, #ff4d4f, #ff7875); color: #fff; }
.hot-item:nth-child(2) .hot-index { background: linear-gradient(135deg, #ff7a45, #ff9c6e); color: #fff; }
.hot-item:nth-child(3) .hot-index { background: linear-gradient(135deg, #ffa940, #ffc069); color: #fff; }
.hot-item:nth-child(4) .hot-index { background: linear-gradient(135deg, #ffc53d, #ffd666); color: #fff; }
.hot-item:nth-child(5) .hot-index { background: linear-gradient(135deg, #a0d911, #b3e680); color: #fff; }
.hot-item:nth-child(6) .hot-index { background: linear-gradient(135deg, #52c41a, #73d13d); color: #fff; }
.hot-item:nth-child(7) .hot-index { background: linear-gradient(135deg, #13c2c2, #36cfc9); color: #fff; }
.hot-item:nth-child(8) .hot-index { background: linear-gradient(135deg, #1890ff, #40a9ff); color: #fff; }

.hot-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hot-title-link {
    font-size: 14px;
    font-weight: 500;
    color: #2f3b4a;
    margin-bottom: 6px;
    line-height: 1.5;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-title-link:hover {
    color: var(--primary-color);
}

.hot-meta {
    font-size: 13px;
    color: #9aa3af;
    display: flex;
    align-items: center;
}

.hot-meta i {
    margin-right: 4px;
    font-size: 14px;
}

/* Contact Widget */
.contact-widget {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark, #003cab) 100%);
    color: #fff;
    text-align: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}
.contact-decoration-1, .contact-decoration-2 {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.contact-decoration-1 { width: 100px; height: 100px; top: -30px; right: -30px; }
.contact-decoration-2 { width: 60px; height: 60px; bottom: -20px; left: -20px; }

.contact-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    margin-top: 16px;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    z-index: 10;
}

.contact-btn:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar-area {
        width: 100%;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
    /* Responsive Prev/Next */
    .article-nav {
        flex-direction: column;
    }
    .nav-item {
        width: 100%;
    }
}

/* ==========================================================================
   Article Details Page Specific Styles
   ========================================================================== */

.article-container {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.article-breadcrumb {
    padding: 16px 24px;
    background: #f9fafb;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-regular);
}
.article-breadcrumb a {
    color: var(--text-regular);
    text-decoration: none;
}
.article-breadcrumb a:hover {
    color: var(--primary-color);
}
.article-breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.article-body {
    padding: 40px;
}

/* Content Typography */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}
.article-content p { margin-bottom: 24px; }
.article-content h1, .article-content h2, .article-content h3 {
    color: var(--text-main);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
}
.article-content h2 {
    font-size: 24px;
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}
.article-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 24px;
}
.article-content code {
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 4px;
    color: #c7254e;
}

/* Article Footer */
.article-footer {
    padding: 24px 40px;
    background: #f9fafb;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.share-buttons {
    display: flex;
    gap: 12px;
}
.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-regular);
    text-decoration: none;
    transition: var(--transition);
}
.share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}
.share-btn[data-type="wechat"]:hover { background: #07c160; border-color: #07c160; }
.share-btn[data-type="qq"]:hover { background: #12b7f5; border-color: #12b7f5; }
.share-btn[data-type="weibo"]:hover { background: #fa7d3c; border-color: #fa7d3c; }

/* Prev/Next Nav */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}
.nav-item {
    flex: 1;
    min-width: 0;
    width: 50%;
    display: flex;
    align-items: center;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition);
}
.nav-item:hover:not(.disabled) {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}
.nav-item.disabled {
    background: #f9fafb;
    border-color: #f0f2f5;
    cursor: default;
}

.nav-thumb {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f2f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a7b3;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
}

.nav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-thumb i {
    font-size: 24px;
}

.nav-content {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.nav-label {
    font-size: 13px;
    color: #bfc5cc;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #2e2e2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    display: block;
    width: 100%;
}

.nav-item.disabled .nav-title {
    color: #8a93a0;
    font-weight: 400;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination li {
    display: inline-block;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-regular);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.pagination a:hover, .pagination .active span {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .disabled span {
    background: #f7f9fc;
    color: #ccc;
    cursor: not-allowed;
}
