/* 全局基础设置 */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f9fafb; /* neutral-50 */
    color: #1f2937; /* gray-800 */
}

/* 隐藏滚动条但保留功能 (可选，视设计需求定，这里仅针对特定容器优化) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 实用动画类 */
.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0; /* 初始隐藏，由JS控制触发或直接加载 */
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

/* 延迟类 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

/* 轮播图样式 */
.carousel-container {
    position: relative;
    overflow: hidden;
    height: 100vh;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out, transform 8s ease-out; /* 图片慢速缩放效果 */
    z-index: 0;
    transform: scale(1.05); /* 初始略微放大 */
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1); /* 激活时恢复原始大小，产生推拉感 */
}

.carousel-content {
    z-index: 10;
    position: absolute;
    pointer-events: none; /* 允许点击穿透背景 */
}
.carousel-content > * {
    pointer-events: auto;
}

/* 图片悬停放大交互 */
.img-zoom-container {
    overflow: hidden;
    position: relative;
}

.img-zoom-container img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.img-zoom-container:hover img {
    transform: scale(1.05);
}

/* 遮罩层渐变 */
.overlay-gradient {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
}

.overlay-full {
    background: rgba(0, 0, 0, 0.3); /* 全屏轻微变暗，提升文字可读性 */
}

/* 模态框样式 */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 50;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-backdrop.open .modal-content {
    transform: scale(1);
}

/* 导航链接动效 */
.nav-link {
    position: relative;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 动态槽位占位符 (预留) */
.dynamic-slot {
    min-height: 20px;
    display: contents;
}