:root {
    --primary-color: #d4af37; 
    --primary-hover: #b5952f;
    --text-dark: #2c3e50;
    --glass-border: #ffffff; 
}

/* پس‌زمینه ثابت لاکچری */
body { 
    font-family: 'Vazirmatn', Tahoma, sans-serif !important; 
    direction: rtl; 
    text-align: right; 
    margin: 0; 
    padding: 10px; 
    box-sizing: border-box;
    min-height: 100svh; 
    background-color: #fcf0f4; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* باکس اصلی: قاب سفید ضخیم و فشرده‌تر */
.binito-wrapper { 
    width: 100%; 
    max-width: 420px; 
    margin: 0 auto; 
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,235,240,0.9), rgba(255,245,235,0.95), rgba(255,225,235,0.9));
    background-size: 300% 300%;
    animation: boxAlive 8s ease-in-out infinite; 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border: 4px solid var(--glass-border); 
    border-radius: 24px; 
    box-shadow: 0 15px 35px rgba(230,190,200,0.4), inset 0 0 0 1px rgba(255,255,255,1);
    padding: 25px; 
    position: relative; 
    overflow: hidden;
}

@keyframes boxAlive { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* دکمه مرحله قبل (شیک و اپلیکیشنی) */
.binito-back-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.05);
    color: #555;
    padding: 6px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.binito-back-btn:hover { background: #fff; color: var(--primary-color); transform: translateX(-2px); }

/* لوگوی سایت - وسط‌چین قطعی */
.binito-logo {
    display: flex;
    justify-content: center; 
    align-items: center; 
    width: 100%;
    margin: 0 auto 15px auto;
}
.binito-logo img {
    display: block; 
    margin: 0 auto;
    width: auto;
    max-width: 100px; 
    height: auto;
    max-height: 70px;
    object-fit: contain;
    border: none;
    box-shadow: none;
}

/* نوار پیشرفت ظریف‌تر */
.progress-container {
    width: 100%; height: 5px; background: rgba(0,0,0,0.06);
    border-radius: 10px; margin-bottom: 20px; overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.progress-fill {
    height: 100%; width: 5%; 
    background: linear-gradient(90deg, #d4af37, #f9e596, #d4af37);
    background-size: 200% 100%;
    border-radius: 10px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(212,175,55,0.5);
    animation: shimmerProgress 2s linear infinite; 
}
@keyframes shimmerProgress { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* مراحل و سوالات */
.binito-step { display: none; }
.binito-step.active { display: block; animation: slideUpFade 0.4s ease; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.binito-step p.question-title { 
    font-size: 15px; 
    font-weight: 800; color: var(--text-dark); 
    margin-bottom: 12px; line-height: 1.5; text-align: right;
}

/* گزینه‌های فشرده‌تر */
.binito-option { 
    display: flex; align-items: center; cursor: pointer; margin-bottom: 8px; 
    padding: 10px 14px; background: rgba(255, 255, 255, 0.8); 
    border: 2px solid #fff; border-radius: 12px; transition: 0.2s; 
}
.binito-option:hover { background: #fff; transform: translateY(-1px); border-color: #eaddb6; }
.binito-option input[type="radio"] { display: none; }

.radio-mark { 
    width: 18px; height: 18px; border: 2px solid #ccc; border-radius: 50%; 
    margin-left: 10px; position: relative; transition: 0.3s; flex-shrink: 0;
}
.binito-option input[type="radio"]:checked + .radio-mark { border-color: var(--primary-color); }
.binito-option input[type="radio"]:checked + .radio-mark::after { 
    content: ''; position: absolute; inset: 3px; background: var(--primary-color); 
    border-radius: 50%; animation: popIn 0.3s;
}
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
.binito-option:has(input[type="radio"]:checked) {
    background: #fff; border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}
.option-text { font-size: 13.5px; font-weight: bold; color: #444; }

/* فرم‌های ورودی در یک ردیف */
.inline-fields { display: flex; gap: 8px; margin-bottom: 8px; }
.inline-fields input { flex: 1; margin-bottom: 0 !important; }

.final-inputs { 
    width: 100%; padding: 12px; margin-bottom: 8px; border: 2px solid #fff; 
    border-radius: 12px; background: rgba(255,255,255,0.9); box-sizing: border-box; 
    font-size: 13px; font-family: inherit; transition: 0.3s; outline: none;
}
.final-inputs:focus { background: #fff; border-color: var(--primary-color); }
.otp-input { letter-spacing: 10px; font-size: 20px; text-align: center; font-weight: bold; }

.btn-submit { 
    width: 100%; padding: 12px; background: var(--primary-color); color: #fff; 
    border: none; border-radius: 12px; font-size: 14.5px; font-weight: 800; font-family: inherit;
    cursor: pointer; transition: 0.3s; box-shadow: 0 4px 12px rgba(212,175,55,0.3); margin-top: 5px;
}
.btn-submit:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-resend { background: transparent; color: #666; border: none; font-family: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; margin-top: 10px; display: none; width: 100%; }

/* اسکنر هوش مصنوعی */
#binito-loading { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); 
    z-index: 9999; flex-direction: column; align-items: center; justify-content: center;
}
.ai-scanner {
    width: 90px; height: 90px; border: 2px solid rgba(212,175,55,0.3);
    border-radius: 16px; position: relative; overflow: hidden; margin-bottom: 15px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50 20 Q 80 20, 80 50 Q 80 80, 50 80 Q 20 80, 20 50 Q 20 20, 50 20" fill="none" stroke="%23ccc" stroke-width="2" stroke-dasharray="5,5"/></svg>') center/cover;
}
.ai-laser {
    width: 100%; height: 2px; background: var(--primary-color);
    box-shadow: 0 0 8px 2px rgba(212,175,55,0.8);
    position: absolute; animation: scan 1.5s infinite ease-in-out;
}
@keyframes scan { 0% { top: 0; opacity:0; } 10% { opacity:1; } 90% { opacity:1; } 100% { top: 100%; opacity:0; } }

/* 🌟 بهینه‌سازی اختصاصی و میلی‌متری برای موبایل 🌟 */
@media (max-width: 480px) {
    body { padding: 5px; }
    .binito-wrapper {
        padding: 20px 15px;
        border-radius: 20px;
        border-width: 3px; 
    }
    .binito-back-btn { top: 15px; right: 15px; padding: 5px 10px; font-size: 11px; }
    .binito-logo { margin-bottom: 10px; }
    .binito-logo img { max-width: 80px; max-height: 55px; }
    .binito-step p.question-title { font-size: 13.5px; margin-bottom: 10px; }
    .binito-option { padding: 8px 12px; margin-bottom: 6px; border-radius: 10px; }
    .option-text { font-size: 12.5px; }
    .progress-container { margin-bottom: 12px; height: 4px; }
    .inline-fields { flex-direction: row; gap: 6px; margin-bottom: 6px; }
    .final-inputs { padding: 10px; font-size: 12px; margin-bottom: 6px; border-radius: 10px;}
    .btn-submit { padding: 11px; font-size: 14px; border-radius: 10px;}
    .otp-input { font-size: 18px; letter-spacing: 8px;}
}