/* ========== صفحة الترحيب (Splash Screen) ========== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in-out;
}

.splash-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.splash-logo {
    margin-bottom: 2rem;
}

.splash-logo-img {
    max-width: 120px;
    height: auto;
    margin: 0 auto;
    display: block;
    animation: logoFloat 2s ease-in-out infinite;
}

.splash-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.3s forwards;
}

.splash-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.6s forwards;
}

.splash-loader {
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 1s forwards;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid currentColor;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

/* أنواع الحركات للـ Splash Screen */
.splash-fade {
    opacity: 1;
}

.splash-fade.hiding {
    opacity: 0;
}

.splash-slide {
    transform: translateY(0);
}

.splash-slide.hiding {
    transform: translateY(-100%);
}

.splash-zoom {
    transform: scale(1);
}

.splash-zoom.hiding {
    transform: scale(0);
}

.splash-bounce {
    animation: bounceIn 0.8s ease-out;
}

.splash-bounce.hiding {
    animation: bounceOut 0.5s ease-in;
}

/* ========== نافذة التسجيل المنبثقة ========== */
.signup-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(5px);
}

.signup-popup-overlay.show {
    opacity: 1;
}

.signup-popup-container {
    position: relative;
    max-width: 450px;
    width: 90%;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.7);
    transition: transform 0.3s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.signup-popup-overlay.show .signup-popup-container {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.popup-content {
    text-align: center;
}

.popup-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    animation: iconPulse 2s ease-in-out infinite;
}

.popup-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-message {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popup-btn {
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.popup-btn-primary {
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.popup-btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.popup-btn-secondary:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

.popup-btn-ghost {
    background: none;
    color: #9ca3af;
    font-size: 0.9rem;
}

.popup-btn-ghost:hover {
    color: #6b7280;
}

/* ========== الحركات والتأثيرات ========== */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceOut {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========== استجابة للشاشات الصغيرة ========== */
@media (max-width: 768px) {
    .splash-title {
        font-size: 2rem;
    }
    
    .splash-subtitle {
        font-size: 1rem;
    }
    
    .splash-content {
        padding: 1rem;
    }
    
    .signup-popup-container {
        width: 95%;
        padding: 1.5rem;
    }
    
    .popup-title {
        font-size: 1.5rem;
    }
    
    .popup-message {
        font-size: 0.9rem;
    }
    
    .popup-buttons {
        gap: 0.5rem;
    }
    
    .popup-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
