* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00a1d6;
    --bg-dark: #1a1a1a;
    --bg-darker: #0f0f0f;
    --text-light: #ffffff;
    --text-gray: #888888;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 控制面板 */
.control-panel {
    background: var(--bg-dark);
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    z-index: 100;
}

.control-panel h1 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-group input {
    flex: 1;
    padding: 8px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-group button,
.controls button {
    padding: 8px 16px;
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.input-group button:hover,
.controls button:hover {
    background: #00b5e5;
}

.source-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tab-btn {
    padding: 6px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 12px;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.video-info {
    background: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.video-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-gray);
}

.sync-status {
    color: #4caf50;
}

.sync-status.syncing {
    color: #ff9800;
}

.controls {
    display: flex;
    gap: 10px;
}

/* 视频播放器 */
.player-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 180px);
}

/* 加载动画 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* 进度条 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-dark);
    border-top: 1px solid #333;
}

.progress-bar {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #333;
    border-radius: 3px;
    cursor: pointer;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.progress-bar::-webkit-slider-thumb:hover {
    background: #00b5e5;
}

#currentTime,
#duration {
    font-size: 12px;
    color: var(--text-gray);
    min-width: 45px;
}

/* 全屏模式 */
.fullscreen .control-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    transform: translateY(-100%);
    transition: transform 0.3s;
}

.fullscreen:hover .control-panel {
    transform: translateY(0);
}

.fullscreen .progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
}
