/* ============================================
   استایل اختصاصی صفحات ورود و ثبت نام
   دیوار گمشدگان
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* افکت پس‌زمینه */
body.auth-page::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 60%);
    animation: rotateBg 30s linear infinite;
    pointer-events: none;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* کانتینر اصلی */
.auth-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

/* باکس اصلی */
.auth-box {
    background: #ffffff;
    border-radius: 25px;
    padding: 45px 40px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    animation: slideUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2, #ffd700);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* هدر */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.logo-small {
    display: inline-block;
    font-size: 15px;
    font-weight: 900;
    color: #2d3436;
    text-decoration: none;
    margin-bottom: 20px;
    padding: 8px 20px;
    background: linear-gradient(90deg, #ffd700, #ffed4a);
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
}

.logo-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.auth-header h2 {
    font-size: 28px;
    color: #2d3436;
    margin-bottom: 8px;
    font-weight: 900;
}

.auth-header p {
    color: #999;
    font-size: 14px;
}

/* Alert ها */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 22px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-error {
    background: #fee;
    color: #c0392b;
    border-right: 4px solid #e74c3c;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-right: 4px solid #27ae60;
}

/* فرم */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #2d3436;
    font-size: 14px;
    display: block;
}

.form-group .required {
    color: #e74c3c;
    margin-right: 2px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: #2d3436;
    background: #f8f9fa;
    transition: all 0.3s;
    direction: rtl;
    text-align: right;
}

.form-group input::placeholder {
    color: #adb5bd;
    font-size: 13px;
}

.form-group input:focus {
    border-color: #667eea;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.form-group input:hover:not(:focus) {
    border-color: #b8c4ff;
}

/* ردیف دوستونه */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* دکمه اصلی */
.btn-auth {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-auth:hover::before {
    width: 400px;
    height: 400px;
}

.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.btn-auth:active {
    transform: translateY(-1px);
}

/* فوتر */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-size: 14px;
}

.auth-footer p {
    margin-bottom: 8px;
}

.auth-footer a {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* واکنش‌گرا */
@media (max-width: 500px) {
    .auth-box {
        padding: 30px 22px;
        border-radius: 20px;
    }

    .auth-header h2 {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-form {
        gap: 14px;
    }

    .form-group input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .btn-auth {
        padding: 14px;
        font-size: 15px;
    }

    .logo-small {
        font-size: 13px;
        padding: 6px 16px;
    }
}

/* اسکرول‌بار سفارشی برای فایرفاکس */
.auth-box {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f0f0f0;
}