/* ============================================
   洞察AI文章样式
   ============================================ */

/* 洞察AI列表页 */
body {
    background: #0e0e12;
}

.article-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 100px;
}

/* Hero 区域 */
.articles-hero {
    margin-top: var(--header-height);
    background: linear-gradient(135deg, #0e0e12 0%, #1a1a2e 40%, #16213e 100%);
    padding: 70px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.articles-hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,154,86,0.2) 0%, transparent 70%);
    filter: blur(60px);
    top: -60px;
    left: 10%;
    animation: aHeroOrb1 12s ease-in-out infinite;
}

.articles-hero::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,195,113,0.15) 0%, transparent 70%);
    filter: blur(50px);
    bottom: -50px;
    right: 5%;
    animation: aHeroOrb2 15s ease-in-out infinite;
}

@keyframes aHeroOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 20px) scale(1.1); }
}

@keyframes aHeroOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-25px, -20px) scale(1.12); }
}

.articles-hero-inner {
    position: relative;
    z-index: 1;
}

.articles-hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.articles-hero h1 i {
    margin-right: 12px;
    background: linear-gradient(135deg, #ffc371, #ff9a56);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.articles-hero h1 span {
    background: linear-gradient(135deg, #ffc371 0%, #ff9a56 50%, #ff6a3d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.articles-hero p {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
}

.articles-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.articles-hero-wave svg {
    width: 100%;
    height: 60px;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 24px;
}

.article-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
}

.article-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-submit-article {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a3d 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255,154,86,0.3);
    position: relative;
    z-index: 10;
}

.btn-submit-article:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,154,86,0.4);
}

.article-sort-btns {
    display: flex;
    gap: 10px;
}

.article-sort-btns button {
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    color: rgba(255,255,255,0.5);
}

.article-sort-btns button.active,
.article-sort-btns button:hover {
    background: linear-gradient(135deg, #ff9a56, #ff6a3d);
    color: white;
    border-color: transparent;
}

/* 文章卡片列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #16161c;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: none;
}

.article-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,154,86,0.25);
    box-shadow: 0 8px 30px rgba(255,154,86,0.1);
}

.article-card-cover {
    width: 200px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.article-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgba(255,255,255,0.03);
}

.article-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.9);
}

.article-card:hover .article-card-title {
    color: #ffc371;
}

.article-card-summary {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.article-card-meta .author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-card-meta .author img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.article-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 文章详情页 */
.article-detail-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    background: #0e0e12;
    min-height: 100vh;
}

.article-detail-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
    color: #fff;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.article-detail-meta .author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-detail-meta .author-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.article-detail-meta .author-name {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.article-detail-meta .author-bio {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.article-detail-meta .article-time {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.article-detail-cover {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 24px;
    max-height: 400px;
    object-fit: cover;
}

.article-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #fff;
}

.article-detail-content p {
    margin-bottom: 16px;
}

.article-detail-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.article-detail-content h2,
.article-detail-content h3 {
    margin: 24px 0 12px;
    font-weight: 600;
}

.article-detail-content blockquote {
    border-left: 4px solid #ffc371;
    padding: 12px 16px;
    background: #f0f0f0;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
    color: #333 !important;
}

.article-detail-content blockquote * {
    color: #333 !important;
}

/* 列表样式 */
.article-detail-content ul,
.article-detail-content ol {
    padding-left: 24px;
    margin: 12px 0;
}

.article-detail-content li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.article-detail-content ul li {
    list-style-type: disc;
}

.article-detail-content ol li {
    list-style-type: decimal;
}

/* 链接样式 */
.article-detail-content a {
    color: #ffc371;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.article-detail-content a:hover {
    border-bottom-color: #ffc371;
}

/* 代码样式 — 颜色由JS根据背景自动判断 */
.article-detail-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.article-detail-content pre {
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.article-detail-content pre code {
    background: none;
    padding: 0;
    font-size: 14px;
}

/* 表格样式 */
.article-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.article-detail-content th,
.article-detail-content td {
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 14px;
    text-align: left;
}

.article-detail-content th {
    background: rgba(255,255,255,0.04);
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.article-detail-content tr:hover {
    background: rgba(255,255,255,0.03);
}

/* 分割线 */
.article-detail-content hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 24px 0;
}

/* 图片说明 */
.article-detail-content figure {
    margin: 16px 0;
    text-align: center;
}

.article-detail-content figcaption {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
}

/* 强调样式 */
.article-detail-content strong,
.article-detail-content b {
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}

.article-detail-content em,
.article-detail-content i {
    font-style: italic;
}

.article-detail-content u {
    text-decoration: underline;
}

.article-detail-content del,
.article-detail-content s {
    text-decoration: line-through;
    color: rgba(255,255,255,0.35);
}

/* 上标下标 */
.article-detail-content sub {
    vertical-align: sub;
    font-size: smaller;
}

.article-detail-content sup {
    vertical-align: super;
    font-size: smaller;
}

.article-detail-actions {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.article-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}

.article-action-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,154,86,0.3);
}

.article-action-btn.active {
    color: #ffc371;
    border-color: #ffc371;
    background: rgba(255,154,86,0.08);
}

.article-action-btn i {
    font-size: 20px;
}

/* 空状态 */
.article-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.4);
}

.article-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    background: linear-gradient(135deg, #ffc371, #ff9a56);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-empty p {
    color: rgba(255,255,255,0.5);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255,215,0,0.12);
    background: rgba(255,215,0,0.03);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled):not(.active) {
    border-color: rgba(255,215,0,0.3);
    color: #ffd700;
    background: rgba(255,215,0,0.06);
}

.pagination button.active {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(255,215,0,0.2);
    pointer-events: none;
}

.pagination button:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination button.page-first,
.pagination button.page-last {
    background: rgba(255,215,0,0.06);
    border-color: rgba(255,215,0,0.2);
    color: #ffd700;
    font-size: 12px;
}

.pagination button.page-first:hover,
.pagination button.page-last:hover {
    background: rgba(255,215,0,0.12);
    border-color: rgba(255,215,0,0.4);
}

.pagination span {
    padding: 0 4px;
    color: rgba(255,215,0,0.25);
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .articles-hero {
        padding: 50px 16px 60px;
    }
    .articles-hero h1 {
        font-size: 28px;
    }
    .articles-hero p {
        font-size: 14px;
    }
    .articles-hero-wave svg {
        height: 40px;
    }
    .article-card {
        flex-direction: column;
    }
    .article-card-cover {
        width: 100%;
        height: 180px;
    }
    .article-detail-title {
        font-size: 22px;
    }
    .article-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .article-header-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ============================================
   投稿表单样式
   ============================================ */

/* 投稿弹窗优化 */
#submitArticleModal .modal-content {
    max-width: 850px;
}

#submitArticleModal .modal-body {
    padding: 24px 32px;
}

#submitArticleModal .form-group textarea {
    font-family: inherit;
    line-height: 1.6;
}

/* 封面上传区域 */
.cover-upload-area {
    border: 2px dashed #e3e5e7;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.cover-upload-area:hover {
    border-color: #00a1d6;
}

.cover-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.cover-upload-btn:hover {
    background: #f7f8fa;
}

.cover-upload-btn i {
    font-size: 40px;
    color: #ccc;
    margin-bottom: 12px;
}

.cover-upload-btn p {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

.cover-upload-btn span {
    font-size: 12px;
    color: #999;
}

.cover-preview {
    position: relative;
    width: 100%;
    max-height: 200px;
}

.cover-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.btn-remove-cover {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-remove-cover:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 投稿提示 */
.submit-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f7f8fa;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
}

.submit-tips i {
    color: #00a1d6;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 40px;
    background: #f7f8fa;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
    white-space: nowrap;
}

.btn-cancel:hover {
    background: #ebedf0;
    color: #333;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .btn-submit-article {
        padding: 6px 14px;
        font-size: 13px;
    }

    .cover-upload-btn {
        padding: 30px 15px;
    }

    .cover-upload-btn i {
        font-size: 32px;
    }

    .form-actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .form-actions button {
        width: auto;
    }
}
