/* 全局样式 */
:root {
    --primary-color: #ff0050;
    --secondary-color: #00f2ea;
    --bg-dark: #161823;
    --bg-light: #252945;
    --text-primary: #ffffff;
    --text-secondary: #c0c0c0;
    --border-color: #373737;
    --hover-bg: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* 应用容器 */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
}

/* 顶部导航栏 */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(22, 24, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-color));
}

.nav-left h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-center {
    flex: 1;
    max-width: 400px;
    margin: 0 24px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 0, 80, 0.3);
}

.nav-right {
    display: flex;
    gap: 12px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.nav-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 80, 0.5);
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.video-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 80vh;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 加载动画 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    text-align: center;
}

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--text-primary);
    font-size: 14px;
}

/* 视频遮罩层 */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 120px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

/* 左侧视频信息 */
.video-info-left {
    position: absolute;
    bottom: 40px;
    left: 24px;
    pointer-events: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.user-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-details p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 右侧互动按钮 */
.video-actions-right {
    position: absolute;
    right: 24px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    pointer-events: auto;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.action-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.action-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 底部控制栏 */
.bottom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
}

.progress-container {
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.play-btn {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
}

.play-btn:hover {
    background: #ff3366;
}

/* 音量控制 */
.volume-control {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.volume-slider-container {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.9);
    padding: 8px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.volume-control:hover .volume-slider-container {
    opacity: 1;
    visibility: visible;
}

.volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
}

/* 侧边栏 */
.sidebar {
    width: 320px;
    background: rgba(22, 24, 35, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.video-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.video-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.video-item.active {
    background: rgba(255, 0, 80, 0.2);
    border: 1px solid var(--primary-color);
}

.video-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
}

.video-item-info {
    flex: 1;
}

.video-item-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-item-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 键盘提示 */
.keyboard-tips {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 12px;
    color: var(--text-secondary);
    z-index: 1000;
}

.tips-content {
    display: flex;
    gap: 16px;
}

.tips-content span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
    }
    
    .video-wrapper {
        max-width: 100%;
        height: 60vh;
    }
    
    .video-actions-right {
        right: 16px;
        bottom: 20px;
        gap: 16px;
    }
    
    .action-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* 全屏样式 */
.video-wrapper:fullscreen {
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.action-btn:active {
    animation: pulse 0.3s ease;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}