/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo h2 {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #3498db;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.language-switcher {
    margin-left: auto;
    margin-right: 1rem;
}

.language-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-select:hover {
    border-color: #3498db;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄区域样式 */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #fff;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #667eea;
    transform: translateY(-2px);
}

/* 钢琴游戏效果 */
.piano-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInRight 1s ease-out 0.6s both;
    position: relative;
    height: 400px;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    border-radius: 15px;
    overflow: hidden;
}

.piano-game::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
    pointer-events: none;
}

@keyframes sparkle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}





.piano-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    margin: 20px;
    position: relative;
    overflow: visible;
}

.piano-keys {
    display: flex;
    position: relative;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 
        inset 0 5px 15px rgba(0, 0, 0, 0.3),
        0 10px 25px rgba(0, 0, 0, 0.2);
}

.key {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    user-select: none;
}

.key.white {
    width: 60px;
    height: 180px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
    border: 2px solid #e0e0e0;
    margin: 0 1px;
    border-radius: 0 0 8px 8px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.key.black {
    width: 35px;
    height: 110px;
    background: linear-gradient(to bottom, #2c2c2c 0%, #1a1a1a 100%);
    position: absolute;
    border-radius: 0 0 6px 6px;
    z-index: 2;
    border: 1px solid #000;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.key.black[data-key="1"] { left: 64px; }   /* C# - 在C和D之间 */
.key.black[data-key="3"] { left: 125px; }  /* D# - 在D和E之间 */
.key.black[data-key="6"] { left: 250px; }  /* F# - 在F和G之间 */
.key.black[data-key="8"] { left: 310px; }  /* G# - 在G和A之间 */
.key.black[data-key="10"] { left: 370px; } /* A# - 在A和B之间 */

.key:hover {
    transform: translateY(2px);
}

.key.white:hover {
    background: linear-gradient(to bottom, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.key.black:hover {
    background: linear-gradient(to bottom, #404040 0%, #2a2a2a 100%);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.key.active {
    transform: translateY(4px);
}

.key.white.active {
    background: linear-gradient(to bottom, #4a90e2 0%, #357abd 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
}

.key.black.active {
    background: linear-gradient(to bottom, #ff6b9d 0%, #e55a87 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 添加按键标签 */
.key::after {
    content: attr(data-note);
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.key.white::after {
    color: #666;
}

.key.black::after {
    color: #ccc;
}

.key:hover::after {
    opacity: 1;
}

/* 波纹效果 */
.key-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

/* 音符滑块样式 */
.note-slider {
    position: absolute;
    width: 12px;
    background: linear-gradient(to top, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0.3) 100%);
    border-radius: 6px;
    z-index: 10;
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(255, 255, 255, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    transform-origin: bottom;
    animation: slideUp 3s ease-out forwards;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.note-slider.white-key {
    background: linear-gradient(to top, 
        rgba(135, 206, 250, 0.9) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 100%);
    box-shadow: 
        0 0 15px rgba(135, 206, 250, 0.8),
        0 0 30px rgba(135, 206, 250, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.note-slider.black-key {
    background: linear-gradient(to top, 
        rgba(255, 20, 147, 0.9) 0%,
        rgba(255, 105, 180, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 100%);
    box-shadow: 
        0 0 15px rgba(255, 20, 147, 0.8),
        0 0 30px rgba(255, 20, 147, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
}

@keyframes slideUp {
    0% {
        transform: translateY(0) scaleY(0.1);
        opacity: 1;
    }
    10% {
        transform: translateY(-20px) scaleY(1);
        opacity: 1;
    }
    90% {
        transform: translateY(-400px) scaleY(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-500px) scaleY(0.8);
        opacity: 0;
    }
}

/* 滑块粒子效果 */
.note-slider::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
    border-radius: 50%;
    animation: sparkle 2s ease-out;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.2);
    }
}

/* 产品展示样式 */
.products {
    padding: 100px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.product-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    margin-bottom: 1.5rem;
}

.product-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.product-card p {
    color: #666;
    line-height: 1.6;
}

/* 功能特色样式 */
.features {
    padding: 100px 0;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: #f8f9fa;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.feature-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* 用户评价样式 */
.reviews {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.review-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stars {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.review-card p {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.6;
}

.reviewer {
    font-weight: 600;
    color: #2c3e50;
}

/* 联系信息样式 */
.contact {
    padding: 60px 0;
    background: #2c3e50;
    color: #fff;
}

.contact .section-title {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.contact .section-title::after {
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.contact-info-compact {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact-item-small {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-item-small:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-icon-small {
    font-size: 1.2rem;
}

.contact-text {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.95;
}

/* 保持原有样式以防兼容性问题 */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 页脚样式 */
.footer {
    background: #1a252f;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: perspective(500px) rotateX(15deg) translateY(0);
    }
    50% {
        transform: perspective(500px) rotateX(15deg) translateY(-10px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .piano-game {
        height: 300px;
    }
    
    .note-track {
        width: 350px;
        height: 150px;
    }
    

    
    .piano-keys {
        transform: scale(0.7) perspective(500px) rotateX(15deg);
    }
    
    .key.white {
        width: 28px;
        height: 140px;
    }
    
    .key.black {
        width: 18px;
        height: 85px;
    }
    
    .key.black[data-key="1"] { left: 21px; }
    .key.black[data-key="3"] { left: 50px; }
    .key.black[data-key="6"] { left: 108px; }
    .key.black[data-key="8"] { left: 138px; }
    .key.black[data-key="10"] { left: 167px; }

    .product-grid,
    .features-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .contact-info-compact {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .contact-item-small {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .container {
        padding: 0 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}