/* 自定义样式 */

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

/* 应用卡片悬停效果 */
.app-card {
    transform: translateY(0);
}

.app-card:hover {
    transform: translateY(-4px);
}

.app-icon {
    transition: transform 0.3s ease;
}

.app-card:hover .app-icon {
    transform: scale(1.05);
}

/* 导航栏滚动效果 */
nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 按钮悬停动画 */
button, a {
    transition: all 0.2s ease;
}

/* 移动端菜单动画 */
#mobile-menu {
    transition: all 0.3s ease;
}

/* 链接下划线动画 */
a:not(.bg-indigo-600):not(.border-2) {
    position: relative;
}

a:not(.bg-indigo-600):not(.border-2)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

a:not(.bg-indigo-600):not(.border-2):hover::after {
    width: 100%;
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-card {
    animation: fadeIn 0.5s ease forwards;
}

.app-card:nth-child(2) {
    animation-delay: 0.1s;
}

.app-card:nth-child(3) {
    animation-delay: 0.2s;
}

.app-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* 选中状态 */
::selection {
    background-color: rgba(99, 102, 241, 0.2);
    color: inherit;
}

/* 焦点可见性 */
:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    nav, footer, a[href^="http"]::after {
        display: none;
    }
    
    .app-card {
        break-inside: avoid;
    }
}
