/* ═══ إشارة — خامات منصات العملات المشفرة ═══
   زجاجية + توهجات + أقراص رموز متدرجة · نمطان: داكن (افتراضي) وفاتح */

:root {
    --bg: #0A0E17;
    --bg-glow-1: rgba(23,196,140,.07);
    --bg-glow-2: rgba(99,102,241,.06);
    --panel: rgba(255,255,255,.045);
    --panel-solid: #121826;
    --line: rgba(255,255,255,.08);
    --ink: #EEF2F7;
    --muted: #8B98AB;
    --rise: #16C784;         /* أخضر CoinMarketCap */
    --fall: #EA3943;         /* أحمره */
    --flat: #8FA3B0;
    --gold: #F0B90B;         /* ذهبي Binance — خط الفصل */
    --radius: 16px;
    --glass-blur: 14px;
    --shadow: 0 8px 32px rgba(0,0,0,.35);
}
html[data-theme="light"] {
    --bg: #F4F6FB;
    --bg-glow-1: rgba(22,199,132,.10);
    --bg-glow-2: rgba(99,102,241,.08);
    --panel: rgba(255,255,255,.72);
    --panel-solid: #FFFFFF;
    --line: rgba(16,24,40,.09);
    --ink: #101828;
    --muted: #5B6B7E;
    --rise: #0E9F6E;
    --fall: #D92D3F;
    --gold: #C99417;
    --shadow: 0 8px 28px rgba(16,24,40,.08);
}

* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

body {
    margin: 0; color: var(--ink);
    font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    font-size: 15px; line-height: 1.7;
    background: var(--bg);
    background-image:
        radial-gradient(600px 400px at 85% -10%, var(--bg-glow-1), transparent 60%),
        radial-gradient(700px 500px at -10% 30%, var(--bg-glow-2), transparent 60%);
    background-attachment: fixed;
}
.num, .px, .chip, .stat-v { font-family: "IBM Plex Mono", Consolas, monospace;
    font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: embed; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ── الشريط العلوي الزجاجي ── */
.topbar {
    background: var(--panel);
    -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--line);
    padding: .65rem 1.4rem; display: flex; align-items: center; gap: 1rem;
    position: sticky; top: 0; z-index: 10;
}
.brand { color: var(--ink); font-size: 1.3rem; font-weight: 700; text-decoration: none;
    background: linear-gradient(90deg, var(--rise), var(--gold));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tagline { color: var(--muted); font-size: .78rem; }
.top-actions { margin-inline-start: auto; display: flex; gap: .5rem; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
    background: var(--panel); color: var(--ink); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: border-color .15s, transform .1s;
}
.icon-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-btn.bell-btn.on { color: var(--gold); border-color: var(--gold); }
html[data-theme="light"] .moon-ic { display: block; } html[data-theme="light"] .sun-ic { display: none; }
.moon-ic { display: none; } .sun-ic { display: block; }

.content { flex: 1; padding: 1.4rem; max-width: 1100px; margin: 0 auto; width: 100%; }

/* ── شارة البيانات الوهمية — لا تُفوَّت ── */
.demo-banner {
    background: linear-gradient(90deg, rgba(240,185,11,.18), rgba(240,185,11,.08));
    border: 1px solid var(--gold); color: var(--gold);
    border-radius: 12px; padding: .7rem 1.1rem; margin-bottom: 1rem;
    font-weight: 600; display: flex; align-items: center; gap: .6rem;
}

/* ── شريط السوق ── */
.market-bar {
    display: flex; gap: 1.6rem; flex-wrap: wrap; align-items: center;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
    padding: .7rem 1.15rem; margin-bottom: 1.1rem; font-size: .85rem; box-shadow: var(--shadow);
}
.market-bar .lbl { color: var(--muted); margin-inline-end: .35rem; }
.market-bar .up { color: var(--rise); } .market-bar .down { color: var(--fall); }

/* ── بطاقات زجاجية ── */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.card {
    position: relative; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow);
    padding: 1rem 1.05rem .85rem; text-decoration: none; color: var(--ink);
    display: block; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--gold); transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(240,185,11,.10), var(--shadow); }
.card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.card-head { display: flex; align-items: center; gap: .7rem; }
/* قرص الرمز — أيقونة عملة */
.coin {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: .82rem;
    color: #fff; letter-spacing: .5px;
    box-shadow: inset 0 -6px 12px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.25);
}
.card .sym { font-weight: 700; font-size: 1rem; letter-spacing: .3px; }
.card .name { color: var(--muted); font-size: .76rem; margin-top: .05rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.card .head-txt { min-width: 0; }
.card .chip { margin-inline-start: auto; }

.card-price-row { margin-top: .6rem; }
.card .px { font-size: 1.5rem; font-weight: 600; }
.chip { font-size: .74rem; padding: .16rem .55rem; border-radius: 999px; font-weight: 700; }
.chip.rise { background: rgba(22,199,132,.15); color: var(--rise); }
.chip.fall { background: rgba(234,57,67,.15); color: var(--fall); }
.chip.flat { background: rgba(143,163,176,.15); color: var(--flat); }
.card svg.spark { display: block; width: 100%; height: 46px; margin-top: .4rem; }
.stance { font-size: .74rem; color: var(--muted); margin-top: .45rem;
    display: flex; align-items: center; gap: .4rem; }
.stance::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.stance.pos::before { background: var(--rise); box-shadow: 0 0 6px var(--rise); } .stance.pos { color: var(--rise); }
.stance.neg::before { background: var(--fall); box-shadow: 0 0 6px var(--fall); } .stance.neg { color: var(--fall); }
.stance.neu::before { background: var(--gold); box-shadow: 0 0 6px var(--gold); } .stance.neu { color: var(--gold); }

/* ── صفحة التقرير ── */
a.back { color: var(--muted); font-size: .85rem; text-decoration: none; }
a.back:hover { color: var(--ink); }
.price-hero {
    display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.3rem;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow);
    padding: 1.05rem 1.25rem; margin: .8rem 0 1rem;
}
.price-hero .title { font-size: 1.02rem; font-weight: 700; }
.price-hero .title small { display: block; color: var(--muted); font-weight: 400; font-size: .76rem; }
.price-hero .big { font-size: 2.3rem; font-weight: 700; line-height: 1; }
.stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-inline-start: auto; }
.stat { text-align: center; }
.stat-l { color: var(--muted); font-size: .72rem; }
.stat-v { font-size: .95rem; }

.chart-wrap, .report-text, .calc {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow);
}
.chart-wrap { padding: 1rem; margin-bottom: 1rem; }
.report-text { padding: 1.25rem 1.4rem; white-space: pre-wrap; line-height: 2; font-size: .93rem; }

/* ── الحاسبة ── */
.calc { padding: 1.25rem 1.4rem; margin-top: 1rem; }
.calc h2 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--gold); }
.calc label { display: block; margin: .7rem 0 .25rem; color: var(--muted); font-size: .82rem; }
.calc input {
    width: 100%; padding: .6rem .85rem; border-radius: 10px;
    border: 1px solid var(--line); background: var(--panel-solid); color: var(--ink);
    font-size: 1rem; font-family: "IBM Plex Mono", monospace;
}
.calc input:focus-visible { outline: 2px solid var(--gold); border-color: var(--gold); }
.calc button, .login button {
    margin-top: 1.1rem; width: 100%; padding: .78rem; border: 0; border-radius: 11px;
    background: linear-gradient(135deg, var(--rise), #0E9F6E); color: #fff;
    font-size: 1rem; font-weight: 700; cursor: pointer; font-family: inherit;
    box-shadow: 0 6px 18px rgba(22,199,132,.25);
}
.calc button:hover, .login button:hover { filter: brightness(1.07); }
.result { margin-top: 1rem; padding: 1rem 1.2rem; border-radius: 12px;
    background: rgba(22,199,132,.10); border: 1px solid rgba(22,199,132,.4); line-height: 2; }
.err { color: var(--fall); margin-top: .6rem; font-size: .9rem; }

/* ── الدخول ── */
.login { max-width: 390px; margin: 4.5rem auto; background: var(--panel);
    -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem;
    box-shadow: var(--shadow); }
.login h1 { margin-top: 0; }
.login input { width: 100%; padding: .68rem .85rem; border-radius: 10px;
    border: 1px solid var(--line); background: var(--panel-solid); color: var(--ink); font-size: 1rem; }

.foot { padding: .9rem 1.4rem; color: var(--muted); font-size: .74rem;
    border-top: 1px solid var(--line); text-align: center; }
h1 { font-size: 1.35rem; margin: .2rem 0 1rem; }
