/* 基础样式 - 增强版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 60px;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

header h1 {
    font-size: 2.8rem;
    background: linear-gradient(to right, #2c3e50, #4ca1af);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
    font-weight: 700;
}

header p {
    color: #6c757d;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* === 修改重点：声音网格布局 === */
.sound-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 固定两列 */
    grid-template-rows: repeat(2, 1fr);    /* 固定两行 */
    gap: 40px;
    max-width: 800px;                      /* 控制整体宽度 */
    margin: 0 auto 60px;                   /* 居中并保持底部间距 */
    padding: 20px;
}
/* === 修改结束 === */

.sound-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    height: 100%;                         /* 新增：确保卡片等高 */
}

.sound-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.sound-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff9966, #ff5e62);
}

.rain::before {
    background: linear-gradient(90deg, #36d1dc, #5b86e5);
}

.wave::before {
    background: linear-gradient(90deg, #4facfe, #00f2fe);
}

.wind::before {
    background: linear-gradient(90deg, #a1c4fd, #c2e9fb);
}

.sound-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.fire {
    background: linear-gradient(135deg, #ff5e62, #ff9966);
}

.rain {
    background: linear-gradient(135deg, #36d1dc, #5b86e5);
}

.wave {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.wind {
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
}

.sound-card h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 500;
}

/* 按钮样式 - 升级版 */
.play-btn {
    background: linear-gradient(to right, #2c3e50, #4ca1af);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    width: 100%;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #4ca1af, #2c3e50);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.1);
}

.play-btn:hover::before {
    opacity: 1;
}

.play-btn.playing {
    background: linear-gradient(to right, #27ae60, #2ecc71);
}

.play-btn.playing::before {
    background: linear-gradient(to right, #2ecc71, #27ae60);
}

/* 音量控制 - 美化版 */
.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.volume-icon {
    font-size: 1.3rem;
    color: #6c757d;
}

.volume-slider {
    flex-grow: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #e9ecef;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

.volume-slider:hover {
    height: 8px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2c3e50;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #4ca1af;
}

/* 页脚样式 - 升级版 */
footer {
    text-align: center;
    padding: 25px;
    margin-top: auto;
    color: #6c757d;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sound-grid {
        grid-template-columns: 1fr; /* 小屏幕单列 */
        grid-template-rows: auto;
        gap: 30px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .container {
        padding: 30px 15px;
    }
}

/* 添加微妙的动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sound-card {
    animation: fadeIn 0.6s ease forwards;
}

.sound-card:nth-child(1) { animation-delay: 0.1s; }
.sound-card:nth-child(2) { animation-delay: 0.2s; }
.sound-card:nth-child(3) { animation-delay: 0.3s; }
.sound-card:nth-child(4) { animation-delay: 0.4s; }
