/*
 * 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;
    }

    /* ===== 主题切换按钮和返回顶部按钮对齐 ===== */
    .theme-switcher-fixed {
        bottom: 72px !important;
        right: 20px !important;
    }

    .theme-switch-btn-fixed {
        width: 44px !important;
        height: 44px !important;
    }

    .theme-switch-btn-fixed svg {
        width: 20px !important;
        height: 20px !important;
    }

    /* ===== 修正轮播图按钮和点位置 ===== */
    .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;
}

/* ========== 主题切换菜单 ========== */
.theme-switcher-fixed {
    position: fixed;
    bottom: 100px;
    right: 32px;
    z-index: 1000;
}

.theme-switch-btn-fixed {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.theme-switch-btn-fixed svg {
    width: 24px;
    height: 24px;
}

.theme-switch-btn-fixed:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.theme-dropdown-fixed {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 8px 0;
    display: none;
    animation: fadeInUp 0.3s ease;
}

.theme-dropdown-fixed.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-group-title {
    padding: 8px 16px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-primary);
}

.theme-option:hover {
    background: var(--bg-secondary);
}

.theme-option svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.theme-name {
    font-size: 14px;
    font-weight: 500;
}
}

::-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;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.comment-date {
    font-size: 11px;
    color: var(--text-muted);
}

.no-comments {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
}
