/**
 * Animate 皮肤样式表
 * 基于 Bootstrap 5 和 Animate.css 的动画主题
 * 配色：白色主题 + 灰色、黑色点缀
 */

/* ============================================
   基础变量定义
   ============================================ */
:root {
    /* 主色调 - 深色用于强调 */
    --primary-color: #2c3e50;
    --primary-hover: #1a252f;
    --secondary-color: #6c757d;
    --success-color: #27ae60;
    --info-color: #3498db;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    /* 背景色 - 白色主题 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #2c3e50;
    
    /* 文字色 */
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #95a5a6;
    
    /* 边框色 */
    --border-color: #e9ecef;
    
    /* 动画变量 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Bootstrap Icons 内嵌（使用 CDN 备用）
   ============================================ */
.bi::before,
[class*=" bi-"]::before,
[class^="bi-"]::before {
    display: inline-block;
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -.125em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 基础图标样式 */
.bi-house-door::before { content: "\f421"; }
.bi-folder::before { content: "\f3d7"; }
.bi-calendar3::before { content: "\f1e4"; }
.bi-person::before { content: "\f4e1"; }
.bi-arrow-right::before { content: "\f138"; }
.bi-arrow-left::before { content: "\f12f"; }
.bi-chevron-left::before { content: "\f284"; }
.bi-chevron-right::before { content: "\f285"; }
.bi-info-circle::before { content: "\f3e9"; }
.bi-journal-text::before { content: "\f45d"; }
.bi-grid-3x3-gap::before { content: "\f42e"; }
.bi-link-45deg::before { content: "\f470"; }
.bi-file-text::before { content: "\f3e7"; }
.bi-inbox::before { content: "\f3eb"; }
.bi-folder-x::before { content: "\f3e5"; }
.bi-tags::before { content: "\f5c2"; }
.bi-eye::before { content: "\f341"; }
.bi-link::before { content: "\f471"; }

/* ============================================
   全局样式覆盖
   ============================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* 导航栏样式 */
.navbar {
    backdrop-filter: blur(10px);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition-fast);
    position: relative;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link.active::after {
    width: 80%;
}

/* ============================================
   Hero 区域样式
   ============================================ */
.hero-section {
    position: relative;
    overflow: hidden;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* ============================================
   文章卡片样式
   ============================================ */
.article-card {
    transition: var(--transition-normal);
    border-radius: 12px;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.article-card .card-title a {
    transition: var(--transition-fast);
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

.hover-success:hover {
    color: var(--success-color) !important;
}

.hover-info:hover {
    color: var(--info-color) !important;
}

.hover-warning:hover {
    color: var(--warning-color) !important;
}

/* 阅读更多按钮 */
.read-more-btn {
    transition: var(--transition-fast);
    border-radius: 20px;
}

.read-more-btn:hover {
    transform: translateX(5px);
}

/* 分类徽章动画 */
.animate-badge {
    transition: var(--transition-fast);
}

.animate-badge:hover {
    transform: scale(1.05);
}

/* ============================================
   文章详情页样式
   ============================================ */
.article-detail-card {
    border-radius: 16px;
    overflow: hidden;
}

.article-detail-card .card-header {
    border-bottom: none;
}

.article-detail-card .rounded-top-4 {
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

/* 文章内容样式 */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.2rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content pre {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.article-content code {
    background: var(--bg-secondary);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

/* 面包屑样式 */
.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* 相邻文章卡片 */
.adjacent-card {
    transition: var(--transition-normal);
    border-radius: 12px;
}

.adjacent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

.adjacent-card .border-bottom:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.last-border-0:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ============================================
   分页样式
   ============================================ */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: #ffffff;
}

.page-link-animated:hover {
    transform: scale(1.1);
    background: var(--bg-secondary);
}

.pagination .page-item.disabled .page-link {
    background: transparent;
    color: var(--text-muted);
}

/* ============================================
   页脚样式
   ============================================ */
.footer {
    margin-top: auto;
}

.animate-link {
    transition: var(--transition-fast);
    border-radius: 20px;
}

.animate-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.footer-brand {
    font-size: 1.2rem;
}

/* ============================================
   空状态样式
   ============================================ */
.empty-state {
    padding: 3rem;
}

/* ============================================
   响应式调整
   ============================================ */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 2rem !important;
    }
    
    .hero-section .display-5 {
        font-size: 1.75rem;
    }
    
    .article-detail-card .card-header {
        padding: 1.5rem !important;
    }
    
    .article-detail-card .display-6 {
        font-size: 1.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .pagination .page-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .adjacent-card .text-md-end {
        text-align: left !important;
    }
}

/* ============================================
   动画增强
   ============================================ */
/* 自定义动画延迟类 */
.animate__delay-0-5s {
    animation-delay: 0.5s;
}

.animate__delay-1-5s {
    animation-delay: 1.5s;
}

/* 动画时长调整 */
.animate__faster {
    animation-duration: 0.5s;
}

.animate__fast {
    animation-duration: 0.8s;
}

.animate__slow {
    animation-duration: 2s;
}

.animate__slower {
    animation-duration: 3s;
}

/* 滚动触发动画的初始状态 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   广告位样式
   ============================================ */
.ad-placeholder .hover-opacity {
    transition: background-color 0.2s ease;
}

.ad-placeholder .hover-opacity:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.border-white-25 {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ============================================
   工具类
   ============================================ */
.text-decoration-hover:hover {
    text-decoration: underline;
}

.cursor-pointer {
    cursor: pointer;
}

/* 阴影工具类 */
.shadow-hover:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* 圆角增强 */
.rounded-4 {
    border-radius: 1rem !important;
}

.rounded-top-4 {
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
}
