.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    background: rgba(8, 6, 6, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    cursor: pointer; /* overlay tıklanabilir hissi */
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.video-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

/* Video container — 16:9 oranlı kutu */
.video-modal__container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.96) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default; /* video alanı tıklanabilir değil */
}

.video-modal.is-open .video-modal__container {
    transform: scale(1) translateY(0);
}

/* Kapat butonu (sağ üst — container DIŞINDA) */
.video-modal__close {
    position: absolute;
    top: clamp(12px, 2vw, 24px);
    right: clamp(12px, 2vw, 24px);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.video-modal__close:hover {
    background: rgba(210, 217, 69, 0.15);
    border-color: #d2d945;
    transform: rotate(90deg);
}

.video-modal__close:focus-visible {
    outline: 2px solid #d2d945;
    outline-offset: 2px;
}

.video-modal__close svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* ============ LOADING / SPINNER ============ */
.video-modal__loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: rgba(255, 255, 255, 0.65);
    z-index: 2;
    background: #000;
    transition: opacity 0.4s ease;
}

.video-modal__loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Dual-ring spinner (modern görünüm) */
.video-modal__spinner {
    position: relative;
    width: 68px;
    height: 68px;
}

/* Dış halka — soluk arkaplan */
.video-modal__spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.08);
}

/* Dönen üst halka — marka rengi */
.video-modal__spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #d2d945;
    border-right-color: #d2d945;
    animation: video-spin 0.9s cubic-bezier(0.4, 0.1, 0.6, 0.9) infinite;
}

@keyframes video-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.video-modal__loader-text {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
}

/* Yazının yanındaki "..." animasyonu */
.video-modal__loader-text::after {
    content: '';
    display: inline-block;
    width: 1.2em;
    text-align: left;
    animation: video-dots 1.4s steps(4, end) infinite;
}

@keyframes video-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}

/* ============ IFRAME ============ */
.video-modal__frame {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease 0.1s;
}

.video-modal__frame.is-visible {
    opacity: 1;
}

.video-modal__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Body scroll lock */
body.video-modal-open {
    overflow: hidden;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 576px) {
    .video-modal {
        padding: 0;
    }
    .video-modal__container {
        border-radius: 0;
        max-width: none;
    }
    .video-modal__close {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }
    .video-modal__spinner {
        width: 56px;
        height: 56px;
    }
}

/* Reduced motion: spinner yavaşlasın, geçişler kapansın */
@media (prefers-reduced-motion: reduce) {
    .video-modal,
    .video-modal__container,
    .video-modal__frame,
    .video-modal__close {
        transition: none;
    }
    .video-modal__spinner::after {
        animation-duration: 2.5s;
    }
}