:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.8);
    --text-primary: #f8fafc;
    --gold-bright: #ffce54;
    --gold-dark: #d4af37;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding: 30px 0;
    min-height: 100vh;
    margin: 0;
    /* حذف هرگونه overflow:hidden برای فعال شدن اسکرول */
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    padding: 25px 20px;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    width: 88%;
    max-width: 330px;
    margin-bottom: 20px;
}

h2 { text-align: center; margin-bottom: 8px; font-size: 22px; color: var(--gold-bright); }
#status { text-align: center; margin-bottom: 15px; font-size: 11px; color: #a7f3d0 !important; }

.input-group { margin-bottom: 12px; }
.input-group label { display: block; margin-bottom: 5px; font-size: 13px; color: #94a3b8; }

input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    font-size: 20px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: bold;
    height: 50px;
    border-radius: 15px;
    text-align: center;
    box-sizing: border-box;
    color: #fff;
}

#ons-input { color: #4ade80 !important; }
#usd-input { color: #38bdf8 !important; }
#g18-input { color: var(--gold-bright) !important; }

#result-box {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
}

.price-value { font-size: 26px; font-weight: 900; display: block; color: var(--gold-bright); }


/* بخش بنر طلایی میلی */
/* بخش بنر طلایی میلی */
.milli-section {
    margin-top: 10px; /* کاهش فاصله با کادر بالا */
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 206, 84, 0.2);
}

.producer-text {
    text-align: center; 
    margin-bottom: 12px; 
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    line-height: 1.6;
    /* ایجاد افکت درخشش بنفش حرفه‌ای */
    text-shadow: 0 0 5px #a855f7, 0 0 10px #a855f7, 0 0 20px #7c3aed;
    animation: purple-glow 2s ease-in-out infinite alternate;
}

/* انیمیشن برای ضربان‌دار شدن درخشش */
@keyframes purple-glow {
    from {
        text-shadow: 0 0 5px #a855f7, 0 0 10px #a855f7, 0 0 15px #7c3aed;
    }
    to {
        text-shadow: 0 0 10px #a855f7, 0 0 20px #a855f7, 0 0 30px #7c3aed, 0 0 40px #6d28d9;
    }
}

/* افکت اختیاری برای خود کادر بنر اگر بخواهید درخشش بنفش ملایم داشته باشد */
.milli-gold-card {
    display: block;
    text-decoration: none;
    background: linear-gradient(145deg, #f39c12, #ffce54, #d4af37);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4); /* سایه بنفش ملایم دور کادر */
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.4);
}

.milli-gold-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(243, 156, 18, 0.5);
}

.milli-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.milli-head {
    color: #000;
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 5px;
}

.milli-sub {
    color: #444;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 12px;
}

.milli-btn {
    background: #000;
    color: #fff;
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* رفع مشکل نمایش در موبایل */
@media (max-width: 480px) {
    body { padding: 20px 0; }
    .container { width: 90%; max-width: 310px; padding: 18px; }
    input { height: 46px; font-size: 18px; }
    .producer-text { font-size: 13px; }
    .milli-head { font-size: 14px; }
}

.signal { margin-top: 10px; padding: 6px; border-radius: 12px; font-size: 13px; font-weight: bold; }
.signal.buy { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.signal.sell { background: rgba(248, 113, 113, 0.2); color: #f87171; }