/* 主要容器样式 */
.music-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

/* 音乐系统介绍样式 */
.music-intro {
    margin-bottom: 60px;
}

.music-intro h2 {
    font-size: 2.4rem;
    margin-bottom: 40px;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.intro-content h3 {
    font-size: 1.8rem;
    color: #D4AF37;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.intro-content h3:first-child {
    margin-top: 0;
}

.intro-content h4 {
    font-size: 1.4rem;
    color: #FFD700;
    margin: 25px 0 15px;
}

.intro-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* 修改列表样式 */
.intro-content ul {
    padding-left: 0;  /* 移除默认的左边距 */
    margin-bottom: 20px;
    list-style: none;  /* 移除默认的圆点 */
}

.intro-content ul ul {
    margin: 10px 0 10px 20px;  /* 调整子列表的缩进 */
}

.intro-content li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 24px;  /* 为自定义标记留出空间 */
    line-height: 1.6;
}

/* 移除之前的圆点样式 */
.intro-content li::before {
    content: none;
}

/* 为二黄腔和西皮腔的主要列表项添加特殊样式 */
.intro-content > ul > li {
    padding-left: 0;
    margin-bottom: 20px;
}

/* 为子列表项添加新的标记样式 */
.intro-content ul ul li {
    position: relative;
}

.intro-content ul ul li::before {
    content: "◇";  /* 使用菱形符号 */
    position: absolute;
    left: 0;
    color: #D4AF37;  /* 金色 */
    font-size: 0.8em;
    top: 50%;
    transform: translateY(-50%);
}

/* 为不同层级的列表使用不同的标记 */
.intro-content ul ul ul li::before {
    content: "—";  /* 使用短横线 */
    color: rgba(255, 255, 255, 0.6);
}

/* 强调标题样式 */
.intro-content li strong {
    color: #FFD700;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

.wenchange, .wuchang {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.wenchange h4, .wuchang h4 {
    font-size: 1.2rem;
    color: #FFD700;
    margin-bottom: 10px;
    text-align: center;
}

.instrument-list {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-align: center;
    padding: 0 10px;
}

.modern-development {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 虚拟乐器部分样式 */
.virtual-instruments {
    margin-bottom: 60px;
}

.virtual-instruments h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    color: #ffffff;
}

.instruments-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.instrument-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
}

.instrument-section h3 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: #ffffff;
    text-align: center;
}

/* 虚拟乐器部分样式更新 */
.instrument-interface {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

/* 京胡界面样式更新 */
.jinghu-interface {
    position: relative;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    overflow: hidden;
}

.jinghu-strings {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 40px; /* 减小高度，因为只有一根弦 */
    display: flex;
    justify-content: center; /* 居中显示单根弦 */
    padding: 0 20px;
    transform: translateY(-50%);
}

.jinghu-string {
    width: 100%;
    height: 3px; /* 稍微加粗弦的显示 */
    background: linear-gradient(to right, #D4AF37, #FFD700);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jinghu-string.active {
    background: linear-gradient(to right, #FFD700, #FFF);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.jinghu-bow {
    position: absolute;
    top: 0;
    height: 100%;
    width: 60px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    transform: translateX(-50%);
    left: 50%;
}

.bow-stick {
    height: 100%;
    width: 4px;
    background: #8B4513;
    border-radius: 2px;
    position: relative;
}

.bow-hair {
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    width: 20px;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.bow-hair:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bow-hair.active {
    background: rgba(255, 255, 255, 0.4);
}

/* 添加弓的装饰效果 */
.bow-stick::before,
.bow-stick::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #8B4513;
    border-radius: 50%;
    transform: translateX(-50%);
}

.bow-stick::before {
    top: -6px;
}

.bow-stick::after {
    bottom: -6px;
}

/* 添加弦的固定点装饰 */
.jinghu-string::before,
.jinghu-string::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 12px; /* 加大固定点的尺寸 */
    height: 12px;
    background: #D4AF37;
    border-radius: 50%;
    transform: translateY(-50%);
}

.jinghu-string::before {
    left: -6px;
}

.jinghu-string::after {
    right: -6px;
}

/* 更新按钮样式 */
.jinghu-controls {
    display: flex;
    justify-content: center;
    gap: 40px; /* 增加按钮间距 */
    margin-top: 20px;
}

.info-button {
    padding: 12px 35px; /* 增加按钮宽度 */
    border: 2px solid #D4AF37;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-button:hover {
    background: #D4AF37;
    color: #000;
    transform: translateY(-2px);
}

.info-button.active {
    background: #D4AF37;
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.jinghu-tips {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    min-height: 60px;
    display: none;
}

.jinghu-tips.show {
    display: block;
}

/* 锣鼓界面样式更新 */
.drum-interface {
    position: relative;
    height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    overflow: hidden;
}

.drum-hammer {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px; /* 减小宽度，只保留棍子的宽度 */
    height: 160px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.hammer-handle {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #8B4513, #654321);
    border-radius: 4px;
}

.drum-instruments {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

/* 为每个乐器添加特殊样式 */
.drum-pad {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    border: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

/* 板鼓特殊样式 */
.drum-pad[data-sound="ban"] {
    grid-column: 2; /* 将板鼓放在中间列 */
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
}

/* 镲锅特殊样式 */
.drum-pad[data-sound="cymbals"] {
    grid-column: 1; /* 将镲锅放在左侧 */
}

/* 小锣特殊样式 */
.drum-pad[data-sound="gong"] {
    grid-column: 3; /* 将小锣放在右侧 */
}

.drum-pad:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
}

.drum-pad.active {
    background: rgba(212, 175, 55, 0.2);
    border-color: #D4AF37;
    transform: scale(0.95);
}

/* 为每个乐器添加图标或装饰 */
.drum-pad::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.drum-pad[data-sound="ban"]::before {
    border-width: 2px;
    background: rgba(212, 175, 55, 0.1);
}

.drum-pad[data-sound="cymbals"]::before {
    width: 70%;
    height: 70%;
    border-width: 1px;
}

.drum-pad[data-sound="gong"]::before {
    width: 50%;
    height: 50%;
    border-width: 3px;
}

/* 节奏游戏样式优化 */
.rhythm-game {
    margin-top: 60px;
}

/* 游戏容器样式 */
.game-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 30px;
    position: relative; /* 添加相对定位 */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    min-height: 600px; /* 确保容器有足够高度 */
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

#startGame {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: #000;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

#startGame:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

#startGame.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.score, .combo {
    font-size: 1.4rem;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.rhythm-track {
    height: 500px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    display: flex;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.track {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    background: linear-gradient(to bottom, 
        rgba(212, 175, 55, 0.05),
        rgba(212, 175, 55, 0.02)
    );
}

.track:last-child {
    border-right: none;
}

.hit-lines {
    position: absolute;
    bottom: 100px;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    padding: 0 2px;
}

.hit-line {
    flex: 1;
    margin: 0 2px;
    height: 100%;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D4AF37;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.1s ease;
}

.hit-line.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: #D4AF37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    transform: scale(0.95);
}

.note {
    position: absolute;
    width: calc(100% - 10px);
    height: 20px;
    background: linear-gradient(to right, #D4AF37, #FFD700);
    border-radius: 4px;
    left: 5px;
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    z-index: 1;
}

.note.perfect {
    background: linear-gradient(to right, #FFD700, #FFF);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.note.good {
    background: linear-gradient(to right, #FFA500, #FFD700);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.8);
}

.note.miss {
    background: linear-gradient(to right, #FF4500, #FF6347);
    opacity: 0.5;
}

.game-tips {
    margin: 20px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* 音符击中动画 */
@keyframes noteHit {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.note.hit {
    animation: noteHit 0.2s ease-out forwards;
}

/* 修改评分效果动画 */
.score-effect {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: scoreFloat 0.2s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes scoreFloat {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

/* 结算界面样式优化 */
.game-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 15px; /* 保持与游戏容器一致的圆角 */
}

.game-result.show {
    opacity: 1;
    visibility: visible;
}

.result-container {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    animation: fadeIn 0.5s ease-out;
    max-width: 90%;
    width: 400px;
}

.result-container h3 {
    color: #FFD700;
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.result-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.result-stats p {
    color: #ffffff;
    font-size: 1.2rem;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.result-container button {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: #000;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.result-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #FFD700, #FFF);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* 视频示例样式 */
.video-example {
    margin: 30px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 25px;
}

.video-example h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #FFD700;
}

.video-description {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.video-description p:first-child {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.video-description p:last-child {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9比例 */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 乐器组成部分样式 */
.instruments-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.instrument-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.instrument-box:hover {
    transform: translateY(-2px);
}

.instrument-title {
    font-size: 1.2rem;
    color: #FFD700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: center;
}

.instrument-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.main-instrument {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
}

.other-instruments {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .music-container {
        padding: 20px;
    }

    .music-intro h2 {
        font-size: 2rem;
    }

    .intro-content {
        padding: 20px;
    }

    .intro-content h3 {
        font-size: 1.6rem;
    }

    .intro-content h4 {
        font-size: 1.3rem;
    }

    .intro-content p, .intro-content li {
        font-size: 1rem;
    }

    .instruments-container {
        grid-template-columns: 1fr;
    }

    .drum-pad {
        font-size: 1.4rem;
    }

    .video-example {
        padding: 15px;
        margin: 20px 0;
    }

    .video-description p:first-child {
        font-size: 1.1rem;
    }

    .instruments-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .instrument-box {
        padding: 15px;
    }
}

/* 锣鼓说明样式更新 */
.drum-tips {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
}

/* 暂停按钮样式 */
.pause-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border: 2px solid #D4AF37;
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.pause-button:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.pause-button.active {
    background: #D4AF37;
    color: #000;
}

/* 音符容器样式 */
.note-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.track {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    background: linear-gradient(to bottom, 
        rgba(212, 175, 55, 0.05),
        rgba(212, 175, 55, 0.02)
    );
}

/* 音符样式 */
.note {
    position: absolute;
    width: calc(100% - 10px);
    height: 20px;
    background: linear-gradient(to right, #D4AF37, #FFD700);
    border-radius: 4px;
    left: 5px;
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    z-index: 1;
} 