@charset "utf-8";

/* ========================================
   首页美化增强样式
   优化动画效果、色彩搭配和用户体验
   ======================================== */

/* 1. 平滑滚动和过渡效果 */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* 2. 优化轮播图效果 */
.banner {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.banner:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* 3. 卡片悬停效果 */
.p-div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    overflow: hidden;
}

.p-div:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

/* 4. 标题动画效果 */
.p-title {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.p-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #F13C4F, #ff6b7a);
    transition: width 0.3s ease;
}

.p-top:hover .p-title::after {
    width: 100%;
}

/* 5. 按钮优化 */
.p-more,
a[href*="更多"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 4px 12px;
}

.p-more::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(241, 60, 79, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.p-more:hover::before {
    width: 200%;
    height: 200%;
}

.p-more:hover {
    color: #F13C4F;
    font-weight: 600;
}

/* 6. 列表项悬停效果 */
.m-theme2 ul li {
    transition: all 0.2s ease;
    position: relative;
}

.m-theme2 ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(241, 60, 79, 0.05), transparent);
    transition: width 0.3s ease;
}

.m-theme2 ul li:hover::before {
    width: 100%;
}

.m-theme2 ul li:hover {
    padding-left: 8px;
    background-color: rgba(241, 60, 79, 0.02);
}

/* 7. 图片悬停效果 */
.rp_list img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

.rp_list a:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* 8. 标签切换动画 */
.new-bottomd ul li {
    position: relative;
    transition: all 0.3s ease;
}

.new-bottomd ul li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #F13C4F, #ff6b7a);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.new-bottomd ul li.on::after,
.new-bottomd ul li:hover::after {
    width: 80%;
}

.new-bottomd ul li:hover {
    color: #F13C4F;
}

/* 9. 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ptzs, .pthd, .zxgg, .pgyj, .rjkf {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.ptzs {
    animation-delay: 0.1s;
}

.pthd {
    animation-delay: 0.2s;
}

.zxgg {
    animation-delay: 0.3s;
}

/* 10. 平台活动按钮效果 */
.rp_list .rp_info span {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.rp_list .rp_info span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.rp_list .rp_info span:hover::before {
    left: 100%;
}

.rp_list .rp_info span:hover {
    background: #d32f42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241, 60, 79, 0.4);
}

/* 11. 响应式优化 */
@media screen and (max-width: 1200px) {
    .banner, .p-div {
        margin: 0 10px;
    }
}

/* 12. 新闻背景优化 */
.new_bg {
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.news1:hover .new_bg {
    opacity: 1;
}

/* 13. 图标动画 */
.p-icon {
    transition: transform 0.3s ease;
}

.p-top:hover .p-icon {
    transform: rotate(360deg);
}

/* 14. 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #F13C4F, #ff6b7a);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d32f42, #F13C4F);
}

/* 15. 焦点状态优化 */
a:focus, button:focus {
    outline: 2px solid rgba(241, 60, 79, 0.5);
    outline-offset: 2px;
}

/* 16. 性能优化 - GPU加速 */
.banner,
.p-div,
.rp_list img,
.m-theme2 ul li {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 17. 加载占位符 */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 18. 阴影层次优化 */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.shadow-md {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.shadow-lg {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 19. 渐变背景优化 */
.gradient-primary {
    background: linear-gradient(135deg, #F13C4F 0%, #ff6b7a 100%);
}

.gradient-hover {
    position: relative;
    z-index: 1;
}

.gradient-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #d32f42 0%, #F13C4F 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.gradient-hover:hover::before {
    opacity: 1;
}

/* 20. 文字渐显效果 */
@keyframes textFadeIn {
    from {
        opacity: 0;
        letter-spacing: 0.2em;
    }
    to {
        opacity: 1;
        letter-spacing: normal;
    }
}

.p-title {
    animation: textFadeIn 0.8s ease-out;
}
