/* style.css - MP4定点播放器样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    padding: 10px;
    overflow-x: hidden;
    touch-action: manipulation;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    margin: 0 auto;
}

/* 手机端视频容器 */
.video-container {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.1);
    touch-action: none;
}

.video-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: move;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
    transform-origin: 0 0;
    transition: transform 0.1s linear;
    position: absolute;
    top: 0;
    left: 0;
    cursor: move;
}

/* 隐藏所有播放器控件 */
#videoPlayer::-webkit-media-controls {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-enclosure {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-panel {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-play-button {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-timeline {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-current-time-display {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-mute-button {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-volume-slider {
    display: none !important;
}

#videoPlayer::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* 控制区域 */
.controls-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-section {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 22px;
    color: #4cc9f0;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.subtitle {
    color: #a0a0c0;
    font-size: 14px;
    margin-bottom: 15px;
}

.subtitle .highlight {
    color: #72efdd;
    font-weight: bold;
}

/* 时间显示 */
.time-display {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.time-display h3 {
    color: #4cc9f0;
    margin-bottom: 8px;
    font-size: 16px;
}

#currentTime {
    font-size: 20px;
    font-weight: bold;
    color: #72efdd;
    letter-spacing: 1px;
}

.microsecond {
    font-size: 12px;
    color: #aaa;
    margin-top: 5px;
    font-family: monospace;
}

/* 按钮组 */
.btn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.action-btn {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    border: none;
    padding: 16px 10px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 55px;
    touch-action: manipulation;
}

.action-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px rgba(67, 97, 238, 0.5);
}

.action-btn:hover {
    background: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
}

.action-btn.long-text {
    font-size: 15px;
    line-height: 1.2;
    padding: 12px 8px;
}

/* 状态显示 */
.status {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #72efdd;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

/* 控制提示 */
.control-hint {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #a0a0c0;
}

.control-hint h4 {
    color: #4cc9f0;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.control-hint ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.control-hint li {
    background: rgba(76, 201, 240, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.control-hint li::before {
    content: "✓ ";
    color: #72efdd;
}

/* 缩放级别显示 */
.zoom-level {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    color: #72efdd;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.zoom-level.show {
    opacity: 0.9;
}

/* 移动端触摸优化 */
.touch-indicator {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(76, 201, 240, 0.2);
    border: 2px solid #4cc9f0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: opacity 0.2s, transform 0.2s;
}

.touch-indicator.active {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
}

/* 响应式调整 */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .video-container {
        height: 50vh;
        min-height: 300px;
        border-radius: 15px;
    }
    
    .controls-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .btn-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .action-btn {
        padding: 14px 10px;
        font-size: 15px;
        min-height: 50px;
    }
    
    .time-display {
        padding: 12px;
    }
    
    #currentTime {
        font-size: 18px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
    
    .video-container {
        height: 65vh;
    }
}

@media (min-width: 1024px) {
    .container {
        flex-direction: row;
        max-width: 1200px;
        height: 90vh;
    }
    
    .video-container {
        height: 100%;
        flex: 3;
    }
    
    .controls-container {
        flex: 2;
        height: 100%;
        overflow-y: auto;
    }
    
    .btn-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 横屏模式 */
@media (orientation: landscape) and (max-height: 600px) {
    .container {
        flex-direction: row;
        height: 95vh;
    }
    
    .video-container {
        height: 100%;
        flex: 3;
    }
    
    .controls-container {
        flex: 2;
        height: 100%;
        overflow-y: auto;
    }
    
    .btn-grid {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        padding: 12px 8px;
        min-height: 45px;
        font-size: 14px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #4cc9f0;
    font-size: 16px;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #4cc9f0;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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