/**
 * 巨浪帮助网 - 首页增强样式
 * 现代化视觉优化：Hero横幅、卡片美化、动画、侧边栏、回到顶部
 */

/* ===== 品牌色与增强变量 ===== */
:root {
    --brand-primary: #2563EB;
    --brand-primary-light: #3B82F6;
    --brand-primary-dark: #1D4ED8;
    --brand-accent: #F59E0B;
    --brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --brand-gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --brand-gradient-ocean: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --card-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --card-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] {
    --card-shadow: 0 2px 12px rgba(0,0,0,0.2);
    --card-shadow-hover: 0 8px 30px rgba(0,0,0,0.35);
}

/* ===== Hero 横幅 ===== */
.hero-banner {
    background: var(--brand-gradient);
    border-radius: 16px;
    padding: 48px 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 10px 40px rgba(102,126,234,0.3);
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: hero-float 8s ease-in-out infinite;
}
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    animation: hero-float 10s ease-in-out infinite reverse;
}
@keyframes hero-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hero-desc {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 24px;
    line-height: 1.7;
    max-width: 560px;
}
.hero-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 20px;
    min-width: 80px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: var(--transition-smooth);
}
.hero-stat:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.hero-stat-num {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}
.hero-stat-label {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

/* ===== 文章卡片美化 ===== */
.shadow-theme {
    box-shadow: var(--card-shadow) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition-smooth) !important;
    overflow: hidden;
}
.shadow-theme:hover {
    box-shadow: var(--card-shadow-hover) !important;
    transform: translateY(-3px);
}
[data-theme="dark"] .shadow-theme {
    border-color: rgba(255,255,255,0.06);
}

/* 卡片标题增强 */
.loglist-title {
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    color: var(--aColor) !important;
    transition: var(--transition-smooth);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.loglist-title:hover {
    color: var(--brand-primary) !important;
}

/* 卡片内容区域 */
.loglist-body {
    padding: 20px 24px 16px !important;
}
.loglist-content {
    color: var(--lightColor);
    font-size: 14px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

/* 文章分类标签美化 */
.loglist-sort {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}
.loglist-sort a {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    background: linear-gradient(135deg, #e0e7ff, #dbeafe);
    color: var(--brand-primary) !important;
    border: 1px solid rgba(37,99,235,0.15);
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
}
[data-theme="dark"] .loglist-sort a {
    background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(37,99,235,0.1));
    border-color: rgba(37,99,235,0.3);
}
.loglist-sort a:hover {
    background: var(--brand-primary);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37,99,235,0.3);
}

/* 文章元信息行 */
.info-row {
    padding: 12px 24px 16px !important;
    border-top: 1px solid var(--dividerColor);
    background: rgba(0,0,0,0.01);
}
[data-theme="dark"] .info-row {
    background: rgba(255,255,255,0.02);
}
.log-info {
    font-size: 13px;
    color: var(--lightColor);
}
.log-info a {
    color: var(--brand-primary) !important;
    font-weight: 600;
}
.log-count a {
    font-size: 13px;
    color: var(--lightColor) !important;
    transition: var(--transition-smooth);
}
.log-count a:hover {
    color: var(--brand-primary) !important;
}
.log-count .iconfont {
    margin-right: 3px;
    font-size: 14px;
}

/* 文章标签 */
.tags {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    background: rgba(37,99,235,0.06);
    color: var(--brand-primary) !important;
    border-radius: 4px;
    margin: 2px 3px 2px 0;
    transition: var(--transition-smooth);
}
.tags:hover {
    background: var(--brand-primary);
    color: #fff !important;
}

/* 置顶标志 */
.log-topflg {
    display: inline-block;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff !important;
    border-radius: 4px;
    margin-right: 6px;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(245,158,11,0.3);
}

/* 卡片入场动画 */
.log-animate {
    opacity: 0;
    transform: translateY(24px);
    animation: logFadeIn 0.5s ease forwards;
}
@keyframes logFadeIn {
    to { opacity: 1; transform: translateY(0); }
}
.log-animate:nth-child(1) { animation-delay: 0.05s; }
.log-animate:nth-child(2) { animation-delay: 0.1s; }
.log-animate:nth-child(3) { animation-delay: 0.15s; }
.log-animate:nth-child(4) { animation-delay: 0.2s; }
.log-animate:nth-child(5) { animation-delay: 0.25s; }
.log-animate:nth-child(6) { animation-delay: 0.3s; }
.log-animate:nth-child(7) { animation-delay: 0.35s; }
.log-animate:nth-child(8) { animation-delay: 0.4s; }
.log-animate:nth-child(9) { animation-delay: 0.45s; }
.log-animate:nth-child(10) { animation-delay: 0.5s; }

/* ===== 导航栏增强 ===== */
.blog-header {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04) !important;
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 100;
}
.nav-link {
    font-weight: 500;
    position: relative;
    transition: var(--transition-smooth);
}
@media (min-width: 768px) {
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 8px;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--brand-primary);
        border-radius: 1px;
        transition: var(--transition-smooth);
        transform: translateX(-50%);
    }
    .nav-link:hover::after {
        width: 60%;
    }
    .nav-link:hover {
        color: var(--brand-primary) !important;
    }
}

/* 下拉菜单美化 */
.dropdown-menus {
    border-radius: 10px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    overflow: hidden;
    min-width: 140px;
}
.dropdown-menus .list-menu {
    transition: var(--transition-smooth);
}
.dropdown-menus .list-menu:hover {
    background: rgba(37,99,235,0.05);
}

/* ===== 侧边栏美化 ===== */
.side-bar .widget {
    border-radius: 12px !important;
    box-shadow: var(--card-shadow) !important;
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.side-bar .widget:hover {
    box-shadow: var(--card-shadow-hover) !important;
    transform: translateY(-2px);
}
.widget-title {
    padding: 0 !important;
}
.widget-title h3 {
    font-size: 15px !important;
    font-weight: 700;
    padding: 16px 20px 12px;
    margin: 0 !important;
    position: relative;
    color: var(--aColor);
    border-bottom: 1px solid var(--dividerColor);
}
.widget-title h3::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40px;
    height: 2px;
    background: var(--brand-primary);
    border-radius: 1px;
}
.widget .unstyle-li {
    padding: 8px 20px 16px !important;
}
.widget .unstyle-li li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}
.widget .unstyle-li li:last-child {
    border-bottom: none;
}
.widget .unstyle-li li:hover {
    padding-left: 4px;
}
.widget .unstyle-li li a {
    font-size: 14px;
    line-height: 1.6;
    display: block;
    transition: var(--transition-smooth);
}
.widget .unstyle-li li a:hover {
    color: var(--brand-primary);
}

/* 搜索框美化 */
.widget .search {
    border-radius: 10px !important;
    border: 2px solid var(--dividerColor) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    transition: var(--transition-smooth);
    margin-bottom: 10px;
}
.widget .search:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
}
.widget input[type="submit"] {
    background: var(--brand-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
}
.widget input[type="submit"]:hover {
    background: var(--brand-primary-dark) !important;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* 热门文章序号 */
.blog-lates {
    counter-increment: hot-counter;
}

/* ===== 分页美化 ===== */
.pagination {
    text-align: center;
    padding: 16px 0;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 3px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid var(--dividerColor);
    color: var(--aColor);
}
.pagination a:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.pagination .current {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* ===== 回到顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
    z-index: 999;
    font-size: 20px;
    line-height: 1;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(37,99,235,0.45);
}

/* ===== 页脚美化 ===== */
.blog-footer {
    border-top: 1px solid var(--dividerColor);
    padding: 28px 0 !important;
    margin-top: 40px !important;
}
.blog-footer .footinfo {
    text-align: center;
    font-size: 13px;
    color: var(--lightColor);
    line-height: 2;
}
.blog-footer a {
    color: var(--lightColor);
    transition: var(--transition-smooth);
}
.blog-footer a:hover {
    color: var(--brand-primary);
}

/* ===== 封面图美化 ===== */
.loglist-cover {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}
.loglist-cover img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    object-fit: cover;
    max-height: 240px;
}
.shadow-theme:hover .loglist-cover img {
    transform: scale(1.05);
}

/* ===== 响应式优化 ===== */
@media (max-width: 767px) {
    .hero-banner {
        padding: 32px 24px;
        border-radius: 12px;
        margin-bottom: 16px;
    }
    .hero-title {
        font-size: 24px;
    }
    .hero-desc {
        font-size: 14px;
    }
    .hero-stats {
        gap: 12px;
    }
    .hero-stat {
        padding: 8px 14px;
        min-width: 68px;
    }
    .hero-stat-num {
        font-size: 20px;
    }
    .loglist-body {
        padding: 16px 18px 12px !important;
    }
    .loglist-title {
        font-size: 17px !important;
    }
    .info-row {
        padding: 10px 18px 14px !important;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .shadow-theme:hover {
        transform: none;
    }
    .side-bar .widget:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        padding: 24px 18px;
    }
    .hero-title {
        font-size: 20px;
    }
    .hero-stat {
        min-width: 60px;
        padding: 6px 10px;
    }
}
