/* Popup Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.popup-overlay.active {
    display: flex;
}

/* Popup Wrapper */
.popup-wrapper {
    position: relative;
    display: inline-block;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* Popup Container */
.popup-container {
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    margin: 20px;
    height: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Popup Content */
.popup-content {
    width: 100%;
}

/* Video Player */
.popup-video-player {
    position: relative;
    width: 100%;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.popup-video-player video {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.popup-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    padding: 15px 15px 10px 15px;
    gap: 10px;
    z-index: 10;
    pointer-events: none;
}

.popup-video-controls > * {
    pointer-events: auto;
}

.popup-video-mute {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.popup-video-mute:hover {
    opacity: 0.7;
}

.popup-video-progress-container {
    flex: 1;
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    margin: 0 10px;
}

.popup-video-progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
}

.popup-video-progress-filled {
    height: 100%;
    background: #dc3545;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}


/* Kapatma Butonu */
.popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    color: #dc3545;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin: 0;
    width: 45px;
    height: 45px;
    min-height: 45px;
    max-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.popup-close:hover {
    background: #dc3545;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.popup-close:active {
    transform: scale(0.95) rotate(90deg);
}

.popup-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

.popup-container.fadeIn {
    animation: fadeIn 0.5s ease;
}

.popup-container.slideDown {
    animation: slideDown 0.5s ease;
}

.popup-container.slideUp {
    animation: slideUp 0.5s ease;
}

.popup-container.zoomIn {
    animation: zoomIn 0.5s ease;
}

.popup-container.bounce {
    animation: bounce 0.8s ease;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .popup-container {
        max-width: 85%;
        margin: 15px;
    }
    
    .popup-wrapper {
        width: auto;
        max-width: 100%;
    }
}

/* Responsive - Mobil */
@media (max-width: 768px) {
    .popup-overlay {
        padding: 10px;
    }
    
    .popup-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .popup-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0;
        margin: 0;
        border-radius: 8px 8px 0 0;
    }
    
    .popup-close {
        width: 40px;
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        font-size: 24px;
        top: -12px;
        right: -12px;
    }
}

/* Responsive - Küçük Mobil */
@media (max-width: 480px) {
    .popup-overlay {
        padding: 5px;
        align-items: flex-end;
    }
    
    .popup-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .popup-container {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 95vh;
        margin: 0;
        border-radius: 12px 12px 0 0;
    }
    
    .popup-close {
        width: 35px;
        height: 35px;
        min-height: 35px;
        max-height: 35px;
        font-size: 20px;
        top: -10px;
        right: -10px;
    }
}
