/* ============================================
   GF Signal - Auth Styles
   استایل مشترک همه‌ی صفحات احراز هویت
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

/* ==================== کانتینر اصلی ==================== */
.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.register-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

/* ==================== کارت فرم ==================== */
.register-form-container {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid #334155;
    border-radius: 20px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(56, 189, 248, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 500px;
    padding: 40px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.register-form-content {
    text-align: center;
}

/* ==================== لوگو و عنوان ==================== */
.logo-section {
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 48px;
    color: #38bdf8;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
    display: block;
}

.register-title {
    color: #f8fafc;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.register-subtitle {
    color: #94a3b8;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.7;
}

/* ==================== مراحل فرم ==================== */
.form-step {
    transition: all 0.3s ease;
}

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

.step {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    background: #334155;
    color: #94a3b8;
    border: 2px solid #475569;
    transition: all 0.3s ease;
}

.step.active {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
}

.step.completed {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #334155;
    max-width: 60px;
}

/* ==================== کادر راهنما ==================== */
.step-info {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.step-info i {
    font-size: 32px;
    color: #38bdf8;
    margin-bottom: 10px;
    display: block;
}

.step-info h3 {
    color: #f8fafc;
    margin-bottom: 8px;
    font-size: 18px;
}

.step-info p {
    color: #cbd5e1;
    font-size: 14px;
    margin: 0;
    line-height: 1.7;
}

/* ==================== فیلدهای فرم ==================== */
.form-group {
    margin-bottom: 25px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #334155;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #1e293b;
    color: #f8fafc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    border-color: #38bdf8;
    background: #1e293b;
    box-shadow:
        0 0 0 3px rgba(56, 189, 248, 0.1),
        0 0 20px rgba(56, 189, 248, 0.2);
    outline: none;
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f8fafc;
    -webkit-box-shadow: 0 0 0 1000px #1e293b inset;
    transition: background-color 5000s ease-in-out 0s;
    border: 2px solid #334155;
}

/* ==================== هشدار زبان ==================== */
.language-warning {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    margin-top: 8px;
    color: #fbbf24;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
    text-align: right;
}

.language-warning i {
    color: #f59e0b;
    font-size: 16px;
    flex-shrink: 0;
}

/* ==================== قدرت رمز عبور ==================== */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 12px;
    color: #94a3b8;
    text-align: right;
}

/* ==================== دکمه اصلی ==================== */
.register-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    color: #0f172a;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.register-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px rgba(56, 189, 248, 0.4),
        0 0 0 1px rgba(56, 189, 248, 0.2);
}

.register-button:active {
    transform: translateY(0);
}

.register-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ==================== دکمه ثانویه ==================== */
.btn-secondary {
    width: auto;
    padding: 12px 20px;
    background: #475569;
    color: #f8fafc;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-secondary:hover {
    background: #64748b;
    transform: translateY(-1px);
}

/* ==================== چیدمان دکمه‌ها ==================== */
.step-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.step-actions .register-button {
    flex: 1;
    margin-bottom: 0;
}

.step-actions .btn-secondary {
    flex: 0 0 auto;
}

/* ==================== لینک‌های پایین فرم ==================== */
.login-link {
    margin-top: 20px;
    text-align: center;
}

.login-link p {
    color: #cbd5e1;
    margin-bottom: 10px;
    font-size: 14px;
}

.login-link p:last-child {
    margin-bottom: 0;
}

.login-link a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-link a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* ==================== لینک بازگشت به خانه ==================== */
.home-link-container {
    text-align: center;
    margin-top: 20px;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.1);
}

.home-link:hover {
    color: #60a5fa;
    background: rgba(56, 189, 248, 0.2);
    transform: translateX(-5px);
}

/* ==================== پیام‌ها ==================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    border: 1px solid;
    text-align: right;
    font-size: 14px;
    line-height: 1.6;
}

.alert.success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.error-text {
    color: #f87171;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    text-align: right;
}

/* ==================== انیمیشن‌ها ==================== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

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

/* ==================== ریسپانسیو ==================== */
@media (max-width: 480px) {
    .register-form-container {
        padding: 30px 20px;
        margin: 10px;
    }

    .register-title {
        font-size: 24px;
    }

    .form-group input {
        padding: 12px;
    }

    .step-actions {
        flex-direction: column;
    }
}