/* ============================================================
   首页配图 - 暖橙主题重构 v3
   布局：Hero 长图手机（自动向上滑看）+ 缩略图滑块（联动切换）
   核心逻辑：点击/自动切换缩略图 → Hero 同步切换长图并继续滑看
   ============================================================ */

/* ═══════ 区块容器 ═══════ */
.phonefx-section {
    position: relative;
    padding: 100px 0 120px;
    background:
        radial-gradient(ellipse 70% 60% at 50% 15%, rgba(249, 115, 22, .09) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 60%, rgba(252, 211, 77, .05) 0%, transparent 50%),
        var(--bg-page);
    overflow: hidden;
}
.phonefx-section::before {
    content: '';
    position: absolute;
    top: -60px; left: -100px;
    width: 380px; height: 380px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: .05;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}
.phonefx-section::after {
    content: '';
    position: absolute;
    bottom: 80px; right: -80px;
    width: 280px; height: 280px;
    background: var(--gradient-sunset);
    border-radius: 50%;
    opacity: .06;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* ═══════ 单手机展示区 ═══════ */
.phonefx-single {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 56px;
    margin-top: 64px;
    padding: 24px 0;
}

/* 手机背后的暖色光晕 */
.phonefx-single-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(249, 115, 22, .18) 0%, rgba(252, 211, 77, .08) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: phonefxGlowPulse 4s ease-in-out infinite;
}
@keyframes phonefxGlowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: .8; }
    50%      { transform: translate(-50%, -50%) scale(1.12); opacity: 1;  }
}

/* 单个大手机 */
.phonefx-single-phone {
    position: relative;
    z-index: 2;
    width: 290px;
    height: 596px;
    background: #0e1117;
    border-radius: 46px;
    padding: 10px;
    box-shadow:
        0 32px 80px rgba(13, 28, 56, .26),
        0 12px 28px rgba(13, 28, 56, .10),
        inset 0 0 0 2px rgba(255, 255, 255, .05);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    animation: phonefxHeroFloat 5s ease-in-out infinite;
}
@keyframes phonefxHeroFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
.phonefx-single-phone:hover {
    animation-play-state: paused;
    box-shadow:
        0 40px 96px rgba(13, 28, 56, .32),
        0 16px 36px rgba(13, 28, 56, .16),
        0 0 0 2px rgba(249, 115, 22, .18),
        inset 0 0 0 2px rgba(255, 255, 255, .07);
}
.phonefx-single-phone .phonefx-screen { border-radius: 36px; }
.phonefx-single-phone .phonefx-notch { top: 10px; }

/* 手机内长图向上滑看 */
.phonefx-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
    animation: phonefxScroll linear infinite;
}
.phonefx-track img { width: 100%; display: block; }
.phonefx-single:hover .phonefx-track { animation-play-state: paused; }
@keyframes phonefxScroll {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
}

/* 手机屏幕上下遮罩 */
.phonefx-screen {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 32px;
    overflow: hidden;
    background: #fff;
}
.phonefx-screen::before,
.phonefx-screen::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 48px;
    z-index: 4;
    pointer-events: none;
}
.phonefx-screen::before { top: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .3), transparent); }
.phonefx-screen::after  { bottom: 0; background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent); }

/* 手机刘海 */
.phonefx-notch {
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 96px; height: 20px;
    background: #0e1117;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 5;
}

/* "上滑查看" 提示 */
.phonefx-hint {
    position: absolute;
    left: 50%; bottom: 14px;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #fff;
    font-size: 11px;
    letter-spacing: .5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
    pointer-events: none;
}
.phonefx-hint i { font-size: 14px; animation: phonefxBounce 1.6s ease-in-out infinite; }
@keyframes phonefxBounce {
    0%, 100% { transform: translateY(0);  opacity: .6; }
    50%      { transform: translateY(-5px); opacity: 1;  }
}

/* 两侧特性标签容器 */
.phonefx-single-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2;
}
.phonefx-features-left { align-items: flex-end; }
.phonefx-features-right { align-items: flex-start; }

/* 特性标签卡片 */
.phonefx-single-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-normal);
}
.phonefx-single-feature:hover {
    transform: translateY(-4px);
    background: var(--glass-bg-hover);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(249, 115, 22, .25);
}
.phonefx-single-feature i {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 16px;
    flex-shrink: 0;
    background: var(--gradient-soft);
    color: var(--brand-primary);
}

/* 模式切换按钮 */
.phonefx-mode-btn {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(249, 115, 22, .45);
    transition: all var(--transition-normal);
}
.phonefx-mode-btn:hover {
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 6px 24px rgba(249, 115, 22, .55);
}
.phonefx-mode-btn:active {
    transform: translateY(-50%) scale(.96);
}

/* ═══════ 截图轮播层（Hero手机内淡入淡出） ═══════ */
.phonefx-carousel-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
}
.phonefx-carousel-layer img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .7s ease-in-out;
}
.phonefx-carousel-layer img.active { opacity: 1; z-index: 1; }

/* 双模式：隐藏/显示工具 */
.phonefx-hidden { display: none !important; }

/* ═══════ 截图轮播指示圆点 ═══════ */
.phonefx-carousel-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 32px;
    position: relative;
    z-index: 2;
}
.phonefx-carousel-dots span {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: rgba(249, 115, 22, .18);
    cursor: pointer;
    transition: all var(--transition-normal);
}
.phonefx-carousel-dots span:hover { background: rgba(249, 115, 22, .40); }
.phonefx-carousel-dots span.active {
    width: 28px;
    border-radius: 5px;
    background: var(--brand-primary);
    box-shadow: 0 2px 10px rgba(249, 115, 22, .45);
}
/* 长图模式下圆点变暗 */
.phonefx-carousel-dots.dimmed span { background: rgba(249, 115, 22, .06); }
.phonefx-carousel-dots.dimmed span.active { background: rgba(249, 115, 22, .20); }

/* ═══════ 长图导航 ═══════ */
.phonefx-long-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}
.phonefx-long-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--brand-primary);
    font-size: 15px;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}
.phonefx-long-arrow:hover {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-glow-primary);
    transform: scale(1.1);
}
.phonefx-long-arrow:active { transform: scale(.94); }
.phonefx-long-arrow:disabled {
    opacity: .28;
    cursor: default;
    transform: none;
    background: var(--glass-bg);
    color: var(--text-tertiary);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-card);
}
.phonefx-long-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: center;
}

/* ═══════ 横图展示画廊 ═══════ */
.galleryfx {
    position: relative;
    padding: 100px 0 110px;
    background: linear-gradient(180deg, var(--bg-page) 0%, rgba(254, 243, 199, .15) 30%, var(--bg-page) 100%);
    overflow: hidden;
}
.galleryfx-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 52px;
}
.galleryfx-item {
    position: relative;
    margin: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-slow);
}
.galleryfx-item:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-6px);
}
.galleryfx-item img {
    width: 100%;
    aspect-ratio: 9 / 5;
    object-fit: cover;
    display: block;
    transition: transform .55s ease;
}
.galleryfx-item:hover img { transform: scale(1.06); }
.galleryfx-item figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 36px 18px 16px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent);
    transform: translateY(4px);
    opacity: .9;
    transition: all var(--transition-normal);
}
.galleryfx-item:hover figcaption { transform: translateY(0); opacity: 1; }

/* ═══════ 响应式 ═══════ */
@media (min-width: 1081px) {
    .phonefx-single-phone {
        width: 310px;
        height: 636px;
        border-radius: 48px;
    }
    .phonefx-single-phone .phonefx-screen { border-radius: 38px; }
    .phonefx-single-glow { width: 440px; height: 440px; }
}

@media (max-width: 1080px) {
    .galleryfx-grid { grid-template-columns: repeat(2, 1fr); }
    .phonefx-single { gap: 32px; margin-top: 48px; }
    .phonefx-single-phone { width: 260px; height: 534px; }
    .phonefx-single-glow { width: 320px; height: 320px; }
    .phonefx-single-features { display: none; }
}

@media (max-width: 768px) {
    .phonefx-section { padding: 72px 0 88px; }
    .phonefx-section::before,
    .phonefx-section::after { opacity: .03; }

    .phonefx-single { margin-top: 40px; padding: 16px 0; }
    .phonefx-single-glow { width: 240px; height: 240px; }
    .phonefx-single-phone {
        width: 240px;
        height: 492px;
        animation: none;
        border-radius: 40px;
        padding: 8px;
    }
    .phonefx-single-phone .phonefx-screen { border-radius: 32px; }
    .phonefx-single-phone .phonefx-notch { top: 8px; }
    .phonefx-mode-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
        right: -14px;
    }

    .phonefx-carousel-dots { margin-top: 20px; gap: 7px; }
    .phonefx-carousel-dots span { width: 7px; height: 7px; }
    .phonefx-carousel-dots span.active { width: 22px; }

    .phonefx-long-nav { margin-top: 16px; gap: 16px; }
    .phonefx-long-arrow { width: 40px; height: 40px; font-size: 14px; }
    .phonefx-long-label { font-size: 13px; }

    .galleryfx { padding: 72px 0 80px; }
}

@media (max-width: 640px) {
    .galleryfx-grid { grid-template-columns: 1fr; }
    .galleryfx-item { border-radius: var(--radius-lg); }

    .phonefx-single-phone {
        width: 220px;
        height: 452px;
        border-radius: 36px;
        padding: 7px;
    }
    .phonefx-single-phone .phonefx-screen { border-radius: 28px; }
    .phonefx-mode-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
        right: -12px;
    }

    .phonefx-carousel-dots { gap: 6px; margin-top: 16px; }
    .phonefx-carousel-dots span.active { width: 20px; }
}
