/* ============================================================
   قولدن | Golden — تصميم صفحات الموقع (الشروط، الاسترداد، من نحن،
   الخصوصية، الدعم، حذف الحساب). مطابق لهوية download.html:
   أسود فحمي + ذهبي، زجاج معتم، توهّج ذهبي هادئ، خط Tajawal.
   ============================================================ */
:root {
    --gold: #D4AF37;
    --gold-light: #f1d77a;
    --gold-deep: #8B6914;
    --gold-dim: rgba(212, 175, 55, 0.18);
    --gold-glow: rgba(212, 175, 55, 0.45);
    --bg: #0a0b0f;
    --card: rgba(255, 255, 255, 0.03);
    --card-strong: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-2: #d7d9dc;
    --muted: #9aa0a6;
    --danger: #ef4444;
    --radius: 24px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg);
    color: var(--text-2);
    line-height: 1.85;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- التوهّج الخلفي (كما في الصفحة الرئيسية) ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient .glow-1 {
    position: absolute; width: 760px; height: 760px; top: -22%; inset-inline-start: -18%;
    background: radial-gradient(circle, var(--gold-dim) 0%, transparent 62%);
    filter: blur(60px); animation: float-slow 16s infinite alternate ease-in-out;
}
.ambient .glow-2 {
    position: absolute; width: 560px; height: 560px; bottom: -15%; inset-inline-end: -12%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.035) 0%, transparent 62%);
    filter: blur(40px); animation: float-slow 11s infinite alternate-reverse ease-in-out;
}
@keyframes float-slow { to { transform: translate(40px, 28px) scale(1.08); } }

/* ---------- الشريط العلوي ---------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(10, 11, 15, 0.72);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}
.site-header .bar {
    max-width: 920px; margin: 0 auto; padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; border: none; }
.brand:hover { border: none; }
.brand img {
    width: 38px; height: 38px; border-radius: 11px; object-fit: cover;
    box-shadow: 0 0 0 1px var(--gold-dim), 0 6px 16px var(--gold-dim);
}
.brand .name { color: var(--text); font-weight: 900; font-size: 18px; letter-spacing: -0.3px; }
.brand .name span { color: var(--gold); }
.nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
    white-space: nowrap; text-decoration: none; color: var(--muted);
    font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
    border: 1px solid transparent; transition: all 0.25s ease;
}
.nav a:hover { color: var(--text); background: var(--card-strong); }
.nav a[aria-current="page"] {
    color: var(--gold); border-color: rgba(212, 175, 55, 0.35);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.04));
}

/* ---------- الصفحة ---------- */
.page {
    position: relative; z-index: 1;
    max-width: 860px; margin: 0 auto; padding: 44px 20px 60px;
    animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero { text-align: center; margin-bottom: 30px; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: var(--gold);
    padding: 6px 14px; border-radius: 999px;
    background: var(--gold-dim); border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 16px;
}
.hero h1 {
    font-size: clamp(28px, 5.4vw, 42px); font-weight: 900; line-height: 1.25;
    letter-spacing: -0.5px; margin-bottom: 10px;
    background: linear-gradient(to left, #ffffff, #e0e0e0);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero h1 span { color: var(--gold); -webkit-text-fill-color: var(--gold); }
.hero .sub { color: var(--muted); font-size: 16px; max-width: 620px; margin: 0 auto; }
.hero .updated { display: block; margin-top: 12px; color: var(--muted); font-size: 13px; }

/* ---------- البطاقات ---------- */
.card, section.card {
    background: var(--card);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 16px;
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.3s ease;
}
section.card:hover { border-color: rgba(212, 175, 55, 0.22); }
/* القفز من الفهرس لا يُخفي العنوان تحت الشريط العلوي الثابت */
section.card[id] { scroll-margin-top: 84px; }

h2 {
    color: var(--gold); font-size: 19px; font-weight: 800; line-height: 1.5;
    margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
h2::before {
    content: ''; flex-shrink: 0; width: 6px; height: 22px; border-radius: 3px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    box-shadow: 0 0 12px var(--gold-glow);
}
h3 { color: var(--text); font-size: 16px; font-weight: 700; margin: 14px 0 8px; }

p { margin-bottom: 10px; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 700; }
a { color: var(--gold); text-decoration: none; border-bottom: 1px dashed rgba(212, 175, 55, 0.45); }
a:hover { color: var(--gold-light); border-bottom-style: solid; }
code {
    direction: ltr; display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace;
    color: var(--gold); font-size: 0.92em; background: var(--gold-dim);
    padding: 0 6px; border-radius: 6px;
}

ul, ol { padding-inline-start: 1.3em; margin-bottom: 10px; }
li { margin-bottom: 7px; }
li::marker { color: var(--gold); }

/* ---------- بطاقة هوية التطبيق (مطلوبة في Google Play) ---------- */
.identity {
    text-align: center;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.10), rgba(212, 175, 55, 0.02));
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: var(--radius);
    padding: 20px 22px; margin-bottom: 18px; font-size: 14px; color: var(--muted);
}
.identity .app-name { font-size: 20px; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.identity .app-name span { color: var(--gold); }
.identity .row { margin-top: 2px; }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; table-layout: fixed; }
td, th { overflow-wrap: anywhere; }
th, td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
tr:last-child td, tr:last-child th { border-bottom: none; }
th { color: var(--gold); font-weight: 700; background: rgba(212, 175, 55, 0.07); }
td { color: var(--text-2); }
table.kv th { width: 38%; }

/* ---------- تنبيهات ---------- */
.rule {
    border-inline-start: 4px solid var(--gold);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), transparent);
    padding: 14px 16px; border-radius: 12px; margin: 12px 0; color: var(--text-2);
}
.warning-box {
    text-align: center; border-radius: 18px; padding: 18px; margin: 22px 0;
    background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.28);
}
.warning-box p { color: #ff8080; font-weight: 700; margin-bottom: 4px; }
.contact {
    display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 14px 0;
}
.contact .item {
    background: var(--card-strong); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px;
}
.contact .label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.contact .value { color: var(--text); font-weight: 700; direction: ltr; display: inline-block; }

/* ---------- الأزرار ---------- */
.btn {
    display: block; text-align: center; font-weight: 800; font-size: 16px;
    padding: 15px 22px; border-radius: 18px; margin-top: 14px; border: none;
    color: #111; background: linear-gradient(135deg, var(--gold-light), var(--gold) 45%, var(--gold-deep));
    box-shadow: 0 12px 26px -8px var(--gold-glow); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover { color: #111; transform: translateY(-2px); box-shadow: 0 16px 30px -8px var(--gold-glow); border: none; }

/* ---------- فهرس الأقسام ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 22px; }
.toc a {
    font-size: 13px; color: var(--muted); border: 1px solid var(--border);
    background: var(--card); padding: 6px 12px; border-radius: 999px;
}
.toc a:hover { color: var(--gold); border-color: rgba(212, 175, 55, 0.35); }

/* ---------- النسخة الإنجليزية ---------- */
.en { direction: ltr; text-align: left; }
.lang-divider {
    display: flex; align-items: center; gap: 14px; color: var(--muted);
    font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin: 36px 0 18px;
}
.lang-divider::before, .lang-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
section.card .en { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }

/* ---------- حقول تُستكمل قبل النشر ---------- */
.todo { background: rgba(239, 68, 68, 0.18); color: #ff8a8a; padding: 0 8px; border-radius: 6px; font-weight: 700; }

/* ---------- التذييل ---------- */
.site-footer {
    position: relative; z-index: 1; text-align: center;
    border-top: 1px solid var(--border); padding: 26px 20px 34px; color: var(--muted); font-size: 13px;
}
.site-footer .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 10px; }
.site-footer .links a { color: var(--muted); border: none; }
.site-footer .links a:hover { color: var(--gold); }
.site-footer .copy span { color: var(--gold); font-weight: 700; }

@media (max-width: 560px) {
    .site-header .bar { padding: 10px 14px; }
    .brand .name { display: none; }
    .page { padding: 30px 14px 44px; }
    .card, section.card { padding: 20px 18px; border-radius: 20px; }
    h2 { font-size: 17.5px; }
    /* جدول «بيان/قيمة»: البيان فوق قيمته على الشاشة الضيقة */
    table.kv, table.kv tbody, table.kv tr, table.kv th, table.kv td { display: block; width: 100%; }
    table.kv th { border-bottom: none; padding-bottom: 2px; background: transparent; font-size: 13px; }
    table.kv td { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
