@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Poppins:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    height: 100vh;
    background: linear-gradient(135deg, #1a0033 0%, #2d1b4e 25%, #7C4DFF 50%, #B388FF 75%, #e6d9ff 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: white;
    position: relative;
}

body.rtl {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
}

.language-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    padding: 12px 24px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(124, 77, 255, 0.3);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(124, 77, 255, 0.5);
}

.lang-text {
    display: inline-block;
    transition: all 0.3s ease;
}

.logo-container {
    margin-bottom: 40px;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(124, 77, 255, 0.6));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(2deg);
    }
    50% {
        transform: translateY(-10px) rotate(-2deg);
    }
    75% {
        transform: translateY(-15px) rotate(1deg);
    }
}

.logo {
    width: 250px;
    height: auto;
    animation: pulse 4s ease-in-out infinite, glow 3s ease-in-out infinite alternate;
}

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

@keyframes glow {
    0% {
        filter: drop-shadow(0 0 20px rgba(179, 136, 255, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 40px rgba(124, 77, 255, 0.8));
    }
}

.main-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #B388FF 50%, #7C4DFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShine 3s ease-in-out infinite;
    text-shadow: 0 5px 20px rgba(124, 77, 255, 0.4);
}

@keyframes titleShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 50px;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 700px;
    animation: fadeInUp 1s ease-out 0.3s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.loader-container {
    margin-top: 30px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.loader {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.loader-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px rgba(179, 136, 255, 0.8);
    animation: bounce 1.4s ease-in-out infinite;
}

.loader-circle:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-circle:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.footer {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.footer p {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.8;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .logo {
        width: 180px;
    }

    .language-toggle {
        top: 20px;
        right: 20px;
    }

    .lang-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .footer {
        bottom: 20px;
    }

    .footer p {
        font-size: 0.85rem;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .logo {
        width: 150px;
    }

    .loader-circle {
        width: 14px;
        height: 14px;
    }
}
