/* ✈️ Airplane Gift Popup - CSS */

/* خلفية البوب أب */
.airplane-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.airplane-popup-overlay.active {
    display: flex;
}

/* الطيارة */
.airplane {
    position: absolute;
    top: 15%;
    width: 100px;
    height: 60px;
    animation: flyAirplane 8s linear forwards;
    z-index: 100001;
    filter: drop-shadow(0 5px 15px rgba(33, 150, 243, 0.4));
}

@keyframes flyAirplane {
    0% {
        left: -120px;
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(-3deg);
    }
    100% {
        left: 120%;
        transform: translateY(0) rotate(0deg);
    }
}

/* جسم الطيارة */
.airplane-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.airplane-fuselage {
    position: absolute;
    width: 70px;
    height: 18px;
    background: linear-gradient(180deg, #64B5F6 0%, #1976D2 100%);
    border-radius: 8px;
    top: 21px;
    left: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.airplane-wing-top {
    position: absolute;
    width: 30px;
    height: 20px;
    background: linear-gradient(135deg, #EF5350 0%, #C62828 100%);
    clip-path: polygon(0% 100%, 100% 0%, 100% 100%);
    top: 10px;
    left: 25px;
}

.airplane-wing-bottom {
    position: absolute;
    width: 30px;
    height: 20px;
    background: linear-gradient(225deg, #EF5350 0%, #C62828 100%);
    clip-path: polygon(0% 0%, 100% 100%, 100% 0%);
    bottom: 10px;
    left: 25px;
}

.airplane-tail {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid #0D47A1;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    left: 5px;
    top: 22px;
}

.airplane-nose {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #263238;
    border-radius: 50%;
    right: 3px;
    top: 26px;
}

.airplane-window {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 27px;
}

.airplane-window:nth-child(1) { left: 40px; }
.airplane-window:nth-child(2) { left: 52px; }

.airplane-line {
    position: absolute;
    width: 50px;
    height: 2px;
    background: #FDD835;
    top: 29px;
    left: 20px;
    border-radius: 1px;
}

/* المروحة */
.airplane-propeller {
    position: absolute;
    width: 18px;
    height: 3px;
    background: linear-gradient(90deg, #9E9E9E, #E0E0E0);
    border-radius: 2px;
    right: -2px;
    top: 28px;
    animation: rotatePropeller 0.1s linear infinite;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

@keyframes rotatePropeller {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* الهدايا الساقطة */
.falling-gift {
    position: absolute;
    font-size: 40px;
    animation: fallGift 3s ease-in forwards;
    z-index: 100000;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.3));
}

@keyframes fallGift {
    0% {
        top: 15%;
        opacity: 1;
        transform: rotate(0deg) translateX(0);
    }
    100% {
        top: 95%;
        opacity: 0.8;
        transform: rotate(720deg) translateX(var(--swing));
    }
}

/* البوب أب الرئيسي */
.airplane-popup-container {
    background: linear-gradient(135deg, #673AB7 0%, #E91E63 50%, #FF9800 100%);
    border-radius: 25px;
    padding: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: popupScale 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100002;
}

@keyframes popupScale {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* زر الإغلاق */
.airplane-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.airplane-popup-close:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* محتوى البوب أب */
.airplane-popup-content {
    text-align: center;
    color: white;
}

.airplane-popup-icon {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 60px;
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(255, 152, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(255, 152, 0, 0.7);
    }
}

.airplane-popup-title {
    font-size: 60px;
    font-weight: bold;
    letter-spacing: 5px;
    margin: 10px 0;
    background: linear-gradient(90deg, #FFD54F, #FF9800, #FFD54F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.airplane-popup-subtitle {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

.airplane-popup-description {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 18px;
    border-radius: 20px;
    display: inline-block;
    font-size: 15px;
    margin: 10px 0 20px;
}

.airplane-popup-btn {
    background: white;
    color: #673AB7;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.airplane-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.airplane-popup-skip {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    padding: 8px 20px;
    border-radius: 15px;
    transition: all 0.3s;
}

.airplane-popup-skip:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .airplane {
        width: 80px;
        height: 48px;
    }

    .airplane-popup-container {
        padding: 15px;
        max-width: 95%;
    }

    .airplane-popup-title {
        font-size: 50px;
        letter-spacing: 3px;
    }

    .airplane-popup-subtitle {
        font-size: 20px;
    }

    .airplane-popup-icon {
        width: 80px;
        height: 80px;
        font-size: 50px;
    }

    .falling-gift {
        font-size: 35px;
    }
}