/* 主样式文件 - 非关键CSS */

/* ===== 基础样式 ===== */
:root {
    --primary-dark: #0F172A;
    --primary-light: #1E293B;
    --accent-purple: #9F7AEA;
    --accent-purple-dark: #6B46C1;
    --text-light: #F8FAFC;
    --text-muted: #94A3B8;
    --transition-slow: 0.5s ease;
    --transition-medium: 0.3s ease;
    --transition-fast: 0.15s ease;
}

/* ===== 动画定义 ===== */
@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) translateX(var(--drift));
        opacity: 0;
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 10px rgba(159, 122, 234, 0.5); }
    50% { box-shadow: 0 0 30px rgba(159, 122, 234, 0.8); }
    100% { box-shadow: 0 0 10px rgba(159, 122, 234, 0.5); }
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(159, 122, 234, 0.5); }
    50% { text-shadow: 0 0 15px rgba(159, 122, 234, 0.8), 0 0 30px rgba(159, 122, 234, 0.4); }
    100% { text-shadow: 0 0 5px rgba(159, 122, 234, 0.5); }
}

@keyframes rotateIn {
    from {
        transform: perspective(1000px) rotateY(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(1000px) rotateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes blurIn {
    from {
        filter: blur(10px);
        opacity: 0;
    }
    to {
        filter: blur(0);
        opacity: 1;
    }
}

/* ===== 粒子背景 ===== */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===== 浮动歌词 ===== */
.floating-lyrics {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.lyric-fragment {
    position: absolute;
    opacity: 0.3;
    font-size: var(--size, 16px);
    color: rgba(255, 255, 255, 0.7);
    animation: float var(--duration, 20s) linear infinite;
    animation-delay: var(--delay, 0s);
    left: var(--left, 0);
    top: var(--top, 0);
    white-space: nowrap;
}

/* ===== 歌词动画区域 ===== */
.lyrics-animation {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

.lyric-line {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform-style: preserve-3d;
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 80%;
    font-weight: 700;
    color: var(--text-light);
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
}

.lyric-line:nth-child(1) {
    animation-name: rotateIn;
    animation-delay: 0.2s;
}

.lyric-line:nth-child(2) {
    animation-name: scaleIn;
    animation-delay: 1.2s;
}

.lyric-line:nth-child(3) {
    animation-name: blurIn;
    animation-delay: 2.2s;
}

.lyric-line .char {
    display: inline-block;
    animation: textGlow 2s infinite;
    animation-delay: calc(var(--char-index) * 0.1s);
}

/* ===== 背景音乐控制 ===== */
.bgm-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid var(--accent-purple);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all var(--transition-medium);
    backdrop-filter: blur(10px);
}

.bgm-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(159, 122, 234, 0.5);
}

.bgm-toggle.active {
    background: var(--accent-purple);
    animation: pulse 2s infinite;
}

/* ===== 移动菜单 ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    z-index: 999;
    transition: right var(--transition-medium);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    width: 100%;
}

.mobile-menu li {
    margin: 20px 0;
    text-align: center;
}

.mobile-menu a {
    color: var(--text-light);
    font-size: 1.5rem;
    text-decoration: none;
    display: block;
    padding: 10px;
    transition: color var(--transition-fast);
}

.mobile-menu a:hover {
    color: var(--accent-purple);
}

body.menu-open {
    overflow: hidden;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== 核心功能展示区 ===== */
.features-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.feature-step {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: transform var(--transition-medium);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(159, 122, 234, 0.2);
}

.feature-step:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.step-number {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 5px 15px rgba(159, 122, 234, 0.5);
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-purple);
}

.step-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* 输入演示 */
.input-demo {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.input-field {
    display: flex;
    align-items: center;
    font-family: monospace;
    font-size: 1.1rem;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 24px;
    background-color: #fff;
    margin-left: 2px;
    animation: blink 1s infinite;
}

/* 歌词卡片 */
.lyrics-cards {
    position: relative;
    height: 200px;
    perspective: 1000px;
}

.lyric-card {
    position: absolute;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(159, 122, 234, 0.3);
    border-radius: 10px;
    padding: 1rem;
    width: 80%;
    left: 10%;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.lyric-card:nth-child(1) {
    top: 0;
    z-index: 4;
}

.lyric-card:nth-child(2) {
    top: 40px;
    z-index: 3;
    opacity: 0.9;
}

.lyric-card:nth-child(3) {
    top: 80px;
    z-index: 2;
    opacity: 0.8;
}

.lyric-card:nth-child(4) {
    top: 120px;
    z-index: 1;
    opacity: 0.7;
}

/* 音乐播放器 */
.music-player-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-container {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
    cursor: pointer;
}

.audio-visualizer {
    width: 100%;
    height: 100px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.player-controls {
    display: flex;
    align-items: center;
    width: 100%;
}

.control-button {
    background: var(--accent-purple);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 1rem;
    color: white;
    transition: all var(--transition-fast);
}

.control-button:hover {
    transform: scale(1.1);
    background: var(--accent-purple-dark);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 30%;
    background: var(--accent-purple);
    border-radius: 3px;
}

/* 数据流可视化 */
.data-flow-visualization {
    margin: 4rem 0;
    position: relative;
}

.flow-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.flow-label {
    font-size: 1.2rem;
    color: var(--accent-purple);
    font-weight: 600;
}

/* ===== 案例展示区 ===== */
.music-tabs {
    margin-top: 3rem;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.music-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0.5rem 2rem;
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
}

.music-tab:hover {
    color: var(--text-light);
}

.music-tab.active {
    color: var(--accent-purple);
}

.music-tab.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--accent-purple);
    border-radius: 3px;
}

.music-content-wrapper {
    position: relative;
    min-height: 300px;
}

.music-content {
    display: none;
    animation: fadeIn 0.5s forwards;
}

.music-content.active {
    display: flex;
    flex-wrap: wrap;
}

.music-info {
    flex: 1;
    min-width: 300px;
    padding: 2rem;
}

.music-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-purple);
}

.music-lyrics {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.music-player {
    flex: 1;
    min-width: 300px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sample-player {
    width: 100%;
    max-width: 400px;
}

.sample-play-button {
    background: var(--accent-purple);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
}

.sample-play-button:hover {
    background: var(--accent-purple-dark);
    transform: translateY(-2px);
}

.sample-waveform {
    height: 80px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.sample-waveform::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(159, 122, 234, 0.2) 0%, 
        rgba(159, 122, 234, 0.1) 50%, 
        rgba(159, 122, 234, 0.2) 100%);
    background-size: 200% 100%;
    animation: waveMove 3s linear infinite;
}

@keyframes waveMove {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* ===== 卖点区域 ===== */
.selling-points {
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.8) 100%);
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.point-card {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform var(--transition-medium);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(159, 122, 234, 0.2);
}

.point-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.point-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(159, 122, 234, 0.1);
    border-radius: 50%;
    color: var(--accent-purple);
}

.point-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.point-card p {
    color: var(--text-muted);
}

/* ===== 联系区域 ===== */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

.qrcode-container {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qrcode-wrapper {
    position: relative;
    padding: 20px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    animation: glowPulse 3s infinite;
}

.qrcode-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.qrcode-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(159, 122, 234, 0.3) 0%, transparent 70%);
}

.qrcode-text {
    font-size: 1.2rem;
    color: var(--text-light);
    text-align: center;
    font-weight: 600;
    animation: textGlow 3s infinite;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(159, 122, 234, 0.2);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-purple);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.feature-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.feature-icon {
    color: var(--accent-purple);
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(159, 122, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-purple);
    color: white;
    transform: translateY(-3px);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--primary-dark);
    padding: 2rem 0;
    text-align: center;
}

.footer-bottom {
    color: var(--text-muted);
}

/* ===== 性能降级样式 ===== */
.performance-low .three-d-element {
    display: none;
}

.performance-low .two-d-fallback {
    display: block;
}

.performance-low .static-player {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.performance-low .particles-background {
    opacity: 0.3;
}

/* ===== 响应式样式 ===== */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-wrapper {
        gap: 2rem;
    }
    
    .feature-step {
        padding: 1.5rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: -15px;
        left: -15px;
    }
    
    .music-tab {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .music-info h3 {
        font-size: 1.5rem;
    }
    
    .music-lyrics {
        font-size: 1rem;
    }
    
    .point-card {
        padding: 1.5rem;
    }
    
    .point-icon {
        width: 60px;
        height: 60px;
    }
    
    .contact-wrapper {
        gap: 2rem;
    }
    
    .lyric-line {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .tab-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .music-tab {
        width: 100%;
    }
    
    .music-tab.active::after {
        width: 50px;
    }
    
    .point-card {
        padding: 1.2rem;
    }
    
    .lyric-line {
        font-size: 1.5rem;
    }
}


/* 静态波形图样式 */
.static-waveform {
    height: 80px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.static-waveform .bar {
    width: 3px;
    background: var(--accent-purple);
    margin: 0 2px;
    border-radius: 3px;
    animation: barPulse 1.5s ease-in-out infinite;
}

@keyframes barPulse {
    0%, 100% { height: var(--base-height); }
    50% { height: calc(var(--base-height) * 1.3); }
}

/* 移除社交链接样式 */
.social-links {
    display: none;
}


/* 备案信息样式 */
.beian-info {
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.beian-info a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.beian-info a:hover {
    color: var(--accent-purple);
}
