/**
 * 短视频播放器 - 专业版样式
 * Short Video Player - Premium Style
 * Version: 2.0
 */

/* ============================================
   1. CSS 变量
   ============================================ */
:root {
    --primary-color: #ff2c65;
    --primary-light: #ff5c8a;
    --primary-gradient: linear-gradient(135deg, #ff2c65 0%, #ff6b8a 100%);
    --bg-dark: #000000;
    --bg-panel: #1a1a1a;
    --bg-input: rgba(255,255,255,0.08);
    --text-white: #ffffff;
    --text-gray: rgba(255,255,255,0.6);
    --text-muted: rgba(255,255,255,0.4);
    --border-color: rgba(255,255,255,0.1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --navbar-height: 44px;
    --tabbar-height: 56px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================
   2. 基础重置
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, textarea { font-family: inherit; outline: none; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ============================================
   3. 视频容器
   ============================================ */
.player-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

.video-wrapper {
    width: 100%;
    height: 100%;
    transition: transform var(--transition-slow);
    will-change: transform;
}

.video-item {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-dark);
}

.video-item video::-webkit-media-controls { display: none !important; }

/* ============================================
   4. 顶部状态栏
   ============================================ */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: calc(12px + var(--safe-area-top));
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
    pointer-events: none;
}

.status-bar > * { pointer-events: auto; }

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-badge {
    background: var(--primary-gradient);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-title {
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.status-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-btn {
    font-size: 20px;
    color: var(--text-white);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.status-btn:active { transform: scale(0.9); }

/* ============================================
   5. 右侧操作栏
   ============================================ */
.action-bar {
    position: fixed;
    right: 12px;
    bottom: 160px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-white);
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    transition: transform var(--transition-fast);
}

.action-item:active .action-icon { transform: scale(0.85); }

.action-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-white);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 头像 */
.action-avatar {
    position: relative;
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
}

.action-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    border: 2px solid var(--text-white);
    object-fit: cover;
}

.avatar-follow-btn {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.avatar-follow-btn.followed {
    background: #666;
}

/* 点赞激活 */
.action-item.liked .action-icon { color: var(--primary-color); }
.action-item.liked { animation: likeJump 0.4s ease; }

@keyframes likeJump {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* 收藏激活 */
.action-item.collected .action-icon { color: #ffc107; }

/* ============================================
   6. 音乐唱片
   ============================================ */
.music-disc {
    width: 48px;
    height: 48px;
    animation: discSpin 4s linear infinite;
    animation-play-state: paused;
}

.music-disc.playing { animation-play-state: running; }

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

.music-cover {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 8px solid #333;
    background: #111;
}

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

/* ============================================
   7. 底部信息区
   ============================================ */
.info-area {
    position: fixed;
    bottom: calc(var(--tabbar-height) + 10px);
    left: 0;
    right: 90px;
    z-index: 50;
    padding: 0 16px;
    pointer-events: none;
}

.info-username {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.info-desc {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.info-tags span {
    font-size: 13px;
    color: #ffe0b2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.info-music {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    overflow: hidden;
}

.music-icon { font-size: 14px; flex-shrink: 0; }

.music-name {
    white-space: nowrap;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.marquee-text {
    display: inline-block;
    animation: marquee 8s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   8. 进度条
   ============================================ */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 60;
    background: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: height var(--transition-fast);
}

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

.progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,0.3);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s;
}

.progress-played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--text-white);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
}

.progress-bar.dragging .progress-played { transition: none; }

/* ============================================
   9. 底部导航
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--tabbar-height);
    background: rgba(0,0,0,0.95);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-bottom: var(--safe-area-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 4px 12px;
    transition: color var(--transition-fast);
}

.nav-item.active { color: var(--text-white); }

.nav-item svg { width: 22px; height: 22px; }

.nav-publish { position: relative; top: -12px; }

.publish-btn {
    width: 48px;
    height: 34px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 300;
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(255,44,101,0.4);
}

/* ============================================
   10. 双击爱心动画
   ============================================ */
.double-tap-heart {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    filter: drop-shadow(0 2px 8px rgba(255,44,101,0.5));
}

.double-tap-heart.animate {
    animation: heartBurst 0.8s ease-out forwards;
}

@keyframes heartBurst {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-15deg); opacity: 1; }
    15% { transform: translate(-50%, -50%) scale(1.3) rotate(5deg); opacity: 1; }
    30% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8) rotate(0deg); opacity: 0; }
}

/* ============================================
   11. 暂停图标
   ============================================ */
.pause-icon {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 40;
    opacity: 0;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
}

.pause-icon.show {
    animation: pausePop 0.5s ease-out forwards;
}

@keyframes pausePop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ============================================
   12. 加载动画
   ============================================ */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;
    pointer-events: none;
    display: none;
}

.loading.show { display: block; }

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

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

/* ============================================
   13. 评论面板
   ============================================ */
.comment-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65vh;
    z-index: 200;
    background: var(--bg-panel);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.comment-panel.show { transform: translateY(0); }

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.comment-title {
    font-size: 16px;
    font-weight: 600;
}

.comment-close {
    width: 32px;
    height: 32px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.comment-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    -webkit-overflow-scrolling: touch;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-name {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.comment-action:active { opacity: 0.7; }

.comment-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    padding-bottom: calc(12px + var(--safe-area-bottom));
    border-top: 1px solid var(--border-color);
    background: var(--bg-panel);
}

.comment-input {
    flex: 1;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 16px;
    color: var(--text-white);
    font-size: 14px;
}

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

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

.comment-send {
    height: 40px;
    padding: 0 20px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    color: var(--text-white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.comment-send:disabled {
    background: #555;
    cursor: not-allowed;
}

/* ============================================
   14. 开启声音提示
   ============================================ */
.unmute-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 150;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.unmute-hint.show {
    opacity: 1;
    pointer-events: auto;
}

.unmute-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-white);
    animation: pulse 2s ease-in-out infinite;
}

.unmute-text {
    font-size: 14px;
    color: var(--text-white);
    font-weight: 500;
}

/* ============================================
   15. 分享面板
   ============================================ */
.share-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--bg-panel);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-area-bottom));
}

.share-panel.show { transform: translateY(0); }

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

.share-title {
    font-size: 16px;
    font-weight: 600;
}

.share-close {
    width: 32px;
    height: 32px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.share-option:active { opacity: 0.7; }

.share-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-white);
}

.share-icon.wechat { background: #07c160; }
.share-icon.moments { background: #07c160; }
.share-icon.weibo { background: #e6162d; }
.share-icon.qq { background: #12b7f5; }
.share-icon.link { background: #666; }

.share-label {
    font-size: 12px;
    color: var(--text-gray);
}

.share-cancel {
    width: 100%;
    height: 44px;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    font-size: 15px;
    color: var(--text-gray);
    cursor: pointer;
}

/* ============================================
   15. 搜索面板
   ============================================ */
.search-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    background: var(--bg-dark);
    transform: translateY(-100%);
    transition: transform var(--transition-normal);
}

.search-panel.show { transform: translateY(0); }

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-top: calc(12px + var(--safe-area-top));
    border-bottom: 1px solid var(--border-color);
}

.search-input-wrap {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 40px 0 16px;
    color: var(--text-white);
    font-size: 14px;
}

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

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

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.search-input:not(:placeholder-shown) + .search-clear { opacity: 1; }

.search-cancel {
    color: var(--text-white);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.search-body {
    padding: 16px;
    overflow-y: auto;
    height: calc(100% - 70px);
}

/* 搜索历史 */
.search-history {
    margin-bottom: 24px;
}

.search-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.search-history-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
}

.search-history-clear {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}

.search-history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-history-tag {
    padding: 6px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-gray);
    cursor: pointer;
}

/* 热门搜索 */
.search-hot-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.search-hot-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-hot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.search-hot-rank {
    width: 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

.search-hot-rank.top1 { color: #ff2c65; }
.search-hot-rank.top2 { color: #ff6b6b; }
.search-hot-rank.top3 { color: #ffc107; }

.search-hot-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-gray);
}

.search-hot-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255,44,101,0.2);
    color: var(--primary-color);
}

/* 搜索结果 */
.search-results { }

.search-result-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.search-result-item img {
    width: 100px;
    height: 140px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   16. Toast 提示
   ============================================ */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 999;
    background: rgba(0,0,0,0.85);
    color: var(--text-white);
    font-size: 14px;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    pointer-events: none;
    opacity: 0;
    transition: all var(--transition-fast);
    text-align: center;
    max-width: 80%;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   17. 遮罩层
   ============================================ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 190;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   18. 空状态
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================
   19. 全屏横屏模式
   ============================================ */

/* 全屏按钮 */
.fullscreen-btn {
    position: fixed;
    top: calc(12px + var(--safe-area-top));
    right: 16px;
    z-index: 101;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
}

.fullscreen-btn:active {
    transform: scale(0.9);
    background: rgba(0,0,0,0.7);
}

.fullscreen-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-white);
    transition: transform var(--transition-fast);
}

.fullscreen-btn.active svg {
    transform: rotate(180deg);
}

/* CSS模拟全屏模式 */
.pseudo-fullscreen {
    overflow: hidden;
}

.pseudo-fullscreen .player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

/* 横屏模式样式 */
.player-container.landscape-mode {
    transform: rotate(90deg);
    transform-origin: center center;
    width: 100vh;
    height: 100vw;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-left: -50vh;
    margin-top: -50vw;
}

/* 横屏时视频样式 */
.player-container.landscape-mode .video-item {
    width: 100vh;
    height: 100vw;
}

.player-container.landscape-mode .video-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 横屏时UI元素调整 */
.player-container.landscape-mode .status-bar {
    width: 100vh;
    transform: rotate(-90deg);
    transform-origin: left top;
    left: 0;
    top: 0;
}

.player-container.landscape-mode .action-bar {
    right: 20px;
    bottom: 100px;
    transform: rotate(-90deg);
    transform-origin: right bottom;
}

.player-container.landscape-mode .info-area {
    left: 20px;
    right: 120px;
    bottom: 20px;
    transform: rotate(-90deg);
    transform-origin: left bottom;
}

.player-container.landscape-mode .bottom-nav {
    display: none;
}

.player-container.landscape-mode .progress-bar {
    width: 100vh;
    transform: rotate(-90deg);
    transform-origin: left bottom;
    left: 0;
    bottom: 0;
}

.player-container.landscape-mode .fullscreen-btn {
    transform: rotate(-90deg);
    right: auto;
    left: 16px;
}

/* 全屏时隐藏底部导航 */
.player-container.landscape-mode .bottom-nav,
:fullscreen .bottom-nav {
    display: none !important;
}

/* 原生全屏时的横屏处理 */
:fullscreen .player-container,
:-webkit-full-screen .player-container,
:-moz-full-screen .player-container,
:-ms-fullscreen .player-container {
    width: 100vw;
    height: 100vh;
}

:fullscreen .video-item,
:-webkit-full-screen .video-item,
:-moz-full-screen .video-item,
:-ms-fullscreen .video-item {
    width: 100vw;
    height: 100vh;
}

/* 横屏时视频旋转适配 */
@media screen and (orientation: landscape) {
    .player-container.landscape-mode {
        transform: none;
        width: 100vw;
        height: 100vh;
        margin: 0;
        top: 0;
        left: 0;
    }

    .player-container.landscape-mode .video-item {
        width: 100vw;
        height: 100vh;
    }

    .player-container.landscape-mode .status-bar,
    .player-container.landscape-mode .action-bar,
    .player-container.landscape-mode .info-area,
    .player-container.landscape-mode .progress-bar,
    .player-container.landscape-mode .fullscreen-btn {
        transform: none;
    }

    .player-container.landscape-mode .status-bar {
        width: 100%;
    }

    .player-container.landscape-mode .action-bar {
        right: 12px;
        bottom: 100px;
    }

    .player-container.landscape-mode .info-area {
        left: 16px;
        right: 120px;
        bottom: 20px;
    }

    .player-container.landscape-mode .fullscreen-btn {
        right: 16px;
        left: auto;
    }
}

/* ============================================
   20. 响应式适配
   ============================================ */
@media (min-width: 768px) {
    .player-container {
        max-width: 420px;
        margin: 0 auto;
        border-left: 1px solid rgba(255,255,255,0.05);
        border-right: 1px solid rgba(255,255,255,0.05);
    }

    .bottom-nav,
    .status-bar {
        max-width: 420px;
        left: 50%;
        transform: translateX(-50%);
    }

    .comment-panel,
    .share-panel {
        max-width: 420px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
    }

    .comment-panel.show,
    .share-panel.show {
        transform: translateX(-50%) translateY(0);
    }

    .search-panel {
        max-width: 420px;
        left: 50%;
        transform: translateX(-50%) translateY(-100%);
    }

    .search-panel.show {
        transform: translateX(-50%) translateY(0);
    }

    /* 桌面端全屏按钮位置 */
    .fullscreen-btn {
        right: calc(50% - 194px);
    }
}
