* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #059669;
    --secondary-color: #64748b;
    --accent-color: #F59E0B;
    --background-light: #ffffff;
    --background-dark: #f8fafc;
    --text-light: #1e293b;
    --text-dark: #475569;
    --border-light: #e2e8f0;
    --border-dark: #cbd5e1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Tajawal', 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-light);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

.signup-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.signup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.logo h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
}

.back-home {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-home:hover {
    color: var(--accent-color);
    transform: translateX(-5px);
}

.signup-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.signup-form-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    margin-left: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-dark);
    font-size: 1.1rem;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .material-symbols-outlined {
    position: absolute;
    right: 1rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.input-with-icon input,
.input-with-icon select {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.input-with-icon input:focus,
.input-with-icon select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.toggle-password {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
    background: var(--background-dark);
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: var(--error-color);
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.btn-signup {
    background: linear-gradient(135deg, var(--primary-color), #10b981);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-signup:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-signup:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.login-link p {
    color: var(--text-dark);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.signup-hero {
    flex: 1;
    max-width: 500px;
    color: white;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.feature .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .signup-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .signup-form-container {
        margin-left: 0;
        max-width: 100%;
    }
    
    .signup-hero {
        max-width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .signup-header {
        padding: 1rem;
    }
    
    .signup-content {
        padding: 1rem;
    }
    
    .signup-form-container {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .signup-form-container {
        padding: 1.5rem;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .input-with-icon input,
    .input-with-icon select {
        padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    }
    
    .feature {
        font-size: 1rem;
    }
}

/* Password strength indicators */
.strength-weak::before { width: 33%; background: var(--error-color); }
.strength-medium::before { width: 66%; background: var(--warning-color); }
.strength-strong::before { width: 100%; background: var(--success-color); }

.strength-weak + .strength-text { color: var(--error-color); }
.strength-medium + .strength-text { color: var(--warning-color); }
.strength-strong + .strength-text { color: var(--success-color); }

.top-buttons {
    position: absolute;
    top: 20px;
    left: 20px; /* يمين إذا تريد: right: 20px */
    display: flex;
    gap: 10px;
    z-index: 2000;
}

.btn-small {
    background: #0aa76f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-small:hover {
    background: #08865a;
}

.btn-small span {
    font-size: 18px;
}
