* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 1rem 0;
}

nav ul li {
    display: inline;
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}

nav ul li a:hover {
    color: #3498db;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.content-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.content-item:hover {
    transform: translateY(-5px);
}

.content-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.audio-player {
    width: 100%;
    margin-top: 1rem;
}

.audio-player audio {
    width: 100%;
}

.game-link {
    display: block;
    text-align: center;
    background-color: #3498db;
    color: white;
    padding: 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.game-link:hover {
    background-color: #2980b9;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem;
    position: relative;
    bottom: 0;
    width: 100%;
}

.sub-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.sub-links .game-link {
    margin-top: 0;
    font-size: 0.9rem;
    padding: 0.6rem;
}

.dropdown-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.dropdown-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-btn::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-btn::after {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-btn:hover {
    background-color: #2980b9;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.sub-dropdown {
    position: relative;
}

.sub-dropdown-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: transparent;
    color: #333;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sub-dropdown-btn:hover {
    background-color: #f1f1f1;
}

.sub-dropdown-btn::after {
    content: '▶';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
}

.sub-dropdown-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 4px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.sub-dropdown:hover .sub-dropdown-content {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.dropdown-content a {
    color: #333;
    padding: 0.8rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content .audio-player {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.dropdown-content .audio-player:last-child {
    border-bottom: none;
}

.dropdown-content .audio-player h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.dropdown-content .audio-player audio {
    width: 100%;
    margin-top: 0.5rem;
}

/* 调整下拉菜单的宽度以适应音频播放器 */
.content-item .dropdown-content {
    min-width: 300px;
    max-width: 400px;
}

.video-player {
    width: 100%;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.video-player video {
    display: block;
    width: 100%;
    height: auto;
    background: #000;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    nav ul li {
        display: block;
        margin: 0.5rem 0;
    }

    .sub-links {
        grid-template-columns: 1fr;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        transform: none;
    }
    
    .sub-dropdown-content {
        position: static;
        box-shadow: none;
        transform: none;
        padding-left: 1rem;
    }
    
    .dropdown:hover .dropdown-content,
    .sub-dropdown:hover .sub-dropdown-content {
        transform: none;
    }

    .content-item .dropdown-content {
        min-width: 100%;
        max-width: 100%;
    }

    .video-player {
        margin: 0.5rem 0;
    }
} 