/* 视频播放页面样式 */

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-dark: #0f0f0f;
    --bg-sidebar: #1a1a1a;
    --bg-card: #242424;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #333333;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar {
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* 主容器 */
.demo-container {
    flex: 1;
    padding: 20px;
}

/* 前端提效龙虾横幅 */
.lobster-banner {
    max-width: 1600px;
    margin: 0 auto 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #ff9ff3 100%);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.lobster-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.lobster-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.lobster-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.lobster-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ff6b6b;
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.lobster-info {
    flex: 1;
}

.lobster-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lobster-title .highlight {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.lobster-title .badge {
    background: rgba(255, 255, 255, 0.95);
    color: #ff6b6b;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lobster-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    margin-bottom: 10px;
}

.lobster-desc .efficiency {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 14px;
    border-radius: 20px;
    margin-top: 6px;
    font-weight: 600;
}

.lobster-desc .efficiency strong {
    color: #fff;
    font-size: 1.2rem;
}

.lobster-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.lobster-status i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 响应式 */
@media (max-width: 768px) {
    .lobster-banner {
        padding: 18px 20px;
    }

    .lobster-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .lobster-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .lobster-title {
        font-size: 1.3rem;
        justify-content: center;
    }

    .lobster-desc {
        font-size: 0.9rem;
    }
}

.demo-header {
    max-width: 1600px;
    margin: 0 auto 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--border-radius);
}

.demo-header h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.demo-header h2 i {
    color: #fbbf24;
    margin-right: 8px;
}

.demo-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.video-layout {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    height: calc(100vh - 140px);
    min-height: 600px;
}

/* 左侧播放列表 */
.playlist-sidebar {
    background: var(--bg-sidebar);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.playlist-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.playlist {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: transparent;
}

.playlist::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 6px;
}

.playlist-item:hover {
    background: var(--bg-card);
}

.playlist-item.active {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary-color);
}

/* 二维码项特殊样式 */
.playlist-item.qrcode-item .item-thumbnail {
    background: linear-gradient(135deg, #fe2c55 0%, #ff6b6b 100%);
    color: white;
}

.playlist-item.qrcode-item.active .item-thumbnail {
    background: linear-gradient(135deg, #fe2c55 0%, #ff6b6b 100%);
}

.item-badge {
    background: linear-gradient(135deg, #fe2c55 0%, #ff6b6b 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.item-thumbnail {
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, #333, #444);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    position: relative;
    flex-shrink: 0;
}

.playlist-item.active .item-thumbnail {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.playlist-item:hover .play-icon {
    opacity: 1;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-duration {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 右侧播放区 */
.player-main {
    background: var(--bg-sidebar);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    position: relative;
    background: #000;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.video-wrapper:hover .video-overlay,
.video-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.big-play-btn {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.big-play-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
}

/* 视频详情 */
.video-details {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.video-header {
    margin-bottom: 12px;
}

.video-header h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.video-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.video-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.tech-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 播放控制区 */
.player-controls {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.progress-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-current,
.time-total {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
    min-width: 45px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    left: 0%;
    opacity: 0;
    transition: opacity 0.3s, left 0.1s linear;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

/* 二维码大图展示区域 */
.qrcode-viewer {
    background: #000;
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.qrcode-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qrcode-img-large {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-img-large img {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

/* 页脚 */
.footer {
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    padding: 16px;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 1024px) {
    .video-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .playlist-sidebar {
        max-height: 300px;
    }
    
    .video-wrapper {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .demo-container {
        padding: 10px;
    }

    .demo-header {
        padding: 16px;
        margin-bottom: 15px;
    }

    .demo-header h2 {
        font-size: 1.2rem;
    }

    .demo-header p {
        font-size: 0.85rem;
    }
    
    .player-controls {
        flex-wrap: wrap;
        padding: 12px;
    }
    
    .progress-wrapper {
        order: -1;
        width: 100%;
    }
    
    .video-details {
        padding: 16px;
    }
    
    .video-header h1 {
        font-size: 1.2rem;
    }
    
    .qrcode-viewer {
        min-height: 300px;
    }
    
    .qrcode-img-large img {
        max-height: 50vh;
    }
}
