﻿:root {
    --bg-dark: #0a1628;
    --card-bg: rgba(13, 27, 42, 0.85);
    --primary-blue: #3b82f6;
    --primary-teal: #14b8a6;
    --text-white: #ffffff;
    --text-gray: #94a3b8;
    --input-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    height: 100vh; /* الصفحة تأخذ طول الشاشة بالضبط */
    overflow: hidden; /* يمنع السكرول الخارجي للصفحة */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Effects */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #0a1628 0%, #0f2847 50%, #1a3a5c 100%);
}

.blob {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: pulse 6s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    background: var(--primary-blue);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: var(--primary-teal);
    animation-delay: 1s;
}

/* Layout Wrapper */
.auth-wrapper {
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    width: 100%;
    max-width: 1100px;
    height: 85vh; /* الكارت يأخذ 85% من ارتفاع الشاشة لضمان عدم الخروج */
    min-height: 550px;
    display: flex;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

/* Left Side (Visual) */
.auth-visual-side {
    width: 50%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    border-right: 1px solid var(--border-color);
    display: none; /* Hidden on mobile */
    overflow: hidden;
}

@media (min-width: 768px) {
    .auth-visual-side {
        display: block;
    }
}

canvas#metroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.visual-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(to top, rgba(13, 27, 42, 0.95), transparent);
    padding: 2rem;
}

/* --- Logo Styles (Desktop) --- */
.logo-circle {
    width: 160px;
    height: 160px;
    margin-top: 90px;
    /*    background: #ffffff;*/

    border-radius: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    overflow: hidden;
    position: relative;
}



    .logo-circle img {
        width: 99%;
        height: 99%;
        object-fit: contain;
    } 

.visual-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.visual-content .subtitle {
    color: #bfdbfe;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.features-row {
    display: flex;
    gap: 1.5rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Right Side (Form) with Internal Scroll --- */
.auth-form-side {
    width: 100%;
    height: 100%; /* يأخذ كل الارتفاع */
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* يسمح بالسكرول داخل الفورم فقط */
}

    /* Custom Scrollbar Styling */
    .auth-form-side::-webkit-scrollbar {
        width: 6px;
    }

    .auth-form-side::-webkit-scrollbar-track {
        background: transparent;
    }

    .auth-form-side::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }

        .auth-form-side::-webkit-scrollbar-thumb:hover {
            background: var(--primary-blue);
        }

@media (min-width: 768px) {
    .auth-form-side {
        width: 50%;
    }
}

/* --- Logo Styles (Mobile) --- */
.mobile-logo {
    width: 120px;
    height: 120px;
    /*background: #ffffff;*/ /* خلفية بيضاء */
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
    overflow: hidden;
    flex-shrink: 0; /* يمنع انكماش اللوجو عند السكرول */
}

    .mobile-logo img {
        width: 80%;
        height: 80%;
        object-fit: contain;
    }

@media (min-width: 768px) {
    .mobile-logo {
        display: none;
    }
}

/* Helper Classes */
.form-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-desc {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1.2rem;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.5rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    }

.btn-primary {
    width: 100%;
    height: 48px;
    background: linear-gradient(90deg, #2563eb, #0d9488);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-main);
}

    .btn-primary:hover {
        box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
        transform: translateY(-1px);
    }

/* Language Toggle */
.lang-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
    z-index: 100;
}

    .lang-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
    }

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.4;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Colors helpers */
.text-teal {
    color: var(--primary-teal);
}

.text-blue {
    color: var(--primary-blue);
}

.text-green {
    color: #4ade80;
}
