.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 10, 25, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: popupFadeIn 0.4s ease;
}

.popup-overlay.hidden { display: none; }

.popup-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(145deg, rgba(15, 25, 50, 0.98), rgba(10, 15, 30, 0.98));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 212, 255, 0.15);
    animation: popupSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-close {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.4);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.popup-close:hover {
    background: rgba(211, 47, 47, 0.6);
    border-color: #ff6b6b;
}

.popup-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.popup-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(10, 15, 30, 0.95));
}

.popup-image-default {
    background: linear-gradient(135deg, var(--popup-accent, #00d4ff), #1a237e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.popup-body {
    padding: 1.5rem;
    text-align: center;
}

.popup-subtitle {
    display: block;
    font-size: 0.8rem;
    color: var(--popup-accent, var(--accent-cyan));
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.popup-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.popup-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.popup-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.popup-btn {
    display: block;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
}

.popup-btn-primary {
    background: linear-gradient(135deg, var(--popup-accent, #00d4ff), #0099cc);
    color: #0a0e1a;
}

.popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.popup-btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
    .popup-modal { max-width: 100%; border-radius: 16px; }
    .popup-image { height: 140px; }
    .popup-title { font-size: 1.2rem; }
}
