/* 樱花漫画 - 梦幻樱花绽放的二次元动漫天堂样式 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Zhi+Mang+Xing&display=swap');

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    overflow-x: hidden;
    font-size: 16px;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 樱花卡片悬停效果 */
.card-hover {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card-hover:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* 樱花按钮特效 */
.btn-glow {
    position: relative;
    overflow: hidden;
}

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

.btn-glow:hover::before {
    left: 100%;
}

/* 樱花输入框样式 */
.input-glow {
    transition: all 0.5s ease;
}

.input-glow:focus {
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.5);
    border-color: #9333ea;
}

/* 樱花导航栏特效 */
.nav-blur {
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

/* 樱花页面过渡动画 */
.page-transition {
    animation: sakuraSlideIn 1.2s ease-out;
}

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

/* 樱花排行榜选项卡样式 */
.ranking-tab {
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.ranking-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.8s;
}

.ranking-tab:hover::before {
    left: 100%;
}

.ranking-tab.active {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(147, 51, 234, 0.6);
}

/* 樱花排行榜项目动画 */
.ranking-item {
    transition: all 0.5s ease;
    position: relative;
}

.ranking-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 24px;
}

.ranking-item:hover::before {
    opacity: 1;
}

/* 樱花计数器动画 */
.counter {
    display: inline-block;
}

/* 樱花返回顶部按钮 */
#back-to-top {
    transition: all 0.5s ease;
}

#back-to-top.show {
    transform: translateY(0);
    opacity: 1;
}

/* 樱花滚动条样式 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #9333ea, #ec4899);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7c3aed, #db2777);
}

/* 樱花响应式设计 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    .ranking-item {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    
    .ranking-item > * {
        margin-bottom: 1rem;
    }
}

/* 樱花加载动画 */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(147, 51, 234, 0.3);
    border-top: 6px solid #9333ea;
    border-radius: 50%;
    animation: sakuraSpin 1.5s linear infinite;
}

@keyframes sakuraSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 樱花文本渐变效果 */
.text-gradient {
    background: linear-gradient(135deg, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 樱花数据可视化效果 */
.data-bar {
    height: 8px;
    background: linear-gradient(90deg, #9333ea, #ec4899);
    border-radius: 4px;
    animation: sakuraDataFlow 3s ease-in-out infinite;
}

@keyframes sakuraDataFlow {
    0%, 100% {
        transform: scaleX(0.8);
    }
    50% {
        transform: scaleX(1);
    }
}

/* 樱花全屏加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 樱花触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .card-hover:hover {
        transform: none;
        box-shadow: none;
    }
    
    .ranking-item:hover::before {
        opacity: 0;
    }
    
    .btn-glow:hover::before {
        left: -100%;
    }
}

/* 樱花高对比度模式支持 */
@media (prefers-contrast: high) {
    .text-gradient {
        background: #000;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* 樱花减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .page-transition,
    .card-hover,
    .ranking-item,
    .ranking-tab {
        animation: none;
        transition: none;
    }
}

/* 樱花焦点可见性 */
.focus-visible:focus {
    outline: 3px solid #9333ea;
    outline-offset: 3px;
}

/* 樱花无障碍支持 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 樱花打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* 樱花自定义动画 */
@keyframes sakuraFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.float-animation {
    animation: sakuraFloat 4s ease-in-out infinite;
}

/* 樱花渐变边框效果 */
.gradient-border {
    position: relative;
    background: linear-gradient(45deg, #9333ea, #ec4899);
    padding: 3px;
    border-radius: 24px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: white;
    border-radius: 21px;
    z-index: -1;
}

/* 樱花脉冲效果 */
.pulse-effect {
    animation: sakuraPulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes sakuraPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* 樱花旋转效果 */
.rotate-effect {
    transition: transform 0.8s ease;
}

.rotate-effect:hover {
    transform: rotate(360deg);
}

/* 樱花缩放效果 */
.scale-effect {
    transition: transform 0.4s ease;
}

.scale-effect:hover {
    transform: scale(1.15);
}

/* 樱花阴影效果 */
.shadow-glow {
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.4);
}

.shadow-glow:hover {
    box-shadow: 0 0 50px rgba(147, 51, 234, 0.6);
}

/* 樱花粒子效果 */
.sakura-particle {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #ec4899, #f472b6);
    border-radius: 50% 0 50% 0;
    animation: sakuraParticleFall 6s linear infinite;
}

.sakura-particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.sakura-particle:nth-child(2) {
    left: 30%;
    animation-delay: 1s;
    animation-duration: 8s;
}

.sakura-particle:nth-child(3) {
    left: 60%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.sakura-particle:nth-child(4) {
    left: 80%;
    animation-delay: 3s;
    animation-duration: 9s;
}

@keyframes sakuraParticleFall {
    0% {
        top: -80px;
        transform: rotate(0deg);
        opacity: 1;
    }
    100% {
        top: 100vh;
        transform: rotate(360deg);
        opacity: 0;
    }
}

/* 樱花特殊边框效果 */
.border-b-4 {
    border-bottom-width: 4px;
}

.border-b-3 {
    border-bottom-width: 3px;
}

/* 樱花自定义渐变背景 */
.bg-sakura-gradient {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
}

/* 樱花星空背景效果 */
.sakura-starry-bg {
    background: radial-gradient(ellipse at bottom, #ec4899 0%, #f472b6 100%);
    position: relative;
}

.sakura-starry-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sakuraSparkle 20s linear infinite;
}

@keyframes sakuraSparkle {
    from { transform: translateX(0); }
    to { transform: translateX(200px); }
}

/* 樱花霓虹灯效果 */
.neon-text {
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px #9333ea,
        0 0 30px #9333ea,
        0 0 40px #9333ea;
}

/* 樱花波浪动画 */
@keyframes sakuraWave {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.wave-animation {
    animation: sakuraWave 3.5s ease-in-out infinite;
}

/* 樱花呼吸效果 */
@keyframes sakuraBreathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.breathe-animation {
    animation: sakuraBreathe 4s ease-in-out infinite;
}

/* 樱花彩虹边框 */
.rainbow-border {
    background: linear-gradient(45deg, #9333ea, #ec4899, #f472b6, #fbbf24, #34d399, #60a5fa, #a78bfa);
    background-size: 400% 400%;
    animation: sakuraRainbow 3s ease infinite;
    padding: 2px;
    border-radius: 24px;
}

@keyframes sakuraRainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 樱花磁性效果 */
.magnetic-effect {
    transition: all 0.3s ease;
}

.magnetic-effect:hover {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.2);
}

/* 樱花液体效果 */
.liquid-effect {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: sakuraMorph 8s ease-in-out infinite;
}

@keyframes sakuraMorph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* 樱花3D翻转效果 */
.flip-3d {
    perspective: 1000px;
}

.flip-3d-inner {
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-3d:hover .flip-3d-inner {
    transform: rotateY(180deg);
}

/* 樱花粒子效果背景 */
.particle-bg {
    position: relative;
    overflow: hidden;
}

.particle-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(147, 51, 234, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(236, 72, 153, 0.2) 0%, transparent 50%);
    animation: sakuraParticleMove 15s ease-in-out infinite;
}

@keyframes sakuraParticleMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-25px, 25px) rotate(240deg); }
}

/* 樱花玻璃态效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 樱花渐变文字动画 */
.gradient-text-animation {
    background: linear-gradient(-45deg, #9333ea, #ec4899, #f472b6, #a78bfa);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sakuraGradientShift 4s ease infinite;
}

@keyframes sakuraGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 樱花悬浮阴影效果 */
.floating-shadow {
    box-shadow: 
        0 10px 30px rgba(147, 51, 234, 0.3),
        0 20px 60px rgba(236, 72, 153, 0.2);
    transition: all 0.4s ease;
}

.floating-shadow:hover {
    box-shadow: 
        0 20px 40px rgba(147, 51, 234, 0.4),
        0 30px 80px rgba(236, 72, 153, 0.3);
    transform: translateY(-6px);
}

/* 樱花打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #9333ea;
    white-space: nowrap;
    animation: sakuraTyping 3s steps(40, end), sakuraBlinkCaret 0.8s step-end infinite;
}

@keyframes sakuraTyping {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes sakuraBlinkCaret {
    from, to { border-color: transparent; }
    50% { border-color: #9333ea; }
}

/* 樱花能量波效果 */
.energy-wave {
    position: relative;
    overflow: hidden;
}

.energy-wave::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.4), transparent);
    animation: sakuraEnergyWave 2s infinite;
}

@keyframes sakuraEnergyWave {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 樱花多层阴影效果 */
.multi-shadow {
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24),
        0 10px 20px rgba(147, 51, 234, 0.1),
        0 20px 40px rgba(236, 72, 153, 0.1);
}

/* 樱花弹性动画 */
.bounce-in {
    animation: sakuraBounceIn 1s ease-out;
}

@keyframes sakuraBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 樱花滑入效果 */
.slide-in-left {
    animation: sakuraSlideInLeft 1s ease-out;
}

@keyframes sakuraSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: sakuraSlideInRight 1s ease-out;
}

@keyframes sakuraSlideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 樱花淡入效果 */
.fade-in {
    animation: sakuraFadeIn 1.5s ease-out;
}

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

/* 樱花缩放淡入效果 */
.scale-fade-in {
    animation: sakuraScaleFadeIn 1s ease-out;
}

@keyframes sakuraScaleFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 樱花圆角样式 */
.rounded-3xl {
    border-radius: 1.5rem;
}

/* 樱花阴影样式 */
.shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* 樱花边框样式 */
.border-2 {
    border-width: 2px;
}

/* 樱花容器样式 */
.max-w-8xl {
    max-width: 1280px;
}

/* 樱花特殊动画效果 */
.sakura-special-effect {
    position: relative;
    overflow: hidden;
}

.sakura-special-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(147, 51, 234, 0.2), transparent);
    animation: sakuraRotate 5s linear infinite;
}

@keyframes sakuraRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 樱花文字效果 */
.sakura-text-effect {
    background: linear-gradient(45deg, #9333ea, #ec4899, #f472b6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sakuraTextShimmer 2.5s ease-in-out infinite;
}

@keyframes sakuraTextShimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* 樱花互动效果 */
.sakura-interactive {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sakura-interactive:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 20px 40px rgba(147, 51, 234, 0.25);
}

/* 樱花背景装饰 */
.sakura-decoration {
    position: relative;
}

.sakura-decoration::after {
    content: '🌸';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 20px;
    opacity: 0.2;
    animation: sakuraFloat 3.5s ease-in-out infinite;
}