@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #b2f2bb;       
    --secondary: #a0f0e0;  
    --accent: #ff9ecb;       
    --accent-light: #ffd8eb;  
    --highlight: #06d6a0;  
    --highlight-light: #7fffd4; 
    --background: #d6fff4;
    --card-bg: #fff7e6;  
    --input-bg: rgba(255, 255, 255, 0.8);
    --text: #064e3b;       
    --text-light: #147d63;
    --gradient-1: linear-gradient(135deg, #06d6a0, #4ecdc4);
    --gradient-2: linear-gradient(135deg, #4ecdc4, #ff9ecb);
    --gradient-3: linear-gradient(135deg, #ff6b6b, #ffd166);
    --shadow-light: rgba(255, 255, 255, 0.7);
    --shadow-dark: rgba(0, 0, 0, 0.1);
    --neon-pink: #ff9ecb;
    --neon-blue: #4ecdc4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at 10% 20%, #9ad4bc, transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(6, 214, 160, 0.3), transparent 50%),
                linear-gradient(135deg, #d6fff4, #b2f2bb);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    direction: rtl;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: float-particle 15s infinite ease-in-out;
    opacity: 0.6;
}

@keyframes float-particle {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
    25% { transform: translateY(-100px) translateX(50px) scale(1.2); opacity: 0.8; }
    50% { transform: translateY(-50px) translateX(-30px) scale(0.8); opacity: 0.4; }
    75% { transform: translateY(-150px) translateX(20px) scale(1.1); opacity: 0.7; }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 95%;
    max-width: 550px;
    margin: 50px auto;
}

.login-card {
    background: var(--card-bg);
    box-shadow: 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-3);
    box-shadow: 0 0 30px #4ecdc4;
}

.user-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 3.5em;
    box-shadow: 0 0 50px #4ecdc4;
    animation: pulse-icon 2s infinite;
    position: relative;
}

.user-icon::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid var(--neon-pink);
    border-radius: 50%;
    animation: ring 2s infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 60px;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
}

.tab-btn.active {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 5px 20px rgba(6, 214, 160, 0.3);
}

.form-panel {
    display: none;
}

.form-panel.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 10px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.95em;
}

.message {
    padding: 15px 20px;
    border-radius: 30px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.5s ease;
}

.message.error {
    background: rgba(255, 107, 107, 0.15);
    border: 2px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
}

.message.success {
    background: rgba(6, 214, 160, 0.15);
    border: 2px solid rgba(6, 214, 160, 0.4);
    color: #06d6a0;
}

.form-group {
    margin-bottom: 25px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    z-index: 5;
}

.form-input {
    width: 100%;
    padding: 16px 55px 16px 20px;
    border-radius: 40px;
    border: 2px solid var(--highlight);
    background: var(--input-bg);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
    transform: translateY(-2px);
}

.password-toggle {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2em;
    background: none;
    border: none;
    color: var(--text);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    border-radius: 40px;
    border: none;
    background: var(--gradient-3);
    color: #0d0135;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    margin: 30px 0 25px;
    color: var(--text-light);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--highlight), transparent);
}

.divider span {
    padding: 0 20px;
    font-size: 0.85em;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    text-decoration: none;
    transition: all 0.3s;
    color: var(--text);
}

.social-btn:hover {
    transform: translateY(-5px);
    background: var(--gradient-1);
    color: white;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 25px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s;
}

.back-link:hover {
    color: var(--highlight);
}

@media (max-width: 480px) {
    .login-card {
        padding: 35px 25px;
    }
    .user-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5em;
    }
    h2 {
        font-size: 1.6em;
    }
}
