/* ========================================
   Player App Styles
   音声プレイヤー - 黄昏夕暮れテーマ
   ======================================== */

/* ========================================
   播放器主容器
   ======================================== */
.player-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    position: relative;
}

/* 播放器app时，移除app-content的padding */
.app-content:has(.player-app) {
    padding: 0;
}

/* ========================================
   曲目列表视图
   ======================================== */
.player-track-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.player-album-header {
    text-align: center;
    padding: 20px 16px 28px;
    position: relative;
}

/* 封面容器 */
.player-cover-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 20px;
}

.player-cover {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* 封面光晕 */
.player-cover-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(
        circle at center,
        rgba(232, 148, 90, 0.2) 0%,
        rgba(212, 112, 122, 0.1) 40%,
        transparent 70%
    );
    filter: blur(20px);
    z-index: -1;
    animation: coverGlow 4s ease-in-out infinite alternate;
}

@keyframes coverGlow {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

.player-album-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.player-album-artist {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* 曲目列表标题 */
.player-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.player-list-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--sunset-orange);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.player-track-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* 曲目卡片 */
.player-track-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin: 0 12px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.player-track-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(232, 148, 90, 0.1) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-track-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(232, 148, 90, 0.2);
    transform: translateX(4px);
}

.player-track-item:hover::before {
    opacity: 1;
}

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

/* 当前播放 */
.player-track-item.playing {
    background: rgba(232, 148, 90, 0.1);
    border-color: rgba(232, 148, 90, 0.3);
}

.player-track-item.playing .player-track-number {
    color: var(--sunset-orange);
}

/* 有播放进度 */
.player-track-item.has-progress {
    border-left: 3px solid var(--sunset-orange);
}

/* 曲目编号 */
.player-track-number {
    width: 28px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* 播放中的动画指示器 */
.player-track-item.playing .player-track-number {
    display: none;
}

.player-now-playing-indicator {
    display: none;
    width: 28px;
    height: 16px;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    flex-shrink: 0;
}

.player-track-item.playing .player-now-playing-indicator {
    display: flex;
}

.player-now-playing-indicator span {
    width: 3px;
    background: var(--sunset-orange);
    border-radius: 1px;
    animation: soundWave 1s ease-in-out infinite;
}

.player-now-playing-indicator span:nth-child(1) {
    height: 8px;
    animation-delay: 0s;
}

.player-now-playing-indicator span:nth-child(2) {
    height: 12px;
    animation-delay: 0.15s;
}

.player-now-playing-indicator span:nth-child(3) {
    height: 6px;
    animation-delay: 0.3s;
}

@keyframes soundWave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

/* 曲目信息 */
.player-track-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.player-track-title-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.player-track-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-track-name-zh {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.player-track-duration {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* 播放进度提示 */
.player-track-progress-hint {
    font-size: 11px;
    color: var(--sunset-orange);
    margin-top: 2px;
}

/* ========================================
   播放器视图（播放中界面）
   ======================================== */
.player-now-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: rgba(22, 18, 28, 0.98);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    z-index: 200;
    transform: translateY(100%);
    opacity: 0;
    /* 安全区域适配 - 确保顶部有足够空间避开状态栏 */
    padding-top: max(50px, env(safe-area-inset-top, 50px));
    padding-bottom: env(safe-area-inset-bottom, 0);
    transition:
        transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
        opacity 0.4s ease;
}

.player-now-view.active {
    transform: translateY(0);
    opacity: 1;
}

/* 播放器顶部栏 */
.player-now-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.player-minimize-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.player-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.player-minimize-btn svg {
    width: 22px;
    height: 22px;
}

.player-now-track-info {
    flex: 1;
    min-width: 0;
}

.player-now-track-num {
    font-size: 11px;
    color: var(--sunset-orange);
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.player-now-track-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-history-btn {
    padding: 8px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.player-history-btn:hover {
    background: rgba(232, 148, 90, 0.2);
    color: var(--sunset-orange);
}

/* 封面区域 */
.player-now-cover-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    position: relative;
    overflow: visible;
    min-height: 0;
}

/* 背景模糊封面 - 已禁用 */
.player-now-cover-bg {
    display: none;
}

/* 夕暮れ渐变叠加 - 已禁用 */
.player-now-cover-area::after {
    display: none;
}

/* 封面容器 - 包含倒影 */
.player-now-cover-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-now-cover-img {
    width: min(280px, 55vw);
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: min(280px, 55vw);
    border-radius: 16px;
    object-fit: contain;
    -o-object-fit: contain;
    object-position: center center;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.6),
        0 8px 20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

/* 封面倒影效果 - 已禁用 */
.player-cover-reflection {
    display: none;
}

.player-cover-reflection img {
    width: 100%;
    height: min(280px, 55vw);
    object-fit: contain;
    object-position: center bottom;
}

.player-now-view.playing .player-now-cover-img {
    animation: coverPulse 4s ease-in-out infinite;
}

@keyframes coverPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ========================================
   字幕区域
   ======================================== */
.player-subtitle-area {
    position: relative;
    z-index: 10;
    padding: 12px 20px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(22, 18, 28, 0.9);
}

/* 说话人容器 - 包含头像和名字 */
.player-subtitle-speaker-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-subtitle-speaker-wrapper.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 说话人头像 - 圆形证件照风格 */
.player-speaker-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    background: rgba(26, 21, 32, 0.5);
}

.player-speaker-avatar[data-speaker="松江"] {
    border-color: rgba(232, 148, 90, 0.6);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 0 8px rgba(232, 148, 90, 0.2);
}

.player-speaker-avatar[data-speaker="暴徒"] {
    border-color: rgba(212, 96, 106, 0.6);
}

.player-speaker-avatar[data-speaker="高桥"] {
    border-color: rgba(139, 107, 138, 0.6);
}

.player-subtitle-speaker {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

/* 说话人颜色 */
.player-subtitle-speaker[data-speaker="松江"] {
    color: #e8945a;
    background: rgba(232, 148, 90, 0.15);
}

.player-subtitle-speaker[data-speaker="暴徒"] {
    color: #d4606a;
    background: rgba(212, 96, 106, 0.15);
}

.player-subtitle-speaker[data-speaker="高桥"] {
    color: #8b6b8a;
    background: rgba(139, 107, 138, 0.15);
}

/* 字幕文本 - 电影字幕风格（直接切换，无动画） */
.player-subtitle-cn {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    max-width: 600px;
    opacity: 0;
    text-shadow:
        0 0 8px rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.9),
        1px 1px 2px rgba(0, 0, 0, 0.8);
}

.player-subtitle-cn.visible {
    opacity: 1;
}

.player-subtitle-jp {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    max-width: 600px;
    opacity: 0;
    text-shadow:
        0 0 6px rgba(0, 0, 0, 0.8),
        0 1px 3px rgba(0, 0, 0, 0.9);
}

.player-subtitle-jp.visible {
    opacity: 0.75;
}

/* ========================================
   播放控制区
   ======================================== */
.player-controls-area {
    padding: 12px 20px 16px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0) + 16px);
    background: rgba(26, 21, 32, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

/* 进度条容器 */
.player-progress-container {
    margin-bottom: 12px;
    position: relative;
}

.player-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    overflow: visible;
    /* 增加触摸区域 */
    padding: 12px 0;
    margin: -12px 0;
    box-sizing: content-box;
    background-clip: content-box;
    touch-action: none;
}

.player-progress-bar:hover,
.player-progress-bar.dragging {
    height: 8px;
    margin-top: -13px;
    margin-bottom: -13px;
}

.player-progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--sunset-orange) 0%,
        var(--sunset-pink) 100%
    );
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

/* 进度条拖动手柄 */
.player-progress-handle {
    position: absolute;
    top: 50%;
    right: -7px;
    width: 14px;
    height: 14px;
    background: var(--text-primary);
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.player-progress-bar:hover .player-progress-handle,
.player-progress-bar.dragging .player-progress-handle {
    transform: translateY(-50%) scale(1);
}

/* 时间预览气泡 */
.player-time-tooltip {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateX(-50%);
    background: rgba(30, 25, 38, 0.95);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-variant-numeric: tabular-nums;
    z-index: 10;
}

.player-time-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(30, 25, 38, 0.95);
}

.player-progress-bar:hover .player-time-tooltip,
.player-progress-bar.dragging .player-time-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 时间显示 */
.player-time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

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

.player-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.player-ctrl-btn svg {
    width: 26px;
    height: 26px;
}

.player-ctrl-btn:hover {
    color: var(--sunset-orange);
    transform: scale(1.1);
}

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

/* 上一曲/下一曲 */
.player-skip-btn {
    width: 48px;
    height: 48px;
}

/* 快退/快进 */
.player-seek-btn {
    width: 44px;
    height: 44px;
    opacity: 0.8;
}

.player-seek-btn svg {
    width: 22px;
    height: 22px;
}

/* 播放/暂停按钮 */
.player-play-btn {
    width: 64px;
    height: 64px;
    background: linear-gradient(
        135deg,
        var(--sunset-orange) 0%,
        var(--sunset-pink) 100%
    );
    color: var(--bg-deep);
    box-shadow:
        0 8px 24px rgba(232, 148, 90, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.player-play-btn:hover {
    color: var(--bg-deep);
    transform: scale(1.08);
    box-shadow:
        0 12px 32px rgba(232, 148, 90, 0.5),
        0 6px 16px rgba(0, 0, 0, 0.25);
}

.player-play-btn svg {
    width: 28px;
    height: 28px;
}

/* ========================================
   字幕回看面板
   ======================================== */
.player-history-panel {
    position: absolute;
    inset: 0;
    background: rgba(18, 14, 24, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    transition:
        transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
        opacity 0.35s ease;
    /* 顶部安全区域，避免和状态栏重叠 */
    padding-top: max(20px, env(safe-area-inset-top, 20px));
}

.player-history-panel.active {
    transform: translateX(0);
    opacity: 1;
}

.player-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-history-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--sunset-orange);
    letter-spacing: 1px;
}

.player-history-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.player-history-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* 字幕搜索框 */
.player-history-search {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.player-search-input {
    width: 100%;
    padding: 10px 14px;
    padding-left: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.player-search-input::placeholder {
    color: var(--text-muted);
}

.player-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(232, 148, 90, 0.4);
    box-shadow: 0 0 0 3px rgba(232, 148, 90, 0.1);
}

.player-search-wrapper {
    position: relative;
}

.player-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.player-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.player-search-wrapper.has-value .player-search-clear {
    opacity: 1;
}

.player-search-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.player-search-results-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    padding-left: 4px;
}

.player-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.player-history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    font-size: 14px;
}

.player-history-item {
    padding: 14px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-history-item:hover {
    background: rgba(232, 148, 90, 0.1);
    border-color: rgba(232, 148, 90, 0.2);
}

.player-history-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.player-history-speaker {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 8px;
    display: inline-block;
}

.player-history-speaker[data-speaker="松江"] {
    color: #e8945a;
    background: rgba(232, 148, 90, 0.15);
}

.player-history-speaker[data-speaker="暴徒"] {
    color: #d4606a;
    background: rgba(212, 96, 106, 0.15);
}

.player-history-speaker[data-speaker="高桥"] {
    color: #8b6b8a;
    background: rgba(139, 107, 138, 0.15);
}

/* 搜索高亮 */
.player-history-highlight {
    background: rgba(232, 148, 90, 0.3);
    color: var(--text-primary);
    padding: 0 2px;
    border-radius: 2px;
}

.player-history-cn {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 4px;
}

.player-history-jp {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========================================
   Mini播放器（底部悬浮）
   ======================================== */
.player-mini {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0) + 50px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: calc(100% - 32px);
    max-width: 400px;
    background: rgba(30, 25, 38, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    opacity: 0;
    transition:
        transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
        opacity 0.4s ease;
    z-index: 1000;
}

.player-mini.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.player-mini-cover {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.player-mini-info {
    flex: 1;
    min-width: 0;
}

.player-mini-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.player-mini-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-mini-play {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sunset-orange);
    border-radius: 50%;
    color: var(--bg-deep);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.player-mini-play:hover {
    transform: scale(1.1);
}

.player-mini-play svg {
    width: 20px;
    height: 20px;
}

.player-mini-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.player-mini-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.player-mini-close svg {
    width: 14px;
    height: 14px;
}

/* Mini播放器进度条 */
.player-mini-progress {
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}

.player-mini-progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--sunset-orange) 0%,
        var(--sunset-pink) 100%
    );
    width: 0%;
    transition: width 0.1s linear;
}

/* ========================================
   响应式适配
   ======================================== */

/* 手机端布局优化 - 字幕与封面完全分离 */
@media (max-width: 768px) {
    .player-now-cover-area {
        flex: 1;
        padding: 10px 20px 5px;
        justify-content: center;
        min-height: 0;
    }

    .player-now-cover-img {
        width: min(200px, 45vw);
        height: auto;
        max-height: min(200px, 45vw);
    }

    .player-subtitle-area {
        flex: 0 0 auto;
        min-height: 80px;
        padding: 12px 20px;
        justify-content: flex-start;
        padding-top: 16px;
        overflow: hidden;
    }

    .player-subtitle-speaker-wrapper {
        margin-bottom: 8px;
    }

    .player-speaker-avatar {
        width: 28px;
        height: 28px;
    }

    .player-subtitle-cn {
        font-size: 16px;
        line-height: 1.5;
    }

    .player-subtitle-jp {
        font-size: 12px;
        margin-top: 4px;
    }

    .player-controls-area {
        flex-shrink: 0;
        padding: 10px 20px 16px;
    }
}

@media (max-width: 380px) {
    .player-now-cover-img {
        width: min(220px, 60vw);
        height: min(220px, 60vw);
    }

    .player-subtitle-cn {
        font-size: 16px;
    }

    .player-main-controls {
        gap: 16px;
    }

    .player-play-btn {
        width: 56px;
        height: 56px;
    }

    .player-skip-btn {
        width: 42px;
        height: 42px;
    }
}

/* 手机端安全区适配 */
@supports (padding: max(0px)) {
    .player-controls-area {
        padding-bottom: max(24px, env(safe-area-inset-bottom) + 16px);
    }

    .player-mini {
        bottom: max(50px, env(safe-area-inset-bottom) + 50px);
    }
}

/* ========================================
   加载状态
   ======================================== */
.player-loading {
    opacity: 0.6;
    pointer-events: none;
}

.player-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--sunset-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   播放速度控制
   ======================================== */
.player-speed-btn {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
}

.player-speed-btn:hover {
    background: rgba(232, 148, 90, 0.2);
    color: var(--sunset-orange);
}

.player-speed-btn.active {
    background: rgba(232, 148, 90, 0.25);
    color: var(--sunset-orange);
}

/* 字幕模式切换按钮 */
.player-subtitle-mode-wrapper {
    position: relative;
}

.player-subtitle-mode-btn {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
}

.player-subtitle-mode-btn:hover {
    background: rgba(232, 148, 90, 0.2);
    color: var(--sunset-orange);
}

/* 速度选择菜单 */
.player-speed-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(30, 25, 38, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 8px;
    min-width: 100px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.player-speed-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.player-speed-option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    background: transparent;
    border-radius: 8px;
    text-align: center;
    transition: all 0.15s ease;
}

.player-speed-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.player-speed-option.active {
    background: rgba(232, 148, 90, 0.2);
    color: var(--sunset-orange);
}

/* 辅助控制行 */
.player-aux-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 4px;
}

.player-aux-left,
.player-aux-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-speed-wrapper {
    position: relative;
}
