* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #0f0f0f;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

video {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

/* 중앙 재생/일시정지 아이콘 */
.center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.center-icon.show {
    opacity: 1;
}

.center-icon.animate {
    animation: scaleAnimation 0.3s ease;
}

@keyframes scaleAnimation {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* 볼륨 표시 */
.volume-display {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 15;
}

.volume-display.show {
    opacity: 1;
}

.volume-bar {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 5px;
}

.volume-fill {
    height: 100%;
    background: #ff0000;
    border-radius: 2px;
    width: 100%;
    transition: width 0.2s ease;
}

.volume-text {
    font-size: 12px;
    color: white;
}

/* 컨트롤 바 */
.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 20;
}

.controls.show {
    transform: translateY(0);
}

/* 진행률 바 */
.progress-container {
    position: relative;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.progress-bar:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: #ff0000;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.progress-handle {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

/* 시간 툴팁 */
.time-tooltip {
    position: absolute;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    z-index: 25;
}

.time-tooltip.show {
    opacity: 1;
}

.tooltip-thumbnail {
    width: 120px;
    height: 68px;
    background: #333;
    border-radius: 4px;
    margin-bottom: 5px;
}

.tooltip-time {
    text-align: center;
    font-weight: bold;
}

/* 하단 컨트롤 버튼들 */
.control-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 볼륨 컨트롤 */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider-container {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.volume-control:hover .volume-slider-container {
    width: 80px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 시간 표시 */
.time-display {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-family: 'Consolas', monospace;
}

.time-separator {
    margin: 0 5px;
    color: rgba(255, 255, 255, 0.7);
}

/* 로딩 스피너 */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 30;
}

.loading-spinner.show {
    opacity: 1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .video-container {
        max-width: 100%;
    }

    .left-controls {
        gap: 10px;
    }

    .control-btn {
        font-size: 16px;
        padding: 6px;
    }

    .time-display {
        font-size: 12px;
    }

    .volume-control:hover .volume-slider-container {
        width: 60px;
    }

    .volume-slider {
        width: 60px;
    }

    .center-icon {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
}

/* 재생 속도 컨트롤 */
.speed-control {
    position: relative;
    display: flex;
    align-items: center;
}

.speed-btn {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    min-width: 50px;
}

.speed-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.speed-slider-container {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.speed-slider-container.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.speed-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.speed-option {
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    user-select: none;
}

.speed-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.speed-option.active {
    background-color: #ff0000;
    color: white;
}

.speed-option.active:hover {
    background-color: #cc0000;
}

/* 풀스크린 모드 */
.video-container:fullscreen {
    border-radius: 0;
}

.video-container:-webkit-full-screen {
    border-radius: 0;
}

.video-container:-moz-full-screen {
    border-radius: 0;
}

/* 커서 숨김 (비활성 상태) */
.video-container.hide-cursor {
    cursor: none;
}

.video-container.hide-cursor video {
    cursor: none;
}

.video-container.hide-cursor .controls {
    cursor: default;
}