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

body {
    min-height: 100vh;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    color: #f7f7fb;
    background: #121426;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

#app {
    min-height: 100vh;
}

/* 登录注册页面 */
#auth_box {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(233, 69, 96, 0.35), transparent 32%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.28), transparent 35%),
        #121426;
}

.auth_card {
    width: 380px;
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(24, 27, 48, 0.94);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.auth_logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #e94560, #7c3aed);
    font-size: 32px;
}

.auth_card h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 8px;
}

.auth_card h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #e94560;
    font-size: 20px;
}

.auth_card input {
    width: 100%;
    height: 44px;
    margin-bottom: 15px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    outline: none;
    color: #ffffff;
    background: #222641;
}

.auth_card input:focus {
    border-color: #e94560;
}

.auth_card button {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    background: #e94560;
    transition: 0.2s;
}

.auth_card button:hover {
    background: #ff5c75;
}

#switch_text {
    margin-top: 16px;
    color: #a8adc7;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
}

#switch_text:hover {
    color: #ffffff;
}

/* 主布局 */
#music_box {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: #181b30;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
}

.logo_icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #e94560;
    font-size: 24px;
}

.logo h2 {
    font-size: 20px;
}

.logo p {
    margin-top: 3px;
    color: #a8adc7;
    font-size: 12px;
}

.tab_area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tab_area button {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: none;
    border-radius: 14px;
    color: #c9cee8;
    background: transparent;
    font-size: 15px;
    text-align: left;
    transition: 0.2s;
}

.tab_area button:hover,
.tab_area button.active {
    color: #ffffff;
    background: #e94560;
}

.user_box {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #c9cee8;
}

#logout_btn {
    width: 100%;
    height: 34px;
    margin-top: 12px;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    background: #2b3154;
}

#logout_btn:hover {
    background: #e94560;
}

.content {
    flex: 1;
    padding: 32px;
    padding-bottom: 130px;
    overflow-y: auto;
}

/* 搜索区域 */
.search_area {
    max-width: 1180px;
    margin: 0 auto 22px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 170px auto auto;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: #181b30;
}

.search_area input,
.search_area select,
.music_right select,
.add_area input,
.add_area textarea {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    outline: none;
    color: #ffffff;
    background: #222641;
}

.search_area input,
.search_area select,
.music_right select,
.add_area input {
    height: 42px;
    padding: 0 14px;
}

.search_area button,
.music_right button,
.add_area button,
.playlist_item button,
.detail_header button,
.del_btn,
.gray_btn {
    height: 42px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    background: #e94560;
    transition: 0.2s;
}

.search_area button:hover,
.music_right button:hover,
.add_area button:hover,
.playlist_item button:hover,
.detail_header button:hover {
    background: #ff5c75;
}

.gray_btn {
    background: #2b3154 !important;
}

.gray_btn:hover {
    background: #394063 !important;
}

.del_btn {
    background: rgba(233, 69, 96, 0.18) !important;
    color: #ff8fa0 !important;
}

.del_btn:hover {
    background: #e94560 !important;
    color: #ffffff !important;
}

/* 页面内容 */
.page_section {
    max-width: 1180px;
    margin: 0 auto;
}

.page_title {
    margin-bottom: 22px;
}

.page_title h2,
.detail_header h2 {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 30px;
}

.page_title p,
.detail_header p {
    color: #a8adc7;
}

.music_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background: #181b30;
    transition: 0.2s;
}

.music_item:hover {
    border-color: rgba(233, 69, 96, 0.55);
    background: #1f2340;
}

.music_left {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.cover {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #7c3aed, #e94560);
    color: #ffffff;
    font-size: 28px;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music_item h3 {
    margin-bottom: 8px;
    font-size: 18px;
    color: #ffffff;
}

.music_item p {
    margin-bottom: 10px;
    color: #a8adc7;
    font-size: 14px;
}

.small_text {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    color: #c9cee8;
    background: #242944;
    font-size: 12px;
}

.music_right {
    width: 330px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.music_right select {
    width: 150px;
}

/* 歌单 */
.add_area,
.detail_header {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: #181b30;
}

.add_area input,
.add_area textarea {
    width: 100%;
    margin-bottom: 12px;
}

.add_area textarea {
    min-height: 84px;
    padding: 12px 14px;
    resize: vertical;
}

.playlist_item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background: #181b30;
}

.playlist_item > div {
    cursor: pointer;
}

.playlist_item h3 {
    margin-bottom: 8px;
    color: #ffffff;
}

.playlist_item p {
    margin-bottom: 10px;
    color: #a8adc7;
}

.detail_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.empty_text {
    padding: 46px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    color: #a8adc7;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
}

/* 底部播放器 */
#player_box {
    position: fixed;
    left: 250px;
    right: 0;
    bottom: 0;
    min-height: 96px;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(24, 27, 48, 0.96);
    backdrop-filter: blur(12px);
}

.player_info {
    width: 260px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini_cover {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #e94560, #7c3aed);
    font-size: 24px;
}

#player_box h3 {
    max-width: 180px;
    margin-bottom: 4px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#player_box p {
    max-width: 180px;
    color: #a8adc7;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#audio_player {
    flex: 1;
    max-width: 650px;
}

/*音频加载反馈*/
.player_status {
    margin-top: 4px;
    color: #facc15 !important;
    font-size: 12px !important;
}

/* 滚动条 */
.content::-webkit-scrollbar {
    width: 6px;
}

.content::-webkit-scrollbar-track {
    background: #181b30;
}

.content::-webkit-scrollbar-thumb {
    background: #2b3154;
    border-radius: 3px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #e94560;
}

@media (max-width: 900px) {
    #music_box {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        overflow: visible;
    }

    .sidebar {
        width: 100%;
    }

    .content {
        padding: 22px;
        padding-bottom: 130px;
    }

    .search_area {
        grid-template-columns: 1fr;
    }

    .music_item {
        align-items: flex-start;
        flex-direction: column;
    }

    .music_right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    #player_box {
        left: 0;
        align-items: stretch;
        flex-direction: column;
    }
}
