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

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    background-color: transparent !important;
    background-attachment: initial !important;
    min-height: auto !important;
}

/* 初始化界面 */
.init-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 20px;
}

.init-card {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 20px;
}

.init-header {
    text-align: center;
    margin-bottom: 20px;
}

.init-header h1 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}

.init-header p {
    font-size: 14px;
    color: #666;
}

/* 覆盖Vant按钮渐变样式 */
.van-button--primary {
    background: #667eea !important;
    border-color: #667eea !important;
    background-image: none !important;
}

.van-button--primary:active {
    background: #5568d3 !important;
    border-color: #5568d3 !important;
    background-image: none !important;
}

.player-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.container {
    width: 100%;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.player-container {
    padding: 10px;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding-bottom: 0;
}

.player-controls-wrapper {
    margin-top: auto;
    padding: 20px 15px;
    padding-bottom: 20px;
    flex-shrink: 0;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
    border-radius: 20px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    position: relative;
}

/* 播放列表内联样式（在控件右下角） */
.playlist-section-inline {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
}

.playlist-toggle-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    backdrop-filter: blur(10px);
}

.playlist-toggle-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.playlist-count {
    font-size: 12px;
    font-weight: 500;
}

.playlist-items-inline {
    position: absolute;
    bottom: 45px;
    right: 0;
    width: 200px;
    max-height: 300px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.playlist-item-inline {
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.playlist-item-inline:last-child {
    margin-bottom: 0;
}

.playlist-item-inline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.playlist-item-inline.active {
    background-color: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
}

.playlist-item-inline .playlist-item-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .playlist-items-inline {
        width: 180px;
        max-height: 250px;
    }
}

.track-info {
    padding: 12px 0;
    text-align: center;
}

.track-name {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

.marquee-notice-bar {
    margin: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.playlist-section {
    margin: 20px 10px;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
    border-radius: 12px;
    overflow: hidden;
}

.playlist-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.playlist-items {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.playlist-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}

.playlist-item:last-child {
    border-bottom: none;
}

.playlist-item:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    border-left-width: 3px;
}

.playlist-item-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-size {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.progress-section {
    margin: 20px 0;
    padding: 0 10px;
}

.progress-bar-wrapper {
    position: relative;
    padding: 10px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.progress-bar-bg {
    position: relative;
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: visible;
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.progress-bar-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: left 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0 15px 0;
    padding: 0 20px;
}

.control-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.control-btn.prev-btn,
.control-btn.next-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.control-btn.prev-btn:active,
.control-btn.next-btn:active {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.2);
}

.control-btn.play-btn {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    border-radius: 50%;
    background-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: #fff;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn.play-btn:active:not(:disabled) {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.control-btn.play-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.control-btn.play-btn .van-icon {
    margin-left: 2px; /* 播放图标稍微右移，视觉更居中 */
}

.control-btn.play-btn .van-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.control-btn .van-icon {
    display: block;
    flex-shrink: 0;
}

.van-cell.active {
    border-left: 3px solid;
}

.custom-buttons-wrapper {
    margin-top: 10px;
    padding: 0 10px;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.custom-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.custom-button {
    flex: 1;
    min-width: 80px;
    max-width: calc(50% - 5px);
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.custom-button:active {
    transform: scale(0.95);
    opacity: 0.8;
}

@media (max-width: 480px) {
    .custom-button {
        max-width: calc(50% - 5px);
        font-size: 13px;
        padding: 8px 12px;
    }
}

@media (min-width: 481px) {
    .custom-button {
        max-width: calc(33.333% - 7px);
    }
}

.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a2e;
    z-index: 9999;
}

.volume-btn-fixed {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.volume-btn-fixed:active {
    transform: scale(0.9);
    background-color: rgba(0, 0, 0, 0.5);
}

.volume-panel-bubble {
    position: fixed;
    top: 65px;
    right: 15px;
    min-width: 200px;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 999;
    animation: slideDown 0.3s ease;
}

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

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-slider-wrapper {
    flex: 1;
    position: relative;
    padding: 8px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.volume-slider-bg {
    position: relative;
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: visible;
}

.volume-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.volume-slider-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: left 0.1s linear;
}

.volume-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    min-width: 35px;
    text-align: right;
}
