/* ===================================================================
   ELEGANT POPUP ADVERTISEMENT - SOPHISTICATED & LUXURIOUS
   ================================================================= */

/* Popup Overlay */
.popup-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.popup-container {
    animation-duration: 0.6s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.popup-overlay:not(.show) .popup-container {
    animation-name: popupSlideOut;
}

.popup-overlay.show .popup-container {
    animation-name: popupSlideIn;
}

/* Popup Content */
.popup-content {
    background: linear-gradient(135deg, #171717 0%, #262626 50%, #171717 100%);
    border: 1px solid rgba(131, 255, 101, 0.1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: scale(1);
    transition: all 0.3s ease;
}

.popup-content:hover {
    box-shadow:
        0 35px 60px -12px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(131, 255, 101, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Close Button */
.popup-close-btn {
    background: rgba(38, 38, 38, 0.9);
    border: 1px solid rgba(115, 115, 115, 0.3);
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-close-btn:hover {
    background: rgba(64, 64, 64, 0.9);
    border-color: rgba(131, 255, 101, 0.5);
    transform: rotate(90deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.popup-close-btn:focus {
    box-shadow: 0 0 0 3px rgba(131, 255, 101, 0.3);
}

/* Header Styling */
.popup-header {
    position: relative;
    overflow: hidden;
}

.popup-glow {
    animation: glowPulse 3s ease-in-out infinite alternate;
}

.popup-logo-container {
    transition: all 0.4s ease;
}

.popup-logo-container:hover {
    transform: rotate(2deg);
}

.popup-logo-container > div {
    background: linear-gradient(135deg, #83ff65 0%, #49ca00 100%);
    position: relative;
    overflow: hidden;
}

.popup-logo-container > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

.popup-title {
    background: linear-gradient(135deg, #83ff65 0%, #ffffff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 4px 8px rgba(131, 255, 101, 0.2);
    animation: titleFloat 4s ease-in-out infinite;
}

/* Body Content */
.popup-body {
    position: relative;
}

.popup-features {
    position: relative;
}

.feature-item {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInFeature 0.6s ease forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }

.feature-icon {
    background: linear-gradient(135deg, #83ff65 0%, #49ca00 100%);
    box-shadow: 0 4px 8px rgba(131, 255, 101, 0.3);
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: rotate(360deg);
    box-shadow: 0 6px 12px rgba(131, 255, 101, 0.5);
}

/* CTA Buttons */
.popup-btn-primary {
    background: linear-gradient(135deg, #83ff65 0%, #49ca00 100%);
    position: relative;
    overflow: hidden;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px rgba(131, 255, 101, 0.3);
}

.popup-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.popup-btn-primary:hover::before {
    left: 100%;
}

.popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(131, 255, 101, 0.4);
}

.popup-btn-primary:active {
    transform: translateY(0);
}

.popup-btn-secondary {
    background: rgba(38, 38, 38, 0.5);
    border: 2px solid rgba(115, 115, 115, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(131, 255, 101, 0.1), rgba(73, 202, 0, 0.1));
    transition: width 0.3s ease;
    z-index: -1;
}

.popup-btn-secondary:hover::before {
    width: 100%;
}

.popup-btn-secondary:hover {
    border-color: #83ff65;
    color: #83ff65;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(131, 255, 101, 0.2);
}

/* Decorative Elements */
.popup-decorations {
    pointer-events: none;
}

.popup-decorations > div {
    animation: floatDecoration 6s ease-in-out infinite alternate;
}

.popup-decorations > div:last-child {
    animation-delay: -3s;
}

/* ===================================================================
   ANIMATIONS & KEYFRAMES
   ================================================================= */

@keyframes popupSlideIn {
    0% {
        opacity: 0;
        transform: translate3d(0, 50px, 0) scale(0.9);
    }
    50% {
        opacity: 0.8;
        transform: translate3d(0, -10px, 0) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes popupSlideOut {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -50px, 0) scale(0.9);
    }
}

@keyframes glowPulse {
    0% {
        opacity: 0.2;
        transform: scaleX(0.8);
    }
    100% {
        opacity: 0.4;
        transform: scaleX(1.2);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes slideInFeature {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatDecoration {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.1;
    }
    100% {
        transform: translate(10px, -10px) rotate(180deg);
        opacity: 0.15;
    }
}

/* ===================================================================
   RESPONSIVE DESIGN
   ================================================================= */

/* Mobile Styles */
@media (max-width: 767px) {
    .popup-content {
        margin: 1rem;
        max-width: none;
        border-radius: 1rem;
    }

    .popup-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .popup-title {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .popup-body {
        padding: 0 1.5rem 1.5rem;
    }

    .popup-btn-primary,
    .popup-btn-secondary {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .feature-item {
        font-size: 0.875rem;
    }

    .popup-logo-container img {
        height: 2.5rem;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .popup-content {
        max-width: 28rem;
    }

    .popup-title {
        font-size: 2rem;
        line-height: 2.5rem;
    }
}

/* Desktop and Large Screens */
@media (min-width: 1024px) {
    .popup-content {
        max-width: 32rem;
    }

    .popup-btn-primary:hover {
        transform: translateY(-3px);
    }

    .popup-btn-secondary:hover {
        transform: translateY(-2px);
    }
}

/* ===================================================================
   ACCESSIBILITY IMPROVEMENTS
   ================================================================= */

/* Focus Management */
.popup-overlay[aria-hidden="true"] {
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .popup-overlay,
    .popup-content,
    .popup-close-btn,
    .popup-btn-primary,
    .popup-btn-secondary,
    .feature-icon,
    .popup-logo-container {
        transition: none !important;
        animation: none !important;
    }

    .popup-glow,
    .popup-title,
    .popup-decorations > div {
        animation: none !important;
    }

    .feature-item {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .popup-content {
        border: 2px solid #83ff65;
        background: #000000;
    }

    .popup-btn-primary {
        border: 2px solid #83ff65;
    }

    .popup-btn-secondary {
        border: 2px solid #83ff65;
        background: transparent;
    }
}

/* ===================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .popup-overlay {
        display: none !important;
    }
}