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

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000; /* fallback */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    height: 100vh;
    overflow: hidden; /* prevent page scrolling */
}

.container {
    width: 100%;
    max-width: 1000px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 40px 15px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.player-wrapper:hover .controls,
.controls:hover {
    opacity: 1;
    pointer-events: auto;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2.5px;
    cursor: pointer;
    position: relative;
}

.progress-bar:hover {
    height: 8px;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    border-radius: 2.5px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

.controls-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 18px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;

.skip-btn {
    font-size: 12px;
    width: auto;
    padding: 6px 8px;
    min-width: 60px;
}
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

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

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.quality-selector {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
}

.quality-selector:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #667eea;
}

.quality-selector:focus {
    outline: none;
    border-color: #667eea;
}

.info-panel {
    padding: 20px;
    background: #2a2a2a;
    color: #fff;
}

.info-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.info-details {
    font-size: 13px;
    color: #aaa;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

.info-value {
    color: #fff;
    font-weight: 500;
}

.status-message {
    padding: 12px;
    background: rgba(102, 126, 234, 0.2);
    border-left: 3px solid #667eea;
    color: #667eea;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

.status-message.error {
    background: rgba(255, 77, 77, 0.2);
    border-left-color: #ff4d4d;
    color: #ff4d4d;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

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

@media (max-width: 768px) {
    .controls-bottom {
        gap: 8px;
    }

    .btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .quality-selector {
        min-width: 70px;
        padding: 4px 8px;
        font-size: 12px;
    }

    .volume-slider {
        width: 60px;
    }

    .time-display {
        font-size: 11px;
    }
}
