* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-dark);
    min-height: 100vh;
}

/* Banner */
.banner {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* 图片按自然尺寸完整显示：宽度100%自适应，高度随图片比例，不裁剪不超出 */
.banner-bg {
    display: block;
    width: 100%;
    height: auto;
    opacity: 1;
}

.banner-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-align: center;
    padding: 20px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    pointer-events: none;
}

.banner-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 14px;
    opacity: 0.9;
    background: rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
}

/* 区块 */
.section {
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.count {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 4px 12px;
    border-radius: 12px;
}

/* 搜索框 */
.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

/* 音频列表 */
.audio-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audio-item {
    display: grid;
    grid-template-columns: 64px 1fr 60px;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    row-gap: 6px;
    align-items: stretch;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.audio-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.audio-item:active {
    transform: scale(0.98);
}

.audio-cover {
    grid-row: 1 / 4;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}

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

.audio-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: flex-start;
    text-align: left;
    width: 100%;
}

/* 时长：与语言标签一行（底部右侧） */
.audio-duration {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.5;
    white-space: nowrap;
}

/* 简介：中间两行省略 */
.audio-meta {
    align-self: flex-start;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    width: 100%;
    text-align: left;
}

/* 右侧按钮+时长容器：占满整列，flex纵向排列，贴底对齐 */
.audio-right {
    grid-column: 3;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

/* 播放键：圆形大按钮，与标题平齐（右侧顶部） */
.play-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s;
}

.audio-item:hover .play-icon {
    transform: scale(1.08);
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.admin-link {
    color: var(--primary);
    text-decoration: none;
    margin-left: 15px;
    padding: 6px 15px;
    background: var(--bg-card);
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
    transition: all 0.3s;
}

.admin-link:hover {
    background: var(--primary);
    color: white;
}

/* 播放器页面 */
.player-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a1f35 0%, #0f172a 100%);
    z-index: 100;
    overflow-y: auto;
}

.player-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(50px);
    opacity: 0.25;
    transform: scale(1.1);
}

.player-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
}

/* 播放器头部 */
.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 20px;
}

.back-btn, .share-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn:hover, .share-btn:hover {
    background: rgba(255,255,255,0.2);
}

.player-title {
    flex: 1;
    text-align: center;
}

.spot-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

/* 唱片 */
.vinyl-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex: 1;
}

.vinyl {
    width: 280px;
    height: 280px;
    position: relative;
}

.vinyl-record {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at center,
        #1a1a1a 0%,
        #2a2a2a 20%,
        #1a1a1a 21%,
        #2a2a2a 40%,
        #1a1a1a 41%,
        #2a2a2a 60%,
        #1a1a1a 61%,
        #2a2a2a 80%,
        #1a1a1a 81%,
        #2a2a2a 100%);
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.6),
        inset 0 0 30px rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: none;
}

.vinyl.playing .vinyl-record {
    animation: spin 8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vinyl-center {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #333;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

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

/* 歌词 */
.lyrics-container {
    height: 120px;
    overflow: hidden;
    text-align: center;
    margin: 20px 0;
    position: relative;
    mask-image: linear-gradient(transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(transparent, black 20%, black 80%, transparent); /* 微信/X5内核兼容 */
}

.lyrics-scroll {
    transition: transform 0.5s ease-out;
    padding: 40px 0;
}

.lyrics-line {
    padding: 8px 20px;
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    transition: all 0.3s;
    line-height: 1.8;
}

.lyrics-line.active {
    font-size: 16px;
    color: white;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.lyrics-placeholder {
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    padding: 50px 0;
}

/* 进度条 */
.progress-container {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding: 0 10px;
}

.time-current, .time-total {
    font-size: 12px;
    color: var(--text-secondary);
    width: 45px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 0 15px;
    position: relative;
    cursor: pointer;
    transition: height 0.2s;
}

.progress-bar:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    width: 0%;
    position: relative;
}

/* 白点跟随进度：left 由 JS 实时更新，translate(-50%) 居中在进度头 */
.progress-dot {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}

.progress-bar:hover .progress-dot,
.progress-bar:active .progress-dot {
    transform: translate(-50%, -50%) scale(1.3);
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.play-btn {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-size: 28px;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.play-btn:hover {
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.6);
}

.stop-btn {
    background: rgba(239, 68, 68, 0.2);
}

.stop-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* 语言切换器：放在player-header里，紧凑样式 */
.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 10;
    margin-left: 8px;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.1);
    padding: 6px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.15);
}

.lang-current:hover {
    background: rgba(255,255,255,0.25);
}

.lang-icon {
    font-size: 16px;
}

.lang-name {
    font-size: 13px;
    color: white;
    font-weight: 500;
}

.lang-arrow {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    transition: transform 0.3s;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    min-width: 140px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
    font-size: 14px;
}

.lang-option:hover {
    background: rgba(255,255,255,0.1);
}

.lang-option.active {
    background: rgba(37, 99, 235, 0.3);
}

.lang-option-icon {
    font-size: 18px;
}

.lang-option-name {
    flex: 1;
}

.lang-option-check {
    color: var(--primary);
    font-weight: bold;
}

/* 列表中语言标签 */
.audio-info {
    grid-column: 2;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    align-items: flex-start;
}

.audio-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.audio-langs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.lang-tag {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.lang-badge {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    align-self: center;
    font-size: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* 底部信息 */
.player-footer {
    margin-top: auto;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

.player-footer p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 480px) {
    .vinyl {
        width: 240px;
        height: 240px;
    }
    
    .vinyl-center {
        width: 130px;
        height: 130px;
    }
}
