/* Modern Video Player Controls */

/* Suppress native browser video controls (iOS Safari, Chrome Android etc.) */
#video-player-wrapper video::-webkit-media-controls { display: none !important; }
#video-player-wrapper video::-webkit-media-controls-enclosure { display: none !important; }
#video-player-wrapper video::-webkit-media-controls-panel { display: none !important; }
#ad-container video::-webkit-media-controls { display: none !important; }
#ad-container video::-webkit-media-controls-enclosure { display: none !important; }
#ad-container video::-webkit-media-controls-panel { display: none !important; }

#video-player-wrapper .hidden {
    display: none !important;
}

.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    padding: 4px 4px 4px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.custom-video-controls.hidden-controls {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.hide-cursor {
    cursor: none;
}

/* Progress Bar */
.control-progress-wrapper {
    position: relative;
    margin-bottom: 6px;
    height: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.control-progress-bg {
    position: absolute;
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    overflow: hidden;
    top: 50%;
    transform: translateY(-50%);
    transition: height 0.15s ease;
}

.control-progress-buffered {
    position: absolute;
    height: 100%;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 2px;
    width: 0%;
    transition: width 0.2s ease;
}

.control-progress-played {
    position: absolute;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    background: #EF4444;
}

.control-progress-seek {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    z-index: 2;
}

.control-progress-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    opacity: 1;
    transition: transform 0.15s ease, width 0.15s ease, height 0.15s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.control-progress-seek::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    opacity: 1;
    transition: transform 0.15s ease, width 0.15s ease, height 0.15s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.control-progress-seek:active::-webkit-slider-thumb {
    transform: scale(1.5);
}

.control-progress-seek:active::-moz-range-thumb {
    transform: scale(1.5);
}

/* Control Buttons */
.control-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.control-buttons-left,
.control-buttons-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.15s ease;
    position: relative;
}

.control-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.18);
}

.control-icon {
    width: 20px;
    height: 20px;
    fill: white;
    stroke: white;
    stroke-width: 0;
}

.control-icon path {
  transform: scale(1.3);          /* veya 1.2 – 1.4 arası dene */
  transform-origin: center center;
}

.control-seek-label {
    font-size: 11px;
    font-weight: bold;
    position: absolute;
    bottom: 50%;
    transform: translateY(50%);
}

#rewind-btn .control-seek-label {
    right: 6px;
}

#forward-btn .control-seek-label {
    left: 6px;
}

/* Volume Control */
.control-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.control-volume-slider {
    width: 0;
    opacity: 0;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    cursor: pointer;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.control-volume-wrapper:hover .control-volume-slider {
    width: 80px;
    opacity: 1;
}

.control-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.control-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
}

/* Time Display */
.control-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Roboto Condensed', sans-serif;
    color: white;
    padding: 0 4px;
    user-select: none;
    letter-spacing: 0.02em;
}

.control-time-separator {
    opacity: 0.6;
}

/* Quality Selector */
.control-quality-wrapper {
    position: relative;
}

.control-quality-label {
    font-size: 12px;
    font-weight: 600;
    font-family: 'Roboto Condensed', sans-serif;
    margin-left: 2px;
    letter-spacing: 0.03em;
}

.control-quality-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    padding: 8px;
    bottom: 40px;
    min-width: 100px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index:100;
}

.quality-option {
    display: block;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: none;
    color: white;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.quality-option.active {
    background: var(--primary);
    color: #EF4444;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 640px) {
    .control-time {
        font-size: 12px;
    }

    .control-btn {
        padding: 6px;
    }

    .control-icon {
        width: 20px;
        height: 20px;
    }

    .control-volume-wrapper:hover .control-volume-slider {
        width: 60px;
    }

    .control-quality-label {
        display: none;
    }
}

/* Fullscreen Adjustments */
:fullscreen .custom-video-controls,
:-webkit-full-screen .custom-video-controls,
:-moz-full-screen .custom-video-controls {
    padding: 30px 20px 20px;
}

:fullscreen .control-btn,
:-webkit-full-screen .control-btn,
:-moz-full-screen .control-btn {
    padding: 10px;
}

:fullscreen .control-icon,
:-webkit-full-screen .control-icon,
:-moz-full-screen .control-icon {
    width: 22px;
    height: 22px;
}

/* Loading Spinner Overlay */
.video-spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 8; /* above video (0), below controls (10) */
    pointer-events: none;
}

.video-spinner-overlay.hidden {
    display: none !important;
}

/* Loading Spinner */
.video-loading.hidden {
    display: none !important;
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 5;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Skip Feedback Animation (Mobile Touch) */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* Big Play Button (Center) */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb, 233, 30, 99), 0.4);
}

.video-play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 32px rgba(var(--primary-rgb, 233, 30, 99), 0.6);
}

.video-play-overlay svg {
    width: 32px;
    height: 32px;
    fill: white;
    margin-left: 4px;
}

.video-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
