@import "iransanse.css";
@import url("../lib/admin-panel/font-awesome/css/all.min.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: iran;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
}

/* Animated background effect */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
}

.signup-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Card Styles */
.signup-card, .success-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.signup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
}

.signup-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.signup-header h2 i {
    margin-left: 10px;
}

.signup-header p {
    font-size: 0.95rem;
    opacity: 0.95;
}

/* Back Button */
.back-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(5px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

/* RTL adjustment for back button */
[dir="rtl"] .back-button {
    right: auto;
    left: 1.5rem;
}

[dir="rtl"] .back-button:hover {
    transform: translateX(3px);
}

.signup-body {
    padding: 2rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.full-width {
    grid-column: span 2;
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: #667eea;
    font-size: 1rem;
}

.required-star {
    color: #e74c3c;
    font-size: 1.1rem;
    margin-right: 4px;
}

/* Input Styles */
.form-input, .form-select, .form-textarea, .form-control {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
    width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
    border-color: #a0aec0;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload */
.file-upload {
    position: relative;
    margin-top: 0.25rem;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.preview-image {
    margin-top: 1rem;
    text-align: center;
}

#output_image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid #667eea;
}

/* Captcha */
.captcha-wrapper {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

/* Error Message */
.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 12px;
    margin: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-right: 4px solid #c33;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Password Hint */
.password-hint {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.25rem;
}

/* Success Card */
.success-card {
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
}

.success-card .back-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.success-card .back-button:hover {
    background: rgba(102, 126, 234, 0.2);
}

.success-icon {
    font-size: 5rem;
    color: #48bb78;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.success-card h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.success-card p {
    color: #718096;
    margin-bottom: 2rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 30px;
    width: 90%;
    max-width: 450px;
    transform: scale(0.7);
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.modal-header i {
    font-size: 4rem;
    color: white;
    animation: modalIconPop 0.5s ease-out;
}

@keyframes modalIconPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-body h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-body p {
    color: #718096;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-body .message-text {
    background: #f0fff4;
    padding: 1rem;
    border-radius: 12px;
    color: #38a169;
    font-weight: 500;
    margin: 1rem 0;
    border-right: 3px solid #48bb78;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
}

.modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .full-width {
        grid-column: span 1;
    }

    .signup-body {
        padding: 1.5rem;
    }

    .signup-header h2 {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-body h3 {
        font-size: 1.3rem;
    }

    .back-button {
        width: 35px;
        height: 35px;
        top: 1rem;
        right: 1rem;
    }
}

/* Loading animation for selects */
.city-select-list option:first-child {
    color: #888;
}

/* RTL specific adjustments */
[dir="rtl"] .form-label i {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .btn-submit i {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .modal-close {
    right: auto;
    left: 1rem;
}