@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f59e0b;
    --secondary-color: #0891b2;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 500px;
}

.auth-wrapper {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    background: linear-gradient(135deg, var(--primary-color), #ea580c);
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.logo {
    font-size: 64px;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.logo-section p {
    font-size: 14px;
    opacity: 0.9;
}

.forms-container {
    position: relative;
    padding: 40px 30px;
}

.form-box {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-box.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-box h2 {
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.required {
    color: var(--error-color);
}

.input-group input[type="text"],
.input-group input[type="tel"],
.input-group select {
    width: 100%;
    padding: 14px 45px 14px 45px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.input-group .icon {
    position: absolute;
    left: 15px;
    top: 45px;
    font-size: 20px;
    pointer-events: none;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.file-label:hover {
    border-color: var(--primary-color);
    background: rgba(245, 158, 11, 0.05);
}

.file-icon {
    font-size: 24px;
}

.file-text {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.image-preview {
    margin-top: 15px;
    text-align: center;
}

.image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 12px;
    border: 3px solid var(--primary-color);
}

/* Checkbox */
.checkbox-group {
    margin: 25px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label input:checked ~ .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
}

.rules-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.rules-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), #ea580c);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    color: var(--text-light);
    font-size: 14px;
}

.toggle-form {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.toggle-form:hover {
    color: #ea580c;
}

/* Message Box */
.message-box {
    margin: 20px 30px;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-box.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.message-box.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .forms-container {
        padding: 30px 20px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo-section {
        padding: 30px 15px;
    }
    
    .logo {
        font-size: 48px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    .form-box h2 {
        font-size: 20px;
    }
    
    .btn-submit {
        padding: 14px;
        font-size: 15px;
    }
}
