/* Tailwind CSS基础样式 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 自定义工具类 */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .scroll-smooth {
        scroll-behavior: smooth;
    }
    .backdrop-blur-xl {
        backdrop-filter: blur(20px);
    }
}

/* 基础样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 导航栏滚动效果 */
.nav-scroll {
    transition: all 0.3s ease;
}



/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* 轮播动画 */
@keyframes carousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
.carousel-animation {
    animation: carousel 20s linear infinite;
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 时间轴样式 */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 0;
    width: 12px;
    height: 12px;
    background-color: #D4AF37;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 2px #D4AF37;
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -16px;
    top: 20px;
    width: 2px;
    height: calc(100% + 20px);
    background-color: #E5E7EB;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    overflow-y: auto;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal > div {
    margin: 50px auto;
    animation: slideUp 0.3s ease;
}

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

/* 轮播指示器样式 */
.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.hero-indicator.active {
    background-color: #D4AF37;
    border-color: #D4AF37;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.hero-indicator:hover {
    background-color: rgba(212, 175, 55, 0.8);
    border-color: rgba(212, 175, 55, 0.8);
    transform: scale(1.1);
}

/* 轮播背景样式 */
#heroBackgrounds {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.hero-background.active {
    opacity: 1;
    z-index: 2;
}

/* 轮播内容样式 */
.hero-content {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.hero-content.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* 轮播容器样式 */
#heroSlider {
    position: relative;
    width: 100%;
    min-height: 300px;
}

/* 轮播导航按钮样式 */
#prevSlide, #nextSlide {
    transition: all 0.3s ease;
    z-index: 10;
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 1rem;
    right: auto;
}

#nextSlide {
    left: auto;
    right: 1rem;
}

#prevSlide:hover, #nextSlide:hover {
    background-color: rgba(212, 175, 55, 0.3);
    transform: scale(1.1) translateY(-50%);
}

#prevSlide:active, #nextSlide:active {
    transform: scale(0.95) translateY(-50%);
}

/* 轮播容器样式 */
#heroSlider {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* 作品卡片轮播样式 */
.work-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.work-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.5s ease-in-out;
}

.work-carousel-dot {
    transition: all 0.3s ease;
}

.work-carousel-dot.active {
    width: 8px;
    background-opacity: 1;
}
