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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            line-height: 1.6;
            color: #333;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }





        /* انیمیشن برای پیام‌های خطا */
        .alert {
            position: fixed;
            top: -100px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10000;
            width: 90%;
            max-width: 400px;
            padding: 15px 20px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: center;
            animation: slideIn 0.5s forwards, fadeOut 0.5s 9.5s forwards;
        }

        .timer-container {
            display: inline-block;
            margin-left: 10px;
        }

        .timer {
            display: inline-block;
            background: rgba(0, 0, 0, 0.2);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 14px;
        }

        button[name="submit"]:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        button[name="submit"]:disabled .button-text {
            opacity: 0.7;
        }


        ::selection {
            background: transparent;
            color: rgba(255, 48, 48, 0.51);
        }

        .auth-form {
            overflow-y: auto;
            /* اسکرول عمودی فعال */
            scrollbar-width: thin;
            /* برای فایرفاکس */
            scrollbar-color: transparent transparent;
            /* رنگ اسکرولبار شفاف */
        }

        .auth-form::-webkit-scrollbar {
            width: 6px;
            /* عرض کم برای اسکرولبار */
            background: transparent;
            /* پس‌زمینه شفاف */
        }

        .auth-form::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            /* رنگ دسته اسکرولبار با کمی شفافیت */
            border-radius: 3px;
            /* گرد کردن گوشه‌ها */
        }

        .auth-form:hover::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.4);
            /* رنگ دسته هنگام هاور */
        }


        /* انیمیشن برای انواع مختلف پیام‌ها */
        .alert-danger {
            background: linear-gradient(135deg, #ff4d4d, #f44336);
            color: white;
        }

        .alert-success {
            background: linear-gradient(135deg, #4CAF50, #2E7D32);
            color: white;
        }

        .alert-info {
            background: linear-gradient(135deg, #2196F3, #1565C0);
            color: white;
        }

        /* تعریف انیمیشن‌ها */
        @keyframes slideIn {
            from {
                top: -100px;
                opacity: 0;
            }

            to {
                top: 20px;
                opacity: 1;
            }
        }

        @keyframes fadeOut {
            from {
                top: 20px;
                opacity: 1;
            }

            to {
                top: -100px;
                opacity: 0;
            }
        }

        /* آیکون‌ها */
        .alert:before {
            content: "";
            display: inline-block;
            margin-right: 10px;
            width: 20px;
            height: 20px;
            background-size: contain;
            background-repeat: no-repeat;
        }

        .alert-danger:before {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
        }

        .alert-success:before {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
        }

        .alert-info:before {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
        }







        .error-message.show {
            color: #e74c3c;
            font-size: 0.85rem;
            margin-top: 0.25rem;
        }

        .input-container.error {
            border-color: #e74c3c;
        }

        .input-container.success {
            border-color: #2ecc71;
        }

        /* استایل برای پیام‌های فلش */
        .flash-message {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            padding: 15px 25px;
            border-radius: 5px;
            color: white;
            z-index: 1000;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            animation: slideIn 0.3s, fadeOut 0.5s 4.5s;
        }

        .flash-success {
            background-color: #2ecc71;
        }

        /* Add to your CSS */
        @keyframes shake {

            0%,
            100% {
                transform: translateX(0);
            }

            20% {
                transform: translateX(-10px);
            }

            40% {
                transform: translateX(10px);
            }

            60% {
                transform: translateX(-10px);
            }

            80% {
                transform: translateX(10px);
            }
        }

        .shake {
            animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
        }

        .flash-error {
            background-color: #e74c3c;
        }

        @keyframes slideIn {
            from {
                top: -50px;
                opacity: 0;
            }

            to {
                top: 20px;
                opacity: 1;
            }
        }

        @keyframes fadeOut {
            from {
                opacity: 1;
            }

            to {
                opacity: 0;
            }
        }

        .auth-container {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            position: relative;
            padding: 20px;
        }

        /* Background Shapes */
        .background-shapes {
            position: absolute;
            inset: 0;
            overflow: hidden;
            z-index: 1;
        }

        .shape {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            filter: blur(40px);
            animation: float 6s ease-in-out infinite;
        }

        .shape-1 {
            width: 300px;
            height: 300px;
            top: -150px;
            left: -150px;
            animation-delay: 0s;
        }

        .shape-2 {
            width: 200px;
            height: 200px;
            top: 50%;
            right: -100px;
            animation-delay: 2s;
        }



        .shape-3 {
            width: 400px;
            height: 400px;
            bottom: -200px;
            left: 50%;
            transform: translateX(-50%);
            animation-delay: 4s;
        }


        #security-alert {
            position: fixed;
            top: -100px;
            left: 0;
            right: 0;
            background: #ff4444;
            color: white;
            padding: 15px 20px;
            text-align: center;
            font-family: 'Yekan', Arial, sans-serif;
            z-index: 99999;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            display: flex;
            justify-content: center;
            align-items: center;
            transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        #security-alert.alert-visible {
            top: 0;
        }

        #security-alert.alert-hidden {
            top: -100px;
        }

        .alert-content {
            display: flex;
            align-items: center;
            gap: 12px;
            max-width: 1200px;
            width: 100%;
            justify-content: center;
        }

        #security-alert svg {
            animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
        }

        @keyframes shake {

            0%,
            100% {
                transform: translateX(0);
            }

            20% {
                transform: translateX(-5px);
            }

            40% {
                transform: translateX(5px);
            }

            60% {
                transform: translateX(-5px);
            }

            80% {
                transform: translateX(5px);
            }
        }


        @keyframes float {

            0%,
            100% {
                transform: translateY(0px) rotate(0deg);
            }

            50% {
                transform: translateY(-20px) rotate(180deg);
            }
        }

        /* Auth Card */
        .auth-card {
            background: #2C2C2C;
            backdrop-filter: blur(20px);
            border-radius: 24px;
            width: 100%;
            max-width: 520px;
            box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15);
            position: relative;
            z-index: 10;
            border: 1px solid rgba(255, 255, 255, 0.2);
            overflow: hidden;
        }

        .auth-form {
            padding: 48px;
            opacity: 0;
            transform: translateX(100%);
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }

        .auth-form.active {
            opacity: 1;
            transform: translateX(0);
            position: relative;
        }

        .auth-form.slide-out-left {
            transform: translateX(-100%);
            opacity: 0;
        }

        .auth-form.slide-out-right {
            transform: translateX(100%);
            opacity: 0;
        }

        .auth-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-bottom: 24px;
        }

        .logo-icon {
            width: 40px;
            height: 40px;
            color: #667eea;
        }

        .logo-text {
            font-size: 24px;
            font-weight: bold;
            color: #1f2937;
        }

        .auth-title {
            font-size: 32px;
            font-weight: bold;
            color: #ffffff;
            margin-bottom: 8px;
        }

        .auth-subtitle {
            color: #6b7280;
            font-size: 16px;
        }

        /* Form Styles */
        .form {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .form-row {
            display: grid;
            gap: 16px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .form-group label {
            font-weight: 600;
            color: #ffffff;
            font-size: 14px;
        }

        .input-container {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-icon {
            position: absolute;
            left: 16px;
            width: 20px;
            height: 20px;
            color: #9ca3af;
            z-index: 2;
        }

        .input-container input {
            width: 100%;
            padding: 16px 16px 16px 48px;
            border: 2px solid #ffffff66;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: #3f3f3f;
        }

        .input-container input:focus {
            outline: none;
            border-color: #ffffff;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        }

        .input-container input:focus+.input-icon {
            color: #667eea;
        }

        .toggle-password {
            position: absolute;
            right: 16px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px;
            border-radius: 6px;
            transition: background 0.2s ease;
            z-index: 3;
        }

        .toggle-password:hover {
            background: #f3f4f621;
        }

        .eye-icon {
            width: 20px;
            height: 20px;
            color: #9ca3af;
        }

        .error-message {
            color: #ef4444;
            font-size: 14px;
            margin-top: 4px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .error-message.show {
            opacity: 1;
        }

        /* Password Strength */
        .password-strength {
            margin-top: 8px;
        }

        .strength-bar {
            width: 100%;
            height: 4px;
            background: #e5e7eb;
            border-radius: 2px;
            overflow: hidden;
            margin-bottom: 4px;
        }

        .strength-fill {
            height: 100%;
            width: 0%;
            transition: all 0.3s ease;
            border-radius: 2px;
        }

        .strength-fill.weak {
            width: 25%;
            background: #ef4444;
        }

        .strength-fill.fair {
            width: 50%;
            background: #f59e0b;
        }

        .strength-fill.good {
            width: 75%;
            background: #3b82f6;
        }

        .strength-fill.strong {
            width: 100%;
            background: #10b981;
        }

        .strength-text {
            font-size: 12px;
            color: #6b7280;
        }

        /* Form Options */
        .form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: -23px 0px 21px 0;
        }

        .checkbox-container {
            display: flex;
            align-items: flex-start;
            cursor: pointer;
            font-size: 14px;
            color: #374151;
            line-height: 1.4;
        }

        .checkbox-container input {
            display: none;
        }

        .checkmark {
            width: 20px;
            height: 20px;
            border: 2px solid #d1d5db;
            border-radius: 4px;
            margin-right: 8px;
            position: relative;
            transition: all 0.3s ease;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .checkbox-container input:checked+.checkmark {
            background: #667eea;
            border-color: #667eea;
        }

        .checkbox-container input:checked+.checkmark::after {
            content: '';
            position: absolute;
            left: 6px;
            top: 2px;
            width: 6px;
            height: 10px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

        .forgot-password,
        .terms-link {
            color: #ffffff;
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .forgot-password:hover,
        .terms-link:hover {
            color: #e63946;
        }

        /* Auth Button */
        .auth-button {
            background: linear-gradient(135deg, #F44336 0%, #e63946 100%);
            color: white;
            border: none;
            padding: 16px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .auth-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgb(232 59 68);
        }

        .auth-button:active {
            transform: translateY(0);
        }

        .auth-button.loading {
            pointer-events: none;
        }

        .button-text {
            transition: opacity 0.3s ease;
        }

        .auth-button.loading .button-text {
            opacity: 0;
        }

        .loading-spinner {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .auth-button.loading .loading-spinner {
            opacity: 1;
        }

        .spinner {
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top: 2px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

            100% {
                transform: rotate(360deg);
            }
        }

        /* Divider */
        .divider {
            position: relative;
            text-align: center;
            margin: 32px 0;
            color: #9ca3af;
            font-size: 14px;
        }

        .divider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 1px;
            background: #e5e7eb;
        }

        .divider span {
            background: rgba(255, 255, 255, 0.95);
            padding: 0 16px;
            position: relative;
            z-index: 1;
        }

        /* Social Login */
        .social-login {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .social-button {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            background: white;
            color: #374151;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .social-button:hover {
            border-color: #d1d5db;
            background: #f9fafb;
            transform: translateY(-1px);
        }

        .social-button svg {
            width: 20px;
            height: 20px;
        }

        .social-button.google:hover {
            border-color: #ea4335;
            color: #ea4335;
        }

        .social-button.microsoft:hover {
            border-color: #0078d4;
            color: #0078d4;
        }

        /* Switch Form */
        .switch-form {
            text-align: center;
            margin-top: 24px;
        }

        .switch-form p {
            color: #6b7280;
            font-size: 14px;
        }

        .switch-form a {
            color: #667eea;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.3s ease;
        }

        .switch-form a:hover {
            color: #5a67d8;
        }

        /* Success Message */
        .success-message {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .success-message.show {
            opacity: 1;
            visibility: visible;
        }

        .success-content {
            background: white;
            padding: 48px;
            border-radius: 24px;
            text-align: center;
            max-width: 400px;
            margin: 20px;
            box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15);
            transform: scale(0.9);
            transition: transform 0.3s ease;
        }

        .success-message.show .success-content {
            transform: scale(1);
        }

        .success-icon {
            width: 64px;
            height: 64px;
            color: #10b981;
            margin: 0 auto 24px;
        }

        .success-content h2 {
            font-size: 24px;
            font-weight: bold;
            color: #1f2937;
            margin-bottom: 8px;
        }

        .success-content p {
            color: #6b7280;
            font-size: 16px;
        }

        /* Responsive Design */
        @media (max-width: 640px) {
            .auth-card {
                margin: 20px;
                border-radius: 20px;
            }

            .auth-form {
                padding: 32px 24px;
            }

            .auth-title {
                font-size: 28px;
            }

            .form-row {
                grid-template-columns: 1fr;
                gap: 24px;
            }

            .social-login {
                grid-template-columns: 1fr;
            }

            .form-options {
                flex-direction: column;
                gap: 16px;
                align-items: flex-start;
            }

            .success-content {
                padding: 32px 24px;
            }
        }

        @media (max-width: 480px) {
            body {
                overflow: auto;
            }

            .auth-container {
                min-height: 100vh;
                padding: 16px;
            }

            .auth-form {
                padding: 24px 20px;
            }

            .auth-title {
                font-size: 24px;
            }

            .logo-text {
                font-size: 20px;
            }
        }

        /* Input validation states */
        .input-container.error input {
            border-color: #ef4444;
            box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
        }

        .input-container.error .input-icon {
            color: #ef4444;
        }

        .input-container.success input {
            border-color: #10b981;
            box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
        }

        .input-container.success .input-icon {
            color: #10b981;
        }

        img,
        video {
            max-width: 10%;
            height: auto;
        }

        /* Animation for form switching */
        .auth-card {
            position: relative;
            min-height: 600px;
        }

        @media (max-width: 640px) {
            .auth-card {
                min-height: auto;
            }
        }