/* 涟漪效果 */
button {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 平滑过渡 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4169E1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2E5CB8;
}

/* 图片加载动画 */
img {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 卡片悬停效果增强 */
.hover\:shadow-xl:hover {
    transform: translateY(-4px);
}

/* 响应式字体优化 */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 1025px) {
    html {
        font-size: 16px;
    }
}

/* 确保长文本正确换行 */
p, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Focus 可访问性增强 */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #4169E1;
    outline-offset: 2px;
}