/* فایل: public_html/Resources/source/css/login/Registry/style.css */
@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: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-color: #e5e7eb;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #4c63d2 0%, #6a3a9e 100%);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --weak: #ef4444;
    --medium: #f59e0b;
    --strong: #10b981;
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: rgba(30, 41, 59, 0.95);
    --border-color: #374151;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --gradient: linear-gradient(135deg, #4c63d2 0%, #6a3a9e 100%);
    --weak: #f87171;
    --medium: #fbbf24;
    --strong: #34d399;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--gradient);
    min-height: 100vh;
    direction: rtl;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Animation - Optimized for Mobile */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s infinite ease-in-out;
}

.bubble:nth-child(1) {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 90px;
    height: 90px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 45px;
    height: 45px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    width: 75px;
    height: 75px;
    top: 30%;
    left: 70%;
    animation-delay: 6s;
}

.bubble:nth-child(5) {
    width: 55px;
    height: 55px;
    top: 70%;
    left: 40%;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-15px) translateX(8px);
    }
    50% {
        transform: translateY(-30px) translateX(-8px);
    }
    75% {
        transform: translateY(-15px) translateX(8px);
    }
}

/* Theme Toggle - Mobile Optimized */
.theme-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
}

.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: none;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Register Container - Mobile First */
.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.register-card {
    background: var(--bg-card);
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    width: 100%;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease;
    position: relative;
    overflow: hidden;
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
}

.register-header {
    text-align: center;
    margin-bottom: 25px;
}

.register-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 12px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.7rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.register-header h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.3;
}

.register-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Progress Steps - Mobile Optimized */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    padding: 0 5px;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-bar {
    position: absolute;
    top: 50%;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateY(-50%);
    transition: width 0.3s ease;
    z-index: 2;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    flex: 1;
    max-width: 60px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.step.active .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form Styles - Mobile Optimized */
.register-form {
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 14px 15px 14px 42px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    -webkit-appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
}

/* Password Strength - Mobile Optimized */
.password-strength {
    margin-top: 6px;
}

.strength-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 50px;
}

.strength-weak .strength-fill {
    background: var(--weak);
    width: 33%;
}

.strength-medium .strength-fill {
    background: var(--medium);
    width: 66%;
}

.strength-strong .strength-fill {
    background: var(--strong);
    width: 100%;
}

.strength-weak .strength-text {
    color: var(--weak);
}

.strength-medium .strength-text {
    color: var(--medium);
}

.strength-strong .strength-text {
    color: var(--strong);
}

/* Form Actions - Mobile Optimized */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 25px;
}

.form-actions .btn {
    flex: 1;
    min-width: 0;
}

/* Verification Methods - Mobile Optimized */
.verification-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.verification-method-btn {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: right;
}

.verification-method-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.verification-method-btn.active {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.method-icon {
    font-size: 1.3rem;
    margin-left: 12px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.method-info {
    flex: 1;
    min-width: 0;
}

.method-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.method-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Timer and Resend - Mobile Optimized */
.timer {
    text-align: center;
    color: var(--text-secondary);
    margin: 8px 0;
    font-size: 0.85rem;
}

.btn-resend {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    margin: 8px auto;
    display: block;
    transition: color 0.3s ease;
    padding: 5px;
}

.btn-resend:hover:not(:disabled) {
    color: var(--primary-dark);
}

.btn-resend:disabled {
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Success Message - Mobile Optimized */
.success-message {
    text-align: center;
    padding: 15px 0;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 15px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.success-message h2 {
    color: var(--success);
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Buttons - Mobile Optimized */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 100px;
    font-family: 'Vazirmatn', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: var(--primary-dark);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--text-primary);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Login Link - Mobile Optimized */
.login-link {
    text-align: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.login-link p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Back Link - Mobile Optimized */
.back-link {
    text-align: center;
    margin-top: 18px;
}

.back-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 5px;
}

.back-link a:hover {
    color: var(--primary-color);
}

/* Steps */
.register-step {
    display: none;
}

.register-step.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

/* Terms - Mobile Optimized */
.terms {
    text-align: center;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.terms a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Styles - Mobile Optimized */
.avixo-notification {
    position: fixed;
    top: 15px;
    right: 15px;
    left: 15px;
    background: var(--info);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    margin: 0 auto;
}

.avixo-notification-success {
    background: var(--success);
}

.avixo-notification-error {
    background: var(--error);
}

.avixo-notification-warning {
    background: var(--warning);
}

.avixo-notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.avixo-notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Field Error Styles */
.field-error {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 4px;
    line-height: 1.3;
}

input.error {
    border-color: var(--error) !important;
}

input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Responsive Design */
/* Tablet */
@media (min-width: 768px) {
    html {
        font-size: 17px;
    }
    
    .register-container {
        padding: 20px;
    }
    
    .register-card {
        padding: 35px 30px;
        max-width: 500px;
    }
    
    .register-logo {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .register-header h1 {
        font-size: 1.8rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .theme-toggle {
        top: 20px;
        left: 20px;
    }
    
    .theme-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .avixo-notification {
        right: 20px;
        left: auto;
        max-width: 400px;
    }
    
    .bubble:nth-child(1) {
        width: 80px;
        height: 80px;
    }
    
    .bubble:nth-child(2) {
        width: 120px;
        height: 120px;
    }
    
    .bubble:nth-child(3) {
        width: 60px;
        height: 60px;
    }
    
    .bubble:nth-child(4) {
        width: 100px;
        height: 100px;
    }
    
    .bubble:nth-child(5) {
        width: 70px;
        height: 70px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .register-card {
        max-width: 520px;
    }
    
    .verification-method-btn {
        padding: 20px;
    }
    
    .method-icon {
        font-size: 1.5rem;
        margin-left: 15px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    html {
        font-size: 18px;
    }
}

/* Small Mobile Devices */
@media (max-width: 360px) {
    html {
        font-size: 15px;
    }
    
    .register-container {
        padding: 10px;
    }
    
    .register-card {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .register-header h1 {
        font-size: 1.3rem;
    }
    
    .step {
        max-width: 50px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .step-label {
        font-size: 0.65rem;
    }
    
    .form-group input {
        padding: 12px 12px 12px 38px;
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .form-actions {
        gap: 8px;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .register-container {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .register-card {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .progress-steps {
        margin-bottom: 15px;
    }
    
    .register-header {
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-actions {
        margin-top: 15px;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .register-card {
        border: 0.5px solid rgba(255, 255, 255, 0.1);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .background-animation {
        display: none;
    }
}

/* Print Styles */
@media print {
    .theme-toggle,
    .background-animation {
        display: none;
    }
    
    .register-card {
        box-shadow: none;
        background: white;
        color: black;
    }
}