/* ============================================================
   萤火AI - 专业电商AI工具平台
   自定义样式文件 | yinghuo.art
   ============================================================ */

/* ---------- 全局：防止水平溢出 ---------- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

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

@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-soft {
    0%   { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70%  { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* ---------- 动画工具类 ---------- */
.animate-reveal {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ---------- 玻璃导航栏 ---------- */
.glass-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* ---------- 功能卡片 ---------- */
.feature-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    background: white;
}

/* ---------- Hero 渐变背景 ---------- */
.hero-gradient {
    background: radial-gradient(circle at 50% -20%, #eff6ff 0%, #ffffff 60%);
}

/* ---------- 3D 按钮效果 ---------- */
.btn-3d {
    transition: all 0.2s;
    position: relative;
    top: 0;
    box-shadow: 0 4px 0 0 #1e40af, 0 8px 15px rgba(30, 64, 175, 0.2);
}

.btn-3d:hover {
    top: 1px;
    box-shadow: 0 3px 0 0 #1e40af, 0 5px 10px rgba(30, 64, 175, 0.2);
}

.btn-3d:active {
    top: 4px;
    box-shadow: 0 0 0 0 #1e40af;
}

/* ---------- 脉冲按钮 ---------- */
.pulse-btn {
    animation: pulse-soft 2s infinite;
}

/* ---------- 网格背景 ---------- */
.mesh-bg {
    background-image:
        radial-gradient(at 0%   0%, rgba(59, 130, 246, 0.05) 0, transparent 50%),
        radial-gradient(at 50%  0%, rgba(99, 102, 241, 0.05) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.05) 0, transparent 50%);
}

/* ---------- 幻灯片图片包装器（桌面端还原） ---------- */
.slide-img-wrap {
    border-radius: 0;
    overflow: visible;
    max-height: none;
}

/* ============================================================
   轮播图组件
   ============================================================ */
.banner-container,
.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-height: 400px;
    max-width: 100vw;
    touch-action: pan-y;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    height: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: center;
    padding-top: 64px;
    padding-bottom: 64px;
}

/* ---------- 轮播指示器 ---------- */
.carousel-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator-dot.active {
    width: 24px;
    background: #2563eb;
}

/* ---------- 轮播按钮 ---------- */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.carousel-btn:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 768px) {
    .carousel-btn { display: none; }

    /* 手机端轮播区域：允许内容撑开 */
    .hero-gradient {
        height: auto !important;
        min-height: 600px;
    }

    .carousel-container {
        height: auto !important;
        min-height: 600px;
        overflow: visible !important;
        position: relative;
    }

    /* 手机端幻灯片：垂直居中，内容撑开 */
    .carousel-slide {
        align-items: center;
        padding-top: 20px;
        padding-bottom: 60px;
        text-align: center;
        overflow-y: visible;
    }

    .carousel-slide .text-left {
        text-align: center;
    }

    .carousel-slide .flex-wrap {
        justify-content: center;
    }

    .carousel-indicator {
        bottom: 14px;
    }

    /* 手机端幻灯片图片区域：完整显示图片 */
    .slide-img-wrap {
        margin-top: 12px;
        border-radius: 16px;
        overflow: hidden;
        max-height: 280px;
    }

    .slide-img-wrap img {
        width: 100%;
        max-height: 280px;
        object-fit: contain;
        display: block;
    }

    /* 手机端隐藏悬浮装饰徽章 */
    .slide-badge-float {
        display: none;
    }
}
