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

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

body {
    font-family: 'Vazir', sans-serif;
    direction: rtl;
    text-align: right;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.signup-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.brand-logo-img {
    max-width: 64px;
    height: auto;
    display: block;
    margin: 0 auto;
}


.brand-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 48px;
    color: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.brand-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(-45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(-45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(-45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(-45deg); }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.brand-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

.signup-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 1s ease-out 0.3s both;
}

.signup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b6b, #ee5a24, #ff6b6b);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 15px;
}

.step-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
}

.step-dot.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    transform: scale(1.2);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.step-dot.completed {
    background: #27ae60;
    transform: scale(1.1);
}

.step-content {
    transition: all 0.5s ease;
}

.step-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
}

.step-description {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e6ed;
    border-radius: 15px;
    font-size: 1rem;
    font-family: 'Vazir', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9ff;
    direction: ltr;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
}

.form-input:focus {
    outline: none;
    border-color: #ff6b6b;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.form-input.error {
    border-color: #e74c3c;
    background: #fdf2f2;
    animation: shake 0.5s ease-in-out;
}

.form-input.half-width {
    width: 48%;
    display: inline-block;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.membership-id-display {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.membership-id-display .label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.membership-id-display .value {
    font-size: 1.3rem;
    letter-spacing: 2px;
    font-weight: 700;
}

.legal-user-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legal-user-notice:hover {
    background: #fff8e1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
}

.legal-user-notice .checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.legal-user-notice input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.legal-user-notice .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ffc107;
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.legal-user-notice input[type="checkbox"]:checked + .checkmark {
    background: #ffc107;
    border-color: #ffc107;
}

.legal-user-notice input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.legal-user-notice .notice-text {
    font-weight: 500;
    color: #856404;
}

.legal-user-tooltip {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 300px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.legal-user-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #2c3e50;
}

.legal-user-notice:hover .legal-user-tooltip {
    opacity: 1;
    visibility: visible;
    top: -70px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Vazir', sans-serif;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

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

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideInDown 0.5s ease-out;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alternative-signup {
    margin-top: 50px;
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out 1s both;
}

.alternative-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.alternative-description {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    font-size: 1rem;
}

.btn-secondary {
    background: linear-gradient(45deg, #3742fa, #2f3542);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Vazir', sans-serif;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(55, 66, 250, 0.4);
    color: white;
    text-decoration: none;
}

.step-2-success {
    text-align: center;
    padding: 40px;
    animation: bounceIn 1s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: white;
    box-shadow: 0 15px 30px rgba(39, 174, 96, 0.3);
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 15px;
}

.success-description {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* انیمیشن‌ها */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutContent {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

@keyframes slideInContent {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .signup-container {
        padding: 10px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .signup-card {
        padding: 25px;
        margin: 10px;
    }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .alternative-signup {
        margin-top: 30px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .signup-card {
        padding: 20px;
    }
}

/* استایل‌های مرحله چهارم - آپلود فایل */
.file-upload-container {
    margin: 15px 0;
}

.form-input-file {
    display: none;
}

.file-upload-area {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.file-upload-area:hover {
    border-color: #5a6fd8;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 48px;
    opacity: 0.7;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-main {
    font-size: 1.1rem;
    font-weight: 500;
    color: #667eea;
}

.upload-sub {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.4;
}

.file-preview {
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    text-align: center;
}

.file-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
}

.file-info span {
    font-weight: 500;
    color: #333;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-file {
    background: #ff4757;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #ff3838;
    transform: scale(1.1);
}

.field-hint {
    font-size: 0.85rem;
    color: #888;
    margin-top: 8px;
    text-align: center;
}

/* انیمیشن‌های بهتر برای فایل آپلود */
.file-upload-area.dragover {
    border-color: #5a6fd8;
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .file-upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .file-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .file-info span {
        max-width: 100%;
    }
}

/* استایل‌های مرحله پنجم - قوانین */
.rules-container {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: white;
}

.rules-content {
    padding: 25px;
    line-height: 1.8;
    color: #333;
}

.rules-content h1 {
    color: #667eea;
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.rules-content h2 {
    color: #667eea;
    font-size: 1.2rem;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.rules-content h3 {
    color: #5a6fd8;
    font-size: 1.1rem;
    margin: 20px 0 12px 0;
    font-weight: 500;
}

.rules-content p {
    margin: 12px 0;
    text-align: justify;
}

.rules-content li {
    margin: 8px 0;
    padding-right: 20px;
    position: relative;
}

.rules-content li::before {
    content: "•";
    color: #667eea;
    position: absolute;
    right: 0;
    font-weight: bold;
}

.rules-acceptance {
    margin: 25px 0;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.acceptance-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    font-weight: 500;
}

/* استایل‌های صفحه تکمیل */
.completion-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: bounceIn 1s ease-out;
}

.completion-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 30px;
}

.membership-final-display {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.membership-final-display .label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.membership-final-display .value {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.completion-text {
    margin: 30px 0;
    line-height: 1.8;
}

.completion-text p {
    margin: 15px 0;
    color: #555;
    font-size: 1.05rem;
}

.gratitude {
    color: #667eea !important;
    font-weight: 600;
    font-size: 1.1rem !important;
}

.completion-actions {
    margin-top: 40px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* انیمیشن‌ها */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* اسکرول بار سفارشی برای قوانین */
.rules-container::-webkit-scrollbar {
    width: 8px;
}

.rules-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rules-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.rules-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

@media (max-width: 768px) {
    .rules-container {
        max-height: 300px;
    }
    
    .rules-content {
        padding: 20px;
    }
    
    .completion-message {
        padding: 30px 15px;
    }
    
    .success-icon {
        font-size: 60px;
    }
    
    .completion-title {
        font-size: 1.5rem;
    }
}
