/* Gift celebration animation */
.gift-celebration {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    position: relative;
}

.gift-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    position: relative;
    animation: giftBounce 2s ease-in-out infinite;
}

.gift-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 217, 255, 0.3);
}

.gift-lid {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #8b5cf6 100%);
    border-radius: 4px 4px 0 0;
    animation: lidOpen 3s ease-in-out infinite;
    transform-origin: bottom center;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.gift-ribbon-v {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 100%;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    z-index: 1;
}

.gift-ribbon-h {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    z-index: 1;
}

.confetti {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.confetti::before,
.confetti::after {
    content: '⭐';
    position: absolute;
    font-size: 20px;
    animation: confettiFall 3s ease-in-out infinite;
}

.confetti::before {
    left: -20px;
    animation-delay: 0.3s;
}

.confetti::after {
    right: -20px;
    animation-delay: 0.6s;
}

.gift-message {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    animation: fadeInUp 1s ease-out;
}

@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes lidOpen {
    0%, 70% {
        transform: translateX(-50%) rotateX(0deg);
    }
    80% {
        transform: translateX(-50%) rotateX(-25deg);
    }
    90%, 100% {
        transform: translateX(-50%) rotateX(0deg);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(50px) rotate(180deg);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.85) translateY(-20px);
        opacity: 0;
    }
    60% {
        transform: scale(1.02) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.15);
        filter: brightness(1.2);
    }
}

@media (max-width: 768px) {
    .invitation-alert {
        padding: 18px 20px;
        gap: 15px;
    }

    .invitation-icon {
        font-size: 2.4rem;
    }

    .invitation-alert strong {
        font-size: 1.05rem;
    }

    .invitation-alert p {
        font-size: 0.92rem;
    }
}

.global-message {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.global-message.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.global-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.global-message.info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}
.error-message.show, .success-message.show {
    display: block !important;
    animation: slideDown 0.3s ease;
}
.modern-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}
.modern-btn.login-btn {
    background: linear-gradient(135deg, #059669, #10b981);
}
.modern-btn.otp-btn {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
}

/* Compact OTP Method Buttons */
.otp-method-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.otp-method-btn.compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    min-width: 80px;
    height: 90px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.otp-method-btn.compact:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.15);
}

.otp-method-btn.compact.active {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(0, 255, 136, 0.2));
    border-color: #00d9ff;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.otp-method-btn.compact.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 18px;
    z-index: -1;
    opacity: 0.6;
}

.method-icon-large {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.method-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.method-logo svg {
    width: 32px;
    height: 32px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

/* ألوان مخصصة للخدمات */
.otp-method-btn.compact[data-method*="telegram"] .method-logo svg {
    color: #0088cc;
}

.otp-method-btn.compact[data-method*="whatsapp"] .method-logo svg {
    color: #25d366;
}

.otp-method-btn.compact[data-method*="sms"] .method-logo svg,
.otp-method-btn.compact[data-method*="telesign"] .method-logo svg {
    color: #6c757d;
}

.otp-method-btn.compact:hover .method-logo svg {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.otp-method-btn.compact.active .method-logo svg {
    transform: scale(1.05);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.method-name-small {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    opacity: 0.9;
}

.otp-method-btn.compact.active .method-name-small {
    opacity: 1;
    color: #00ff88;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .otp-method-buttons {
        gap: 8px;
    }

    .otp-method-btn.compact {
        min-width: 70px;
        height: 80px;
        padding: 12px 8px;
    }

    .method-icon-large {
        width: 35px;
        height: 35px;
    }

    .method-logo svg {
        width: 28px;
        height: 28px;
    }

    .method-name-small {
        font-size: 0.7rem;
    }
}
