/* ===== POPUP SİSTEMİ - Premium Casino Theme ===== */

/* Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 3, 15, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99990;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.popup-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal kutusu */
.popup-modal {
    background: linear-gradient(170deg, #1e1445 0%, #130c2e 60%, #0d0820 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 
        0 30px 100px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(139, 92, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transform: scale(0.88) translateY(30px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    position: relative;
}

.popup-overlay.active .popup-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Üst parlama efekti */
.popup-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), rgba(168, 85, 247, 0.3), transparent);
    z-index: 2;
}

/* ===== Header ===== */
.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    position: relative;
}

.popup-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 22px;
    right: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.popup-header-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.popup-header-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
    animation: popupPulse 2s ease-in-out infinite;
}

@keyframes popupPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(139, 92, 246, 0.6); }
    50% { opacity: 0.6; box-shadow: 0 0 16px rgba(139, 92, 246, 0.8); }
}

.popup-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    font-size: 16px;
    line-height: 1;
}

.popup-close-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
    transform: rotate(90deg);
}

/* ===== Görsel Çerçevesi - Sabit boyut ===== */
.popup-image-frame {
    position: relative;
    margin: 14px 22px 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.12);
    /* Sabit en-boy oranı: 16:10 */
    aspect-ratio: 16 / 10;
}

/* Görsel konteyneri - Sabit çerçeve içinde tam oturma */
.popup-slide-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.popup-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.popup-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.popup-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.popup-slide a {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

/* Çerçeve iç gölgesi */
.popup-image-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    pointer-events: none;
    z-index: 2;
}

/* ===== Slider Navigasyon Okları ===== */
.popup-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(13, 10, 26, 0.75);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.25s ease;
    font-size: 18px;
    opacity: 0;
}

.popup-image-frame:hover .popup-nav-btn {
    opacity: 1;
}

.popup-nav-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.5);
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}

.popup-nav-prev {
    left: 8px;
}

.popup-nav-next {
    right: 8px;
}

/* ===== Slide Counter Badge ===== */
.popup-slide-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(13, 10, 26, 0.75);
    backdrop-filter: blur(4px);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 5;
    letter-spacing: 0.5px;
}

/* ===== İçerik Alanı ===== */
.popup-content {
    padding: 18px 22px 8px;
    text-align: center;
}

.popup-content-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.popup-content-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

/* ===== Dots ===== */
.popup-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 4px;
}

.popup-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-dot.active {
    background: #8b5cf6;
    width: 20px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.popup-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== Footer Butonlar ===== */
.popup-footer {
    padding: 12px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popup-visit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Rubik', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.popup-visit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transition: left 0.5s ease;
}

.popup-visit-btn:hover::before {
    left: 100%;
}

.popup-visit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.popup-dismiss-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Rubik', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.popup-dismiss-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
    color: rgba(239, 68, 68, 0.7);
}

/* ===== Entrance Animation ===== */
@keyframes popupSlideIn {
    from {
        transform: scale(0.88) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .popup-overlay {
        padding: 16px;
        align-items: center;
    }

    .popup-modal {
        max-width: 100%;
        border-radius: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .popup-image-frame {
        margin: 12px 16px 0;
        border-radius: 12px;
    }

    .popup-content {
        padding: 14px 16px 6px;
    }

    .popup-footer {
        padding: 10px 16px 20px;
    }

    .popup-content-title {
        font-size: 15px;
    }

    .popup-nav-btn {
        opacity: 1;
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 380px) {
    .popup-modal {
        max-height: 85vh;
    }

    .popup-image-frame {
        aspect-ratio: 16 / 11;
    }
}
