
/* 基础样式 */

.video-container {
    position: relative;
    max-width: 55vw;
    margin: 20px auto;
    background: #000;
    user-select: none;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 或 cover，根据需要选择 */
    cursor: auto;
    /* 初始鼠标指针 */
    user-select: none;
}

.video-player.hide-cursor {
    cursor: none;
    /* 隐藏鼠标指针 */
}

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s;
    user-select: none;
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.play-btn,
.mute-btn,
.fullscreen-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    user-select: none;
}

.progress-container {
    flex-grow: 1;
    height: 5px;
    background: #404040;
    cursor: pointer;
    margin: 0 10px;
    user-select: none;
    /* 禁止选中 */
}

.progress-bar {
    height: 100%;
    background: #ff0000;
    width: 0;
    position: relative;
    user-select: none;
}

.time-display {
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
    user-select: none;
}

.volume-slider {
    width: 100px;
    height: 5px;
    -webkit-appearance: none;
    background: #404040;
    outline: none;
    user-select: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
}

.speed-select {
    background: #404040;
    color: white;
    border: none;
    padding: 5px;
    border-radius: 4px;
    margin-right: 10px;
    user-select: none;
}

/* 锁定按钮 */
.lock-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.lock-btn.active {
    background: var(--accent-color);
    transform: translateY(-50%) rotate(45deg);
}

.lock-btn:hover {
    background: rgba(255,255,255,0.2);
}


/* 隐藏右键菜单 */
.context-menu {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 5px;
    border-radius: 5px;
    z-index: 10;
    display: none;
    /* 初始状态隐藏 */
    user-select: none;
}

.context-menu li {
    list-style: none;
    padding: 5px 10px;
    cursor: pointer;
    user-select: none;
}

.context-menu li:hover {
    background-color: #555;
    user-select: none;
}

.hidden {
    opacity: 0;
}

/* 快捷键提示 */
.shortcut-tip {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 10;
    display: none;
    user-select: none;
}

/* 全屏提示 */
.fullscreen-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10;
    display: none;
    user-select: none;
}

/* 全屏模式下的视频容器样式 */
.video-container:-webkit-full-screen {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    user-select: none;
}

.video-container:-moz-full-screen {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    user-select: none;
}

.video-container:fullscreen {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    user-select: none;
}

/* 媒体查询，针对小屏幕设备 */
@media (max-width: 600px) {
    .video-container {
        max-width: 100vw;
        margin: 10px auto;
        user-select: none;
    }

    .custom-controls {
        padding: 5px;
        user-select: none;
    }

    .controls-row {
        flex-wrap: wrap;
        justify-content: center;
        user-select: none;
    }

    .play-btn,
    .mute-btn,
    .fullscreen-btn {
        font-size: 18px;
        padding: 5px;
        user-select: none;
    }

    .volume-slider {
        width: 80px;
        user-select: none;
    }

    .speed-select {
        padding: 3px;
        font-size: 12px;
        user-select: none;
        width: 60px;
    }

    .time-display {
        font-size: 12px;
        user-select: none;
    }

    /* 在小屏幕上隐藏音量控制 */
    .mute-btn,
    .volume-slider {
        display: none;
        user-select: none;
    }
}


/* 加载指示器样式 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    width: 180px;
    text-align: center;
}

.loading-indicator.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ff6b6b;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.speed-text {
    color: #f8f9fa;
    font-size: 14px;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.speed-value {
    color: #ffd43b;
    font-weight: bold;
}

/* 调整现有样式，确保加载指示器不被遮挡 */
.video-container {
    position: relative;
    overflow: hidden;
}

.custom-controls {
    z-index: 99; /* 确保控制栏在加载指示器下方 */
}

.shortcut-tip {
    z-index: 101; /* 确保提示在加载指示器上方 */
}