* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    justify-content: center;
    align-items: center;
    text-align: center;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: white;
}

/* 背景图 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url(images/background.webp);
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: -1;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* 标题 */
h1 {
    color: #447278;
    margin: 20px 0;
    font-size: clamp(24px, 5vw, 32px);
    font-weight: bold;
}

/* 顶部横幅 */
.top-section {
    width: 100vw;
    height: 150px;
    overflow: hidden;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.top-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 导航栏1 */
.navbar-1 {
    width: 100%;
    min-height: 60px;
    background-color: #5da5a7;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    transition: min-height 0.3s ease;
}

.nav-area-1 {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav-item-1 {
    flex: 1;
    min-width: 80px;
    max-width: 100px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(12px, 3vw, 22px);
}

.nav-item-1 a {
    color: white;
    text-decoration: none;
}

.navbar-1 .nav-item-1 a:hover {
    color: #447278;
}

/* 导航栏2 */
.navbar-2 {
    width: 100%;
    max-width: 800px;
    margin: 20px auto 0;
    padding: 10px;
    box-sizing: border-box;
}

#nav {
    position: relative;
    border: none;
    border-radius: 10em;
    display: flex;
    list-style: none;
    background: white;
    box-shadow: 20px 40px 40px #00000033;
    padding: 10px;
    width: 100%;
    justify-content: center;
}

#nav li {
    margin: 0 10px;
}

#nav li a {
    position: relative;
    padding: 0 20px;
    font-size: clamp(16px, 4vw, 24px);
    font-family: Arial, sans-serif;
    color: #5da5a7;
    text-decoration: none;
    display: inline-block;
    z-index: 3;
}

.slide1, .slide2 {
    position: absolute;
    display: inline-block;
    height: calc(100% - 10px);
    top: 5px;
    border-radius: 10em;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1.05);
}

.slide1 {
    background-color: #ade1e3;
    opacity: 0.9;
    z-index: 2;
}

.slide2 {
    background-color: rgba(136, 205, 207, 0.5);
    opacity: 0;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3) inset;
}

.squeeze {
    transform: scale(0.9);
}

/* 搜索框 */
#searchInput {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    font-size: clamp(14px, 3vw, 16px);
    border: 2px solid #5da5a7;
    border-radius: 5px;
    margin-bottom: 20px;
    outline: none;
}

/* 筛选区域 */
.filter-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.filter-section {
    margin-bottom: 20px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: #5da5a7;
    border-radius: 5px;
    cursor: pointer;
}

.filter-title {
    margin: 0;
    font-size: clamp(14px, 3vw, 16px);
    color: white;
}

.filter-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: white;
    padding: 5px;
}

.filter-toggle-icon {
    display: inline-block;
    transition: transform 0.3s;
}

.filter-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.filter-buttons-container {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 100%;
    display: none;
}

.filter-section.expanded .filter-buttons-container {
    display: block;
}

.filter-buttons-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    transition: transform 0.3s;
    margin: 5px 0;
    max-width: 100%;
    line-height: 36px;
}

/* 电脑端默认3行 */
.filter-buttons {
    max-height: 108px; /* 36px × 3行 */
    overflow: hidden;
}

/* 手机端2行 */
@media (max-width: 768px) {
    .filter-buttons {
        max-height: 72px; /* 36px × 2行 */
    }
}

.filter-buttons.expanded {
    max-height: none;
}

.filter-button {
    padding: 4px 8px;
    margin: 0 4px 4px 0;
    background-color: #5da5a7;
    color: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    font-size: clamp(12px, 2.5vw, 14px);
    white-space: nowrap;
    transition: all 0.2s;
    height: 36px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

.filter-button:hover {
    background-color: #4c8c8e;
}

.filter-button.active {
    background-color: #447278;
    color: white;
    border-color: #447278;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    margin-top: 5px;
    width: 100%;
}

.nav-button {
    background: #5da5a7;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    padding: 0;
    transition: all 0.2s;
}

.nav-button:hover {
    background: #4c8c8e;
}

.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #5da5a7;
}

.all-button-container {
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
}

.all-button {
    padding: 5px 15px;
    margin: 0 auto;
    background-color: #5da5a7;
    border: 1px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
}

.all-button.active {
    background-color: #447278;
    color: white;
    border-color: #447278;
}

/* 表格 */
table {
    width: 100%;
    max-width: 800px;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    font-size: clamp(14px, 2.5vw, 16px);
    table-layout: fixed;
}

th, td {
    padding: clamp(8px, 2vw, 12px);
    text-align: left;
}

th {
    background-color: #5da5a7;
    color: white;
}

td {
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: rgba(93, 165, 167, 0.1);
}

.highlight {
    background-color: yellow;
    font-weight: bold;
}

table a {
    color: #5da5a7;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

table a:hover {
    color: #447278;
    text-decoration: underline;
}

/* 表格列宽 */
table#songTable th:nth-child(1),
table#songTable td:nth-child(1) {
    width: 60%;
}

table#songTable th:nth-child(2),
table#songTable td:nth-child(2) {
    width: 20%;
}

table#songTable th:nth-child(3),
table#songTable td:nth-child(3) {
    width: 20%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 页脚 */
footer {
    width: 100%;
    height: auto;
    padding: 10px 0;
    background-color: #5da5a7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: white;
    position: relative;
    bottom: 0;
    z-index: 1;
}

.footer-line {
    margin: 2px 0;
    text-align: center;
    width: 100%;
}

 #back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

#back-to-top:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

#back-to-top img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background-color: white;
}

/* 响应式调整 */
@media (max-width: 900px) {
    #nav li a {
        padding: 0 15px;
    }
    .slide1, .slide2 {
        height: 40px;
    }
}

@media (max-width: 768px) {
    #nav {
        padding: 8px;
        box-shadow: 15px 30px 30px rgba(0, 0, 0, 0.25);
    }
    #nav li {
        margin: 0 8px;
    }
    #nav li a {
        padding: 0 15px;
    }
    .slide1, .slide2 {
        height: 36px;
    }
    
    table#songTable th:nth-child(1),
    table#songTable td:nth-child(1) {
        width: 55%;
    }
    table#songTable th:nth-child(2),
    table#songTable td:nth-child(2) {
        width: 20%;
    }
    table#songTable th:nth-child(3),
    table#songTable td:nth-child(3) {
        width: 25%;
    }
}

@media (max-width: 640px) {
    #nav {
        padding: 6px;
    }
    #nav li {
        margin: 0 6px;
    }
    #nav li a {
        padding: 0 12px;
    }
    .slide1, .slide2 {
        height: 30px;
    }
    
    .filter-button {
        padding: 3px 6px;
        margin: 0 3px 3px 0;
    }
    
    table {
        font-size: 18px;
    }
    
    th, td {
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .top-section {
        height: 120px;
    }
    
    .navbar-1 {
        height: 80px;
        padding: 5px 0;
        overflow: hidden;
    }
    
    .nav-item-1 {
        width: 25%;
        height: 35px;
        font-size: 12px;
        padding: 0 2px;
    }
    
    .nav-item-1 a {
        font-size: 12px;
    }
    
    #nav {
        padding: 10px;
        box-shadow: 10px 20px 20px rgba(0, 0, 0, 0.2);
    }
    #nav li {
        margin: 0 4px;
    }
    #nav li a {
        font-size: 14px;
        padding: 0 10px;
    }
    .slide1, .slide2 {
        height: 26px;
    }
    
    .filter-button {
        padding: 2px 4px;
        font-size: 11px;
    }
    
    .nav-button {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    table {
        font-size: 16px;
    }
    
    th, td {
        padding: 4px 6px;
    }
    
    table#songTable th:nth-child(1),
    table#songTable td:nth-child(1) {
        width: 50%;
    }
    table#songTable th:nth-child(2),
    table#songTable td:nth-child(2) {
        width: 25%;
    }
    table#songTable th:nth-child(3),
    table#songTable td:nth-child(3) {
        width: 25%;
    }
}

@media (max-width: 360px) {
    #nav li a {
        font-size: 12px;
        padding: 0 8px;
    }
    
    .filter-button {
        font-size: 10px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 3px 5px;
    }
}