/* login.css — المتغيرات والـ reset موجودين في shared.css */
        body {
            background: linear-gradient(135deg, var(--primary-black) 0%, var(--dark-black) 50%, var(--dark-red) 100%);
            color: var(--white);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem 1rem;
            position: relative;
            overflow-x: hidden;
        }
        .particles {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }
        .particle {
            position: absolute;
            width: 3px;
            height: 3px;
            background: var(--primary-red);
            border-radius: 50%;
            animation: float 8s infinite linear;
            opacity: 0;
        }
        @keyframes float {
            0% { transform: translateY(100vh) translateX(0); opacity: 0; }
            10% { opacity: 0.7; }
            90% { opacity: 0.3; }
            100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
        }
        .back-button {
            position: absolute;
            top: 2rem;
            right: 2rem;
            z-index: 10000;
        }
        .back-button a {
            color: var(--white);
            text-decoration: none;
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: rgba(220, 38, 38, 0.2);
            border: 1px solid var(--primary-red);
            border-radius: 8px;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }
        .back-button a:hover {
            background: rgba(220, 38, 38, 0.4);
            transform: translateX(5px);
        }
        .auth-card {
            width: 100%;
            max-width: 480px;
            background: rgba(26, 26, 26, 0.95);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(220, 38, 38, 0.3);
            border-radius: 20px;
            padding: 2.5rem 2rem;
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
            animation: cardAppear 0.5s ease;
            position: relative;
            margin: 1rem auto;
            z-index: 100;
        }
        @keyframes cardAppear {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(220, 38, 38, 0.3);
            padding-bottom: 1rem;
            position: relative;
            background: transparent;
            z-index: 10;
        }
        .tab {
            flex: 1;
            text-align: center;
            padding: 0.8rem;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--light-gray);
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .tab::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(220, 38, 38, 0.2);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        .tab:active::before {
            width: 300px;
            height: 300px;
        }
        .tab.active {
            background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
            color: var(--white);
            box-shadow: 0 5px 15px rgba(220, 38, 38, 0.3);
        }
        .forms-container {
            position: relative;
            width: 100%;
            min-height: 380px;
            transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
        }
        .form-wrapper {
            width: 100%;
            position: absolute;
            top: 0;
            left: 0;
            transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .form-wrapper.login {
            opacity: 1;
            transform: translateX(0);
            position: relative;
        }
        .form-wrapper.login.hidden {
            opacity: 0;
            transform: translateX(-20px);
            position: absolute;
            pointer-events: none;
        }
        .form-wrapper.signup {
            opacity: 0;
            transform: translateX(20px);
            position: absolute;
            pointer-events: none;
        }
        .form-wrapper.signup.active {
            opacity: 1;
            transform: translateX(0);
            position: relative;
            pointer-events: all;
        }
        .form-group {
            margin-bottom: 1.5rem;
            position: relative;
            animation: fieldAppear 0.5s ease backwards;
        }
        @keyframes fieldAppear {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: var(--light-gray);
            font-size: 0.95rem;
        }
        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }
        .input-wrapper i:not(.fa-eye):not(.fa-eye-slash) {
            position: absolute;
            right: 1rem;
            color: var(--primary-red);
            font-size: 1rem;
        }
        .input-wrapper input {
            width: 100%;
            padding: 0.8rem 2.5rem 0.8rem 3rem;
            background: rgba(61, 61, 61, 0.5);
            border: 1px solid rgba(220, 38, 38, 0.2);
            border-radius: 10px;
            color: var(--white);
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        .input-wrapper input:focus {
            outline: none;
            border-color: var(--primary-red);
            background: rgba(61, 61, 61, 0.8);
            box-shadow: 0 0 15px rgba(220, 38, 38, 0.2);
        }
        .toggle-password {
            position: absolute;
            left: 1rem;
            color: var(--light-gray);
            cursor: pointer;
            transition: color 0.3s ease;
            z-index: 2;
        }
        .toggle-password:hover {
            color: var(--primary-red);
        }
        .action-button {
            width: 100%;
            padding: 0.9rem;
            background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
            color: var(--white);
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            position: relative;
            overflow: hidden;
        }
        .action-button::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        .action-button:active::after {
            width: 300px;
            height: 300px;
        }
        .action-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
        }
        .terms-checkbox {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
            padding: 0.9rem 1rem;
            background: rgba(220, 38, 38, 0.05);
            border: 1px solid rgba(220, 38, 38, 0.2);
            border-radius: 10px;
            transition: border-color 0.3s;
        }
        .terms-checkbox:has(input:checked) {
            border-color: rgba(220, 38, 38, 0.5);
            background: rgba(220, 38, 38, 0.1);
        }
        .terms-checkbox input[type="checkbox"] {
            appearance: none;
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            min-width: 20px;
            border: 2px solid var(--primary-red);
            border-radius: 5px;
            cursor: pointer;
            position: relative;
            margin-top: 2px;
            transition: all 0.2s ease;
            background: transparent;
        }
        .terms-checkbox input[type="checkbox"]:checked {
            background: var(--primary-red);
        }
        .terms-checkbox input[type="checkbox"]:checked::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 13px;
            font-weight: bold;
        }
        .terms-checkbox label {
            color: var(--light-gray);
            font-size: 0.9rem;
            line-height: 1.6;
            cursor: pointer;
        }
        .terms-checkbox label a {
            color: var(--light-red);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.2s;
        }
        .terms-checkbox label a:hover {
            color: var(--very-light-red);
            text-decoration: underline;
        }
        .terms-checkbox.error {
            border-color: var(--light-red);
            background: rgba(239, 68, 68, 0.1);
            animation: shake 0.3s ease;
        }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }
        .auth-switch {
            text-align: center;
            margin-top: 1.5rem;
            color: var(--light-gray);
        }
        .auth-switch span {
            color: var(--light-red);
            cursor: pointer;
            font-weight: 600;
            margin-right: 0.5rem;
            transition: color 0.3s ease;
            position: relative;
        }
        .auth-switch span::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 1px;
            background: var(--primary-red);
            transition: width 0.3s ease;
        }
        .auth-switch span:hover::after {
            width: 100%;
        }
        .forgot-password {
            text-align: center;
            margin-top: 0.8rem;
            color: var(--light-gray);
            font-size: 0.9rem;
        }
        .forgot-password span {
            color: var(--light-red);
            cursor: pointer;
            font-weight: 600;
            margin-right: 0.3rem;
            transition: color 0.3s ease;
            position: relative;
        }
        .forgot-password span:hover {
            color: var(--primary-red);
            text-decoration: underline;
        }
        .avatar-upload {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        .avatar-preview {
            width: 60px;
            height: 60px;
            background: rgba(220, 38, 38, 0.1);
            border: 2px dashed var(--primary-red);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .avatar-preview:hover {
            border-color: var(--light-red);
            background: rgba(220, 38, 38, 0.2);
        }
        .avatar-preview i {
            font-size: 1.5rem;
            color: var(--primary-red);
        }
        .avatar-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .avatar-input {
            display: none;
        }
        .toast-container {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            z-index: 200000;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .toast {
            background: var(--toast-bg);
            backdrop-filter: blur(10px);
            border-right: 4px solid var(--primary-red);
            border-radius: 10px;
            padding: 1rem 1.5rem;
            color: var(--white);
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            box-shadow: 0 5px 20px rgba(220, 38, 38, 0.3);
            animation: toastSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            max-width: 350px;
            position: relative;
        }
        .toast.removing {
            animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
        @keyframes toastSlide {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        @keyframes toastSlideOut {
            from { transform: translateX(0); opacity: 1; }
            to { transform: translateX(100%); opacity: 0; }
        }
        .toast i {
            font-size: 1.2rem;
            color: var(--primary-red);
        }
        .toast.success {
            border-right-color: var(--success-green);
        }
        .toast.success i {
            color: var(--success-green);
        }
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(5px);
            align-items: center;
            justify-content: center;
            z-index: 100000;
            animation: modalFade 0.3s ease;
        }
        @keyframes modalFade {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .modal.active {
            display: flex;
        }
        .modal-content {
            background: var(--dark-black);
            padding: 2rem;
            border-radius: 15px;
            border: 1px solid var(--primary-red);
            max-width: 400px;
            width: 90%;
            text-align: center;
            animation: modalScale 0.3s ease;
        }
        @keyframes modalScale {
            from { transform: scale(0.9); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }
        .code-input {
            width: 100%;
            padding: 0.8rem;
            background: rgba(61, 61, 61, 0.5);
            border: 1px solid var(--primary-red);
            border-radius: 10px;
            color: var(--white);
            font-size: 1.2rem;
            text-align: center;
            letter-spacing: 5px;
            margin-bottom: 1rem;
            direction: ltr;
        }
        .email-mask {
            color: var(--light-red);
            font-weight: 600;
            margin-bottom: 1rem;
            padding: 0.5rem;
            background: rgba(220, 38, 38, 0.1);
            border-radius: 8px;
        }
        @media (max-width: 480px) {
            body {
                padding: 4rem 1rem 2rem;
            }
            .back-button {
                top: 1rem;
                right: 1rem;
            }
            .auth-card {
                padding: 2rem 1.5rem;
            }
            .toast-container {
                left: 1rem;
                right: 1rem;
            }
            .toast {
                max-width: 100%;
            }
        }