/* 补充样式 - 为Monster Survivors网站提供额外的视觉效果 */

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

/* 游戏容器阴影效果 */
.game-container {
    box-shadow: 0 0 30px rgba(175, 82, 222, 0.2);
    transition: box-shadow 0.3s ease;
}

.game-container:hover {
    box-shadow: 0 0 40px rgba(0, 122, 255, 0.3);
}

/* 标题动画效果 */
@keyframes glow {
    0% {
        text-shadow: 0 0 10px rgba(175, 82, 222, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 122, 255, 0.7);
    }
    100% {
        text-shadow: 0 0 10px rgba(175, 82, 222, 0.5);
    }
}

h1 {
    animation: glow 3s infinite alternate;
}

/* 渐变边框效果 */
.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.75rem;
    padding: 2px;
    background: linear-gradient(to right, #AF52DE, #007AFF);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* 按钮悬停效果 */
.button-hover {
    transition: all 0.3s ease;
}

.button-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        animation: none; /* 移动端禁用动画以提高性能 */
        text-shadow: 0 0 10px rgba(175, 82, 222, 0.5);
    }
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007AFF;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 卡片悬停效果 */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 沉浸式背景渐变动画 */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-bg {
    background: linear-gradient(-45deg, #1C1C1E, #3A3A3C, #48484A, #2C2C2E);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* 可访问性改进 */
:focus {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

/* 暗黑模式适配增强 */
@media (prefers-color-scheme: dark) {
    .dark-enhance {
        background-color: #1C1C1E;
        color: #F2F2F7;
    }
} 