/*
 * Seel Theme - Additional Components
 * 新增组件样式
 */

/* ========== 公告栏 ========== */
.announcement-bar {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 8px 0;
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 32px;
}

.announcement-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.announcement-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.announcement-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 12px;
    flex-shrink: 0;
}

.announcement-close:hover {
    background: rgba(255,255,255,0.4);
    transform: rotate(90deg);
}

/* ========== 阅读进度条 ========== */
/* .reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    z-index: 9999;
    transition: width 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
} */

/* ========== 网站统计 Widget ========== */
.stats-widget {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.stats-grid-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-box:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-box:hover .stat-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.stat-icon-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.stat-icon-blue:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.stat-icon-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.stat-icon-green:hover {
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.5);
}

.stat-icon-purple {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.3);
}

.stat-icon-purple:hover {
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.5);
}

.stat-info {
    flex: 1;
}

.stat-info .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1.2;
    margin-bottom: 2px;
}

.stat-info .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.site-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.3s;
}

.stat-row:hover {
    background: var(--accent-primary);
    color: white;
}

.stat-row:hover .stat-value {
    color: white;
}

.stat-row .stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-row .stat-value {
    color: var(--accent-primary);
    font-size: 16px;
    font-weight: 700;
}

/* ========== 日归档 ========== */
.archive-list {
    list-style: none;
}

.archive-item {
    margin-bottom: 8px;
}

.archive-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.archive-item a:hover {
    background: var(--accent-primary);
    color: white;
}

.archive-date {
    font-size: 14px;
}

.archive-count {
    background: var(--border-color);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.archive-item a:hover .archive-count {
    background: rgba(255,255,255,0.3);
    color: white;
}

.archive-calendar select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.archive-calendar select:hover {
    border-color: var(--accent-primary);
}

/* ========== 友情链接分组 ========== */
.friend-link-group {
    margin-bottom: 16px;
}

.friend-link-group:last-child {
    margin-bottom: 0;
}

.friend-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid var(--accent-primary);
}



.donate-item img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.donate-item img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* ========== 广告 Widget ========== */
.ad-widget {
    overflow: hidden;
    border-radius: 12px;
}

.ad-widget img,
.ad-widget iframe {
    width: 100%;
    display: block;
}

/* ========== 文章内广告 ========== */
.content-ad {
    margin: 32px 0;
    text-align: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.content-ad img {
    max-width: 100%;
    border-radius: 8px;
}

/* ========== 社交分享增强 ========== */
.share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.share-btn-weibo {
    background: linear-gradient(135deg, #fa7d3c, #e61725);
    color: white;
    border-color: transparent;
}

.share-btn-weibo:hover {
    background: linear-gradient(135deg, #e61725, #c81017);
}

.share-btn-qq {
    background: linear-gradient(135deg, #12b7f5, #0099ff);
    color: white;
    border-color: transparent;
}

.share-btn-qq:hover {
    background: linear-gradient(135deg, #0099ff, #0080d6);
}

.share-btn-wechat {
    background: linear-gradient(135deg, #07c160, #06ae56);
    color: white;
    border-color: transparent;
}

.share-btn-wechat:hover {
    background: linear-gradient(135deg, #06ae56, #059548);
}

.share-btn-twitter {
    background: linear-gradient(135deg, #1da1f2, #0c85d0);
    color: white;
    border-color: transparent;
}

.share-btn-twitter:hover {
    background: linear-gradient(135deg, #0c85d0, #0a6baf);
}

.share-btn-link {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* ========== 文章目录悬浮样式 ========== */
.toc-fixed {
    position: fixed;
    top: 150px;
    left: 32px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 998;
    width: 220px;
}

.toc-fixed h4 {
    position: sticky;
    top: 0;
    background: var(--bg-glass);
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* ========== 返回顶部进度环 ========== */


/* ========== 响应式补充 ========== */
@media (max-width: 768px) {
    .stats-grid-full {
        grid-template-columns: repeat(2, 1fr);
    }
    .donate-qrcodes {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .donate-item img {
        width: 150px;
        height: 150px;
    }

    .toc-fixed {
        display: none;
    }

    .announcement-bar {
        display: none;
    }

    /* ===== 修正轮播图按钮和点位置 ===== */
    .hero-slider {
        position: relative !important;
    }

    .slider-prev {
        position: absolute !important;
        left: 12px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .slider-next {
        position: absolute !important;
        right: 12px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .slider-dots {
        position: absolute !important;
        bottom: 16px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10 !important;
    }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}


/* ========== 选中文本样式 ========== */
::selection {
    background: var(--accent-primary);
    color: white;
}



::-moz-selection {
    background: var(--accent-primary);
    color: white;
}

/* ========== 加载动画 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card,
.sidebar-widget,
.post-full {
    animation: fadeIn 0.6s ease-out;
}

/* ========== 最新评论 ========== */
.latest-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.latest-comment-item {
    display: block;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
}

.latest-comment-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--accent-primary);
}

.comment-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-text {
    font-size: 12px;
    color: var(--text-secondary);
    /* 保留你需要的行高，不需要就删掉这行 */
    line-height: 1.5;
}
.comment-date {
    font-size: 11px;
    color: var(--text-muted);
}

.no-comments {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== 404 错误页面 ========== */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 40px 20px;
}

.error-content {
    text-align: center;
    max-width: 480px;
    animation: errorFadeIn 0.6s ease-out;
}

@keyframes errorFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 插画 */
.error-illustration {
    margin-bottom: 24px;
}

.error-svg {
    width: 280px;
    height: 210px;
    color: var(--text-primary, #1a1a1a);
}

.error-svg .star {
    animation: starTwinkle 2s ease-in-out infinite;
}

.error-svg .star-2 { animation-delay: 0.3s; }
.error-svg .star-3 { animation-delay: 0.6s; }
.error-svg .star-4 { animation-delay: 0.9s; }
.error-svg .star-5 { animation-delay: 1.2s; }
.error-svg .star-6 { animation-delay: 1.5s; }

@keyframes starTwinkle {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.5; }
}

.error-svg .float-question {
    animation: floatQ 3s ease-in-out infinite;
}

.error-svg .float-question-2 {
    animation: floatQ 3s ease-in-out infinite 1.5s;
}

@keyframes floatQ {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* 404 数字 */
.error-code {
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent-primary, #93D051), var(--accent-secondary, #a8e06a));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -4px;
    user-select: none;
}

.error-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 12px;
}

.error-message {
    font-size: 14px;
    color: var(--text-muted, #999);
    line-height: 1.8;
    margin-bottom: 32px;
}

/* 按钮 */
.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.btn-home,
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.btn-home {
    background: linear-gradient(135deg, var(--accent-primary, #93D051), var(--accent-secondary, #a8e06a));
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(147, 208, 81, 0.3);
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 208, 81, 0.4);
}

.btn-home svg {
    width: 16px;
    height: 16px;
}

.btn-back {
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-secondary, #666);
    border: 1px solid var(--border-color, #e5e5e5);
}

.btn-back:hover {
    background: var(--border-color, #e5e5e5);
    transform: translateY(-2px);
}

.btn-back svg {
    width: 16px;
    height: 16px;
}

/* 搜索框 */
.error-search {
    max-width: 400px;
    margin: 0 auto;
}

.error-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-secondary, #f5f5f5);
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: 12px;
    padding: 4px 4px 4px 16px;
    transition: all 0.3s ease;
}

.error-search-form:focus-within {
    border-color: var(--accent-primary, #93D051);
    box-shadow: 0 0 0 3px rgba(147, 208, 81, 0.15);
}

.error-search-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-muted, #999);
}

.error-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 10px;
    font-size: 14px;
    color: var(--text-primary, #1a1a1a);
    outline: none;
}

.error-search-input::placeholder {
    color: var(--text-muted, #bbb);
}

.error-search-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent-primary, #93D051), var(--accent-secondary, #a8e06a));
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.error-search-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* 暗黑模式 */
[data-theme="dark"] .error-svg {
    color: var(--text-primary, #f5f5f5);
}

[data-theme="dark"] .btn-back {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary, #aaa);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .error-search-form {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .error-search-form:focus-within {
    border-color: var(--accent-primary, #a8e06a);
    box-shadow: 0 0 0 3px rgba(168, 224, 106, 0.15);
}

/* 移动端 */
@media (max-width: 640px) {
    .error-page {
        min-height: 60vh;
        padding: 40px 16px;
    }

    .error-svg {
        width: 220px;
        height: 165px;
    }

    .error-code {
        font-size: 80px;
        letter-spacing: -2px;
    }

    .error-title {
        font-size: 18px;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-home,
    .btn-back {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }

    .error-search {
        max-width: 100%;
    }
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted, #999);
    line-height: 1.6;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
}

.breadcrumb a {
    color: var(--text-secondary, #666);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 2px 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.breadcrumb a:hover {
    color: var(--accent-primary, #93D051);
}

.breadcrumb-sep {
    color: var(--text-muted, #ccc);
    margin: 0 8px;
    font-size: 11px;
    user-select: none;
    flex-shrink: 0;
}

.breadcrumb-current {
    color: var(--text-primary, #333);
    font-weight: 500;
    padding: 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

/* ========== 相关文章推荐 ========== */
.related-posts {
    margin: 32px 0;
    padding: 24px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 16px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.related-posts-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 16px;
}

.related-posts-title .section-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-primary, #93D051);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.related-post-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.related-post-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0,0,0,0.08));
    border-color: var(--accent-primary, #93D051);
}

.related-post-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.related-post-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-item:hover .related-post-title {
    color: var(--accent-primary, #93D051);
}

/* 响应式 */
@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .breadcrumb {
        font-size: 12px;
    }
}
