/* 金牛奇迹 - 通用动态效果样式库 */
/* 包含粒子效果、毛玻璃、3D卡片、动画等样式 */

/* 全局滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d4af37, #f5d388);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f5d388, #d4af37);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* 动态背景粒子效果 */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(212, 175, 55, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* 英雄背景渐变增强 */
.hero-bg {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.15) 0%, 
        rgba(212, 175, 55, 0.2) 30%,
        rgba(59, 130, 246, 0.15) 70%,
        rgba(212, 175, 55, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23d4af37" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    animation: grain 20s linear infinite;
    z-index: 1;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, -100px); }
}

/* 玻璃拟态效果增强 */
.glass-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border-radius: 12px;
}

.glass-card:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 炫酷按钮效果 */
.mu-button {
    background: linear-gradient(135deg, #d4af37 0%, #f5d388 50%, #d4af37 100%);
    border: none;
    color: #1a1a1a;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.mu-button::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.5s;
}

.mu-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.mu-button:hover::before {
    left: 100%;
}

.mu-button-secondary {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(245, 211, 136, 0.2) 100%);
    border: 2px solid #d4af37;
    color: #d4af37;
    font-weight: bold;
    padding: 10px 28px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

.mu-button-secondary:hover {
    background: linear-gradient(135deg, #d4af37 0%, #f5d388 100%);
    color: #1a1a1a;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.mu-button-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #8b5cf6 100%);
    border: none;
    color: white;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.mu-button-purple:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

/* 下载按钮样式 */
.download-button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    color: white;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.download-button.windows {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.3);
}

.download-button.mac {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.download-button.android {
    background: linear-gradient(135deg, #3ddc84 0%, #00c853 100%);
    box-shadow: 0 4px 15px rgba(61, 220, 132, 0.3);
}

.download-button.ios {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.download-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
}

/* 角色卡片增强效果 */
.character-card {
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s;
}

.character-card:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.2);
    transform: translateY(-5px) scale(1.02);
}

.character-card:hover::before {
    left: 100%;
}

/* 统计卡片效果 */
.stats-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

/* 脉冲效果 */
.pulse-effect {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* 浮动动画 */
@keyframes floatOrb {
    0% { transform: translateY(100vh) translateX(0px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) translateX(100px) rotate(360deg); opacity: 0; }
}

/* 渐入动画 */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* 波纹效果 */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 闪烁效果 */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 发光效果 */
@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px rgba(212, 175, 55, 0.5), 0 0 10px rgba(212, 175, 55, 0.3); }
    50% { text-shadow: 0 0 10px rgba(212, 175, 55, 0.8), 0 0 20px rgba(212, 175, 55, 0.5), 0 0 30px rgba(212, 175, 55, 0.3); }
}

/* 粒子浮动 */
@keyframes floatParticle {
    0% { transform: translateY(100vh) translateX(0px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) translateX(50px) rotate(180deg); opacity: 0; }
}

/* 填充条动画 */
@keyframes fillBar {
    from { width: 0%; }
    to { width: var(--fill-width, 100%); }
}

.animate-in {
    animation: fade-in-up 0.6s ease-out forwards;
}

.slide-in {
    animation: slideInUp 0.6s ease-out forwards;
}

.fade-in-scale {
    animation: fadeInScale 0.6s ease-out forwards;
}

.glow-text {
    animation: glow 2s ease-in-out infinite;
}

.shimmer-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #d4af37;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

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

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #d4af37; }
}

/* 3D变换效果 */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.rotate-y:hover {
    transform: rotateY(10deg);
}

.rotate-x:hover {
    transform: rotateX(10deg);
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #d4af37 0%, #f5d388 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 阴影效果 */
.text-shadow-gold {
    text-shadow: 2px 2px 4px rgba(212, 175, 55, 0.3);
}

.box-shadow-gold {
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.box-shadow-gold-hover:hover {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

/* 边框效果 */
.border-gold {
    border-color: #d4af37;
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #d4af37, #f5d388) 1;
}

/* 背景效果 */
.bg-gradient-gold {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(245, 211, 136, 0.1) 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
}

/* 响应式动画 */
@media (max-width: 768px) {
    .mu-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .glass-card {
        backdrop-filter: blur(10px);
    }
    
    .hero-bg::before {
        animation-duration: 30s;
    }
}

/* 减少动画效果（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .glass-card {
        border-width: 2px;
        border-color: #d4af37;
    }
    
    .mu-button {
        border: 2px solid #1a1a1a;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .glass-card {
        background: rgba(10, 10, 10, 0.9);
    }
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(212, 175, 55, 0.3);
    border-top: 4px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 进度条效果 */
.progress-bar {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(135deg, #d4af37 0%, #f5d388 100%);
    height: 100%;
    border-radius: 10px;
    animation: fillBar 2s ease-out forwards;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* 工具提示效果 */
.tooltip {
    position: relative;
    cursor: pointer;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.9);
    color: #d4af37;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}