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

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

:root {
    --primary: #F05A28;
    --background: #FFF7F2;
    --text: #2A2A2A;
    --secondary: #0F3D2E;
    --white: #ffffff;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

body.en {
    font-family: 'Poppins', sans-serif;
}

/* Language Toggle */
.lang-toggle {
    position: fixed;
    top: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

[dir="ltr"] .lang-toggle {
    right: 20px;
}

[dir="rtl"] .lang-toggle {
    left: 20px;
}

.lang-toggle button {
    padding: 8px 20px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lang-toggle button.active {
    background: var(--primary);
    color: white;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Blobs */
.blob {
    position: absolute;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.15;
    filter: blur(40px);
    animation: float 8s ease-in-out infinite;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
}

[dir="ltr"] .blob-1 {
    right: -200px;
}

[dir="rtl"] .blob-1 {
    left: -200px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    animation: float 10s ease-in-out infinite reverse;
}

[dir="ltr"] .blob-2 {
    left: -150px;
}

[dir="rtl"] .blob-2 {
    right: -150px;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(5deg); 
    }
}

/* Auth Box */
.auth-box {
    background: white;
    padding: 30px 50px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 550px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 15px;
}

.auth-logo img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(240, 90, 40, 0.2));
    transition: transform 0.3s ease;
}

.auth-logo img:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Title */
.auth-title {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 5px;
    color: var(--secondary);
}

.auth-subtitle {
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
    opacity: 0.7;
}

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

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

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.form-input {
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--background);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.form-input::placeholder {
    color: #999;
}

/* Error/Success Messages */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 15px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #ffe6e6;
    color: #d32f2f;
    border: 2px solid #ffcccc;
}

.alert-success {
    background: #e6f7e6;
    color: #2e7d32;
    border: 2px solid #b3e6b3;
}

/* Button */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 30px rgba(240, 90, 40, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(240, 90, 40, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Links */
.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider-text {
    font-size: 13px;
    color: #999;
}

/* Remember Me Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label {
    font-size: 14px;
    cursor: pointer;
}

/* Terms Acceptance */
.terms-acceptance {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.terms-acceptance input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.terms-acceptance label {
    cursor: pointer;
    color: var(--text);
}

.terms-acceptance a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.terms-acceptance a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Forgot Password */
.forgot-password {
    margin-top: -10px;
    margin-bottom: 10px;
}

[dir="ltr"] .forgot-password {
    text-align: right;
}

[dir="rtl"] .forgot-password {
    text-align: left;
}

.forgot-password a {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--secondary);
}

/* Back to Home Link */
.back-home {
    text-align: center;
    margin-top: 15px;
}

.back-home a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-home a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-box {
        padding: 25px 30px;
        max-width: 95%;
    }
    
    .auth-title {
        font-size: 22px;
    }
    
    .blob-1, .blob-2 {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 20px 25px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    .form-input {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .auth-logo img {
        width: 70px;
    }
}
