/* LinkSound 主页专用样式 */

/* ===== Hero区域 ===== */
.hero {
    min-height: 100vh; /* 恢复全屏高度 */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-dark);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3;
}

.vinyl-record {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #1a1a1a 30%, #333 31%, #333 40%, #1a1a1a 41%);
    border-radius: 50%;
    border: 2px solid var(--electric-blue);
    box-shadow: var(--shadow-neon);
}

.vinyl-record::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--secondary-black);
    border-radius: 50%;
    border: 2px solid var(--electric-blue);
}

.stage-lights {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    animation: stageLights 8s ease-in-out infinite;
}

@keyframes stageLights {
    0%, 100% { opacity: 0.3; }
    33% { opacity: 0.6; }
    66% { opacity: 0.4; }
}

.audio-waves {
    position: absolute;
    bottom: 10%;
    left: 5%;
    width: 200px;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 100"><path d="M10,50 Q30,20 50,50 T90,50 T130,50 T170,50 T210,50" stroke="%2300d4ff" stroke-width="2" fill="none" opacity="0.6"/></svg>');
    animation: audioWave 3s ease-in-out infinite;
}

@keyframes audioWave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    margin-bottom: var(--spacing-lg);
    animation: logoFloat 3s ease-in-out infinite;
}

/* 确保logo在页面加载时可见 */
.hero-logo.fade-in {
    opacity: 1; /* 覆盖fade-in的默认opacity: 0 */
}

/* 页面加载状态下的logo */
.page-loading .hero-logo.fade-in {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
}

/* logo的fade-in动画 */
.hero-logo.fade-in.animate-in {
    animation: logoFadeIn 1.5s ease-out forwards, logoFloat 3s ease-in-out infinite 1.5s;
}

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


/* 备用方案：如果JavaScript未加载，3秒后自动显示logo */
.hero-logo.fade-in {
    animation: logoFallback 0.1s ease-out 3s forwards, logoFloat 3s ease-in-out infinite 3s;
}

@keyframes logoFallback {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.app-logo {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 20px rgba(255, 51, 0, 0.6))
            drop-shadow(0 0 40px rgba(181, 0, 0, 0.4))
            drop-shadow(0 0 60px rgba(78, 1, 1, 0.2));
    transition: all var(--transition-normal);
}

.app-logo:hover {
    filter: drop-shadow(0 0 30px rgba(255, 51, 0, 0.9))
            drop-shadow(0 0 60px rgba(181, 0, 0, 0.6))
            drop-shadow(0 0 90px rgba(78, 1, 1, 0.4));
    transform: scale(1.05);
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
}

.hero-logo-text {
    height: 3.5rem;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
}

.hero-title span {
    display: block;
    margin-top: var(--spacing-sm);
    font-size: 2.8rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--light-gray);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-bottom: var(--spacing-xxl);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--electric-blue);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* ===== 功能预览区域 ===== */
.features-preview {
    padding: var(--spacing-xxl) 0;
    position: relative;
    background: var(--secondary-black);
    overflow: hidden;
}

/* === 动态背景设置 - 开始 === */
/* 背景图片层 */
.features-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../../images/backgrounds/ff448337d787470298d6f0aa41542cc1~tplv-tb4s082cfz-aigc_resize_mark_4096_4096.webp') !important;
    background-size: 100% !important;
    background-position: 50% 50% !important;
    background-repeat: no-repeat !important;
    opacity: 0.77 !important;
    z-index: 1 !important;
}

/* 渐变叠加层 */
.features-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26,26,26,0.14) 0%, rgba(26,26,26,0.05600000000000001) 100%) !important;
    z-index: 2 !important;
}

/* 确保内容在背景之上 */
.features-preview .container {
    position: relative !important;
    z-index: 3 !important;
}

/* 标题样式 */
.features-preview .section-title {
    font-size: 3rem !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0) !important;
    color: #ffffff !important; background: none !important; -webkit-background-clip: initial !important; -webkit-text-fill-color: initial !important;
}

/* 副标题样式 */
.features-preview .section-subtitle {
    color: #00d9ff !important;
}

/* 功能卡片背景 - 使用黑色半透明 */
.features-preview .feature-card {
    background: rgba(0,0,0,0.23) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgb(0 188 212 / 47%) !important;
}

.features-preview .feature-card:hover {
    background: rgba(0,0,0,0.33) !important;
    backdrop-filter: blur(8px) !important;
    border-color: var(--electric-blue) !important;
}
/* === 动态背景设置 - 结束 === */

.section-header {
    margin-bottom: var(--spacing-xxl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.section-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 400;
}

.features-grid {
    gap: var(--spacing-lg);
}

.feature-card {
    text-align: left;
    padding: var(--spacing-lg);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--electric-blue);
    background: rgba(26, 26, 26, 0.98);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
}

/* 功能卡片背景装饰 */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.feature-card:hover::before {
    opacity: 0.15;
}

/* 智能歌词系统背景 - 麦克风/录音室主题 */
.feature-card:nth-child(1)::before {
    background:
        url('../images/backgrounds/microphone-bg.svg'),
        linear-gradient(135deg,
            rgba(0, 212, 255, 0.1) 0%,
            rgba(147, 51, 234, 0.1) 50%,
            rgba(236, 72, 153, 0.1) 100%);
    background-size: cover, 100% 100%;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

/* 全音频格式支持背景 - 音频波形主题 */
.feature-card:nth-child(2)::before {
    background:
        url('../images/backgrounds/waveform-bg.svg'),
        linear-gradient(135deg,
            rgba(34, 197, 94, 0.1) 0%,
            rgba(59, 130, 246, 0.1) 50%,
            rgba(168, 85, 247, 0.1) 100%);
    background-size: cover, 100% 100%;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

/* 个性化主题背景 - 调色板/艺术主题 */
.feature-card:nth-child(3)::before {
    background:
        url('../images/backgrounds/palette-bg.svg'),
        linear-gradient(135deg,
            rgba(251, 146, 60, 0.1) 0%,
            rgba(239, 68, 68, 0.1) 50%,
            rgba(168, 85, 247, 0.1) 100%);
    background-size: cover, 100% 100%;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

/* 确保内容在背景之上 */
.feature-card > * {
    position: relative;
    z-index: 2;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    display: block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--white);
    position: relative;
    z-index: 2;
}

.feature-description {
    color: var(--light-gray);
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* 为每个功能卡片添加特定的图标颜色和效果 */
.feature-card:nth-child(1) .feature-icon {
    color: var(--electric-blue);
}

.feature-card:nth-child(1):hover .feature-icon {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
}

.feature-card:nth-child(2) .feature-icon {
    color: var(--electric-blue);
}

.feature-card:nth-child(2):hover .feature-icon {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6)));
}

.feature-card:nth-child(3) .feature-icon {
    color: var(--electric-blue);
}

.feature-card:nth-child(3):hover .feature-icon {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6)));
}

.feature-card:nth-child(4) .feature-icon {
    color: var(--electric-blue);
}

.feature-card:nth-child(4):hover .feature-icon {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6)));
}

/* 添加装饰性的背景图案 */
.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.feature-card:hover::after {
    opacity: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* 为不同的卡片添加音乐主题装饰图案 */
.feature-card:nth-child(1)::after {
    /* 音符图案 */
    background:
        radial-gradient(circle at 25% 25%, rgba(0, 212, 255, 0.15) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        linear-gradient(45deg, transparent 48%, rgba(0, 212, 255, 0.08) 49%, rgba(0, 212, 255, 0.08) 51%, transparent 52%);
    background-size: 20px 20px, 15px 15px, 8px 8px;
}

.feature-card:nth-child(2)::after {
    /* 波形图案 */
    background:
        repeating-linear-gradient(90deg,
            transparent 0px,
            transparent 3px,
            rgba(34, 197, 94, 0.1) 3px,
            rgba(34, 197, 94, 0.1) 4px,
            transparent 4px,
            transparent 8px),
        repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 6px,
            rgba(34, 197, 94, 0.05) 6px,
            rgba(34, 197, 94, 0.05) 7px);
    background-size: 12px 100%, 100% 10px;
}

.feature-card:nth-child(3)::after {
    /* 调色板图案 */
    background:
        radial-gradient(circle at 20% 30%, rgba(251, 146, 60, 0.12) 3px, transparent 3px),
        radial-gradient(circle at 80% 70%, rgba(239, 68, 68, 0.12) 2px, transparent 2px),
        radial-gradient(circle at 60% 20%, rgba(168, 85, 247, 0.12) 2.5px, transparent 2.5px),
        linear-gradient(60deg, transparent 47%, rgba(251, 146, 60, 0.05) 48%, rgba(251, 146, 60, 0.05) 52%, transparent 53%);
    background-size: 25px 25px, 18px 18px, 22px 22px, 12px 12px;
}

/* ===== 截图轮播区域 ===== */
.screenshots-carousel {
    padding: var(--spacing-xxl) 0;
    background: var(--primary-black);
    /* 固定整个模块的高度，防止切换时高度变化 */
    height: 920px;
    height: 920px;
}

.carousel-container {
    position: relative;
    max-width: 900px; /* 增加宽度以容纳外部按钮 */
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    /* 使用固定高度而不是aspect-ratio，确保跨浏览器兼容性 */
    width: 100%;
    height: 600px;
    max-width: 700px; /* 减少宽度为按钮留出空间 */
    flex: 1; /* 占据剩余空间 */
    /* 确保容器正确包含内容 */
    box-sizing: border-box;
    /* 防止内容溢出 */
    contain: layout style;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    /* 确保所有幻灯片都占据相同的空间 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    /* 确保图片在容器中居中显示 */
    object-position: center;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    padding: var(--spacing-lg);
    font-size: 1.1rem;
    text-align: center;
}

/* 左侧导航按钮 */
.carousel-btn-prev {
    position: relative;
    flex-shrink: 0;
    order: 1;
}

/* 右侧导航按钮 */
.carousel-btn-next {
    position: relative;
    flex-shrink: 0;
    order: 3;
}

/* 轮播图容器在中间 */
.carousel-wrapper {
    order: 2;
}

.carousel-btn {
    background: rgba(0, 0, 0, 0.8);
    color: var(--electric-blue);
    border: 2px solid var(--electric-blue);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    /* 增强外部按钮的视觉效果 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--electric-blue);
    color: var(--primary-black);
    transform: scale(1.1);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dark-gray);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.indicator.active {
    background: var(--electric-blue);
    box-shadow: 0 0 10px var(--electric-blue);
}

/* ===== 轮播图响应式设计 ===== */
@media (max-width: 768px) {
    .screenshots-carousel {
        min-height: 700px;
        height: 700px;
    }

    .carousel-container {
        max-width: 700px;
        gap: var(--spacing-md);
    }

    .carousel-wrapper {
        height: 450px;
        max-width: 500px;
    }

    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .slide-caption {
        font-size: 1rem;
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .screenshots-carousel {
        min-height: 550px;
        height: 550px;
    }

    .carousel-container {
        flex-direction: column;
        max-width: 400px;
        gap: var(--spacing-md);
    }

    .carousel-wrapper {
        height: 300px;
        max-width: 400px;
        order: 2;
    }

    /* 在小屏幕上将按钮放在上下方 */
    .carousel-btn-prev {
        order: 1;
        align-self: center;
    }

    .carousel-btn-next {
        order: 3;
        align-self: center;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .slide-caption {
        font-size: 0.9rem;
        padding: var(--spacing-sm);
    }

    .carousel-indicators {
        bottom: 10px;
        gap: var(--spacing-xs);
    }

    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* ===== 下载统计区域 ===== */
.download-stats {
    padding: var(--spacing-xxl) 0;
    background: var(--gradient-secondary);
    position: relative;
    overflow: hidden;
}

.download-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.stats-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.stats-text {
    flex: 1;
    max-width: 500px;
}

.stats-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--primary-black);
}

.stats-description {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: var(--spacing-lg);
}

.platform-support {
    display: flex;
    gap: var(--spacing-lg);
}

.platform-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.platform-item img {
    width: 24px;
    height: 24px;
}

.download-actions {
    text-align: center;
}

.download-note {
    margin-top: var(--spacing-md);
    color: rgba(0, 0, 0, 0.7);
    font-size: 0.9rem;
}





/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .app-logo {
        width: 100px;
        height: 100px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-title span {
        font-size: 2.2rem;
    }

    .hero-logo-text {
        height: 2.8rem;
    }
    
    .vinyl-record {
        width: 200px;
        height: 200px;
    }
    
    .stats-content {
        flex-direction: column;
        gap: var(--spacing-xl);
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
    }

    .app-logo {
        width: 80px;
        height: 80px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-title span {
        font-size: 1.8rem;
    }

    .hero-logo-text {
        height: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .vinyl-record {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    /* 移动设备上的功能预览区域优化 */
    .features-preview::before {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }

    .features-preview::after {
        background: linear-gradient(
            135deg,
            rgba(26, 26, 26, 0.90) 0%,
            rgba(42, 42, 42, 0.85) 25%,
            rgba(26, 26, 26, 0.92) 50%,
            rgba(42, 42, 42, 0.88) 75%,
            rgba(26, 26, 26, 0.90) 100%
        );
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .feature-card {
        min-height: 280px;
        padding: var(--spacing-md);
    }
}

/* 小屏幕设备额外优化 */
@media (max-width: 480px) {
    .features-preview::after {
        background: linear-gradient(
            135deg,
            rgba(26, 26, 26, 0.93) 0%,
            rgba(42, 42, 42, 0.90) 50%,
            rgba(26, 26, 26, 0.93) 100%
        );
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }
}
