/* Auth Modal Styles - Dark Theme */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #12172b;
    border: 1px solid rgba(23, 41, 100, 0.5);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    animation: slideIn 0.3s ease;
}
#contactChannelsModal .modal-content {
    max-width: 650px;
}
.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.modal-body {
    padding: 20px 30px 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(14, 18, 31, 0.5);
    color: #ffffff;
    font-family: 'Vazirmatn', sans-serif;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .form-input {
    padding-right: 45px; /* Space for toggle button */
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    z-index: 10;
}

.toggle-password:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.toggle-password.active {
    color: #60a5fa;
}

/* Keyboard Warning */
.keyboard-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideDown 0.3s ease;
}

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

.form-input:focus {
    outline: none;
    border-color: #172964;
    box-shadow: 0 0 0 3px rgba(23, 41, 100, 0.3);
    background: rgba(14, 18, 31, 0.8);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    font-family: 'Vazirmatn', sans-serif;
}

.form-error.show {
    display: block;
}

.btn-modal {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    font-family: 'Vazirmatn', sans-serif;
}

.btn-modal-primary {
    background: #172964;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-modal-primary:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 41, 100, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-modal-outline {
    background: transparent;
    color: #172964;
    border: 2px solid #172964;
}

.btn-modal-outline:hover {
    background: #172964;
    color: white;
}

.modal-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.modal-divider span {
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.modal-switch {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-switch-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 10px;
    font-family: 'Vazirmatn', sans-serif;
}

.modal-switch-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.modal-switch-btn:hover {
    color: #3b82f6;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .btn-modal-primary {
    background: rgba(23, 41, 100, 0.5);
    cursor: not-allowed;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Contact Channels Modal Styles */
.contact-channels-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.8;
    font-family: 'Vazirmatn', sans-serif;
}

.contact-channels-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-channel-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(14, 18, 31, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.contact-channel-item:hover {
    background: rgba(23, 41, 100, 0.3);
    border-color: rgba(23, 41, 100, 0.6);
    transform: translateX(-5px);
}

.contact-channel-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px;
}

.contact-channel-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contact-channel-info {
    flex: 1;
    text-align: right;
}

.contact-channel-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    font-family: 'Vazirmatn', sans-serif;
}

.contact-channel-link {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Vazirmatn', sans-serif;
}

.contact-channel-arrow {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.contact-channel-item:hover .contact-channel-arrow {
    color: #2563eb;
    transform: translateX(-5px);
}

.contact-channels-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

.contact-phone-section {
    margin-top: 20px;
}

.contact-phone-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.8;
    font-family: 'Vazirmatn', sans-serif;
}

.contact-phone-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-phone-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(14, 18, 31, 0.5);
    color: #ffffff;
    font-family: 'Vazirmatn', sans-serif;
    text-align: center;
}

.contact-phone-input:focus {
    outline: none;
    border-color: #172964;
    box-shadow: 0 0 0 3px rgba(23, 41, 100, 0.3);
    background: rgba(14, 18, 31, 0.8);
}

.contact-phone-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.contact-phone-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    background: #172964;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-phone-btn:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 41, 100, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Verification Code Modal Styles */
.verification-modal-content {
    max-width: 400px;
}

.verification-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.8;
    font-family: 'Vazirmatn', sans-serif;
}

.verification-inputs-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    direction: ltr;
}

.verification-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(14, 18, 31, 0.5);
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.verification-input:focus {
    outline: none;
    border-color: #172964;
    box-shadow: 0 0 0 3px rgba(23, 41, 100, 0.3);
    background: rgba(14, 18, 31, 0.8);
    transform: scale(1.05);
}

.verification-input:valid {
    border-color: #10b981;
}

.verification-resend {
    margin-top: 20px;
}

.btn-modal-secondary {
    background: transparent;
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.btn-modal-secondary:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: #2563eb;
}

.btn-modal-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#verificationError {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    .modal-title {
        font-size: 20px;
    }
    .contact-channels-description {
        font-size: 14px;
    }
    .contact-channel-item {
        padding: 14px 16px;
    }
    .contact-channel-icon {
        width: 45px;
        height: 45px;
    }
    .contact-channel-name {
        font-size: 15px;
    }
    .contact-channel-link {
        font-size: 13px;
    }
    .contact-phone-description {
        font-size: 14px;
    }
    .contact-phone-input {
        font-size: 15px;
        padding: 12px 16px;
    }
    .contact-phone-btn {
        font-size: 15px;
        padding: 12px 20px;
    }
    .verification-inputs-container {
        gap: 8px;
    }
    .verification-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .verification-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
}
