/* 歪歪漫画 - 奇趣搞笑漫画的欢乐海洋样式 */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Zhi+Mang+Xing&display=swap');

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

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

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

/* 搞笑气泡动画 */
.funny-bubble {
    position: absolute;
    font-size: 2rem;
    animation: bubbleFloat 8s ease-in-out infinite;
    opacity: 0.6;
}

.funny-bubble:nth-child(1) {
    left: 15%;
    top: 20%;
    animation-delay: 0s;
}

.funny-bubble:nth-child(2) {
    left: 75%;
    top: 30%;
    animation-delay: 2s;
}

.funny-bubble:nth-child(3) {
    left: 25%;
    top: 70%;
    animation-delay: 4s;
}

.funny-bubble:nth-child(4) {
    left: 85%;
    top: 60%;
    animation-delay: 6s;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-30px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translateY(-15px) rotate(180deg) scale(0.9);
    }
    75% {
        transform: translateY(-45px) rotate(270deg) scale(1.2);
    }
}

/* 卡片悬停效果 */
.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(14, 165, 233, 0.5);
    border-color: #0ea5e9;
}

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

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

@keyframes waiwaiSlideIn {
    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(14, 165, 233, 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(14, 165, 233, 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, #0ea5e9, #0284c7);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0284c7, #0369a1);
}

/* 响应式设计 */
@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(14, 165, 233, 0.3);
    border-top: 6px solid #0ea5e9;
    border-radius: 50%;
    animation: waiwaiSpin 1.5s linear infinite;
}

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

/* 文本渐变效果 */
.text-gradient {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 数据可视化效果 */
.data-bar {
    height: 8px;
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
    border-radius: 4px;
    animation: waiwaiDataFlow 3s ease-in-out infinite;
}

@keyframes waiwaiDataFlow {
    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 #0ea5e9;
    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 waiwaiFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

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

/* 渐变边框效果 */
.gradient-border {
    position: relative;
    background: linear-gradient(45deg, #0ea5e9, #0284c7);
    padding: 3px;
    border-radius: 24px;
}

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

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

@keyframes waiwaiPulse {
    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(14, 165, 233, 0.4);
}

.shadow-glow:hover {
    box-shadow: 0 0 50px rgba(14, 165, 233, 0.6);
}

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

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

/* 自定义渐变背景 */
.bg-waiwai-gradient {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

/* 星空背景效果 */
.waiwai-starry-bg {
    background: radial-gradient(ellipse at bottom, #0ea5e9 0%, #0284c7 100%);
    position: relative;
}

.waiwai-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: waiwaiSparkle 20s linear infinite;
}

@keyframes waiwaiSparkle {
    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 #0ea5e9,
        0 0 30px #0ea5e9,
        0 0 40px #0ea5e9;
}

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

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

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

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

/* 彩虹边框 */
.rainbow-border {
    background: linear-gradient(45deg, #0ea5e9, #0284c7, #0369a1, #fbbf24, #34d399, #60a5fa, #a78bfa);
    background-size: 400% 400%;
    animation: waiwaiRainbow 3s ease infinite;
    padding: 2px;
    border-radius: 24px;
}

@keyframes waiwaiRainbow {
    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: waiwaiMorph 8s ease-in-out infinite;
}

@keyframes waiwaiMorph {
    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(14, 165, 233, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(2, 132, 199, 0.2) 0%, transparent 50%);
    animation: waiwaiParticleMove 15s ease-in-out infinite;
}

@keyframes waiwaiParticleMove {
    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, #0ea5e9, #0284c7, #0369a1, #fbbf24);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: waiwaiGradientShift 4s ease infinite;
}

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

/* 悬浮阴影效果 */
.floating-shadow {
    box-shadow: 
        0 10px 30px rgba(14, 165, 233, 0.3),
        0 20px 60px rgba(2, 132, 199, 0.2);
    transition: all 0.4s ease;
}

.floating-shadow:hover {
    box-shadow: 
        0 20px 40px rgba(14, 165, 233, 0.4),
        0 30px 80px rgba(2, 132, 199, 0.3);
    transform: translateY(-6px);
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #0ea5e9;
    white-space: nowrap;
    animation: waiwaiTyping 3s steps(40, end), waiwaiBlinkCaret 0.8s step-end infinite;
}

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

@keyframes waiwaiBlinkCaret {
    from, to { border-color: transparent; }
    50% { border-color: #0ea5e9; }
}

/* 能量波效果 */
.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(14, 165, 233, 0.4), transparent);
    animation: waiwaiEnergyWave 2s infinite;
}

@keyframes waiwaiEnergyWave {
    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(14, 165, 233, 0.1),
        0 20px 40px rgba(2, 132, 199, 0.1);
}

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

@keyframes waiwaiBounceIn {
    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: waiwaiSlideInLeft 1s ease-out;
}

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

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

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

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

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

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

@keyframes waiwaiScaleFadeIn {
    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-6xl {
    max-width: 1152px;
}

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

.waiwai-special-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(14, 165, 233, 0.2), transparent);
    animation: waiwaiRotate 5s linear infinite;
}

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

/* 文字效果 */
.waiwai-text-effect {
    background: linear-gradient(45deg, #0ea5e9, #0284c7, #0369a1, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: waiwaiTextShimmer 2.5s ease-in-out infinite;
}

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

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

.waiwai-interactive:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.25);
}

/* 背景装饰 */
.waiwai-decoration {
    position: relative;
}

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