:root {
    --bg: #08080c;
    --bg-soft: #101018;
    --panel: #14141c;
    --panel-2: #1b1b25;
    --line: rgba(255, 255, 255, .08);
    --gold: #d4af37;
    --gold-bright: #ffd700;
    --gold-soft: rgba(212, 175, 55, .16);
    --text: #ececf2;
    --muted: #9a9aac;
    --danger: #ef5350;
    --ok: #66bb6a;
    --radius: 16px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: #fff3b0; }

img { max-width: 100%; display: block; }

.wrap {
    width: min(1160px, 92vw);
    margin: 0 auto;
}

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(8, 8, 12, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}

.brand img { height: 44px; width: auto; }

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
}

.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a.is-active { color: #fff; }
.nav .nav-quiet { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn-gold {
    background: linear-gradient(135deg, #ffe9a3, var(--gold) 55%, #b8860b);
    color: #16130a;
    box-shadow: 0 10px 30px rgba(212, 175, 55, .25);
}
.btn-gold:hover { transform: translateY(-1px); color: #16130a; box-shadow: 0 14px 36px rgba(212, 175, 55, .35); }

.btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .18);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

.btn-small { padding: 10px 18px; font-size: 14px; }
.btn-danger { background: rgba(239, 83, 80, .12); border-color: rgba(239, 83, 80, .35); color: #ff9c9a; }
.btn-danger:hover { background: rgba(239, 83, 80, .2); color: #fff; }

/* ---------- hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 84px 0 72px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(900px 420px at 70% 12%, rgba(212, 175, 55, .16), transparent 65%),
        radial-gradient(700px 360px at 12% 90%, rgba(212, 175, 55, .06), transparent 70%),
        linear-gradient(180deg, #0a0a10, #10101a);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 56px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-bright);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-bright), transparent);
}

.hero h1 {
    font-size: clamp(34px, 4.4vw, 56px);
    line-height: 1.08;
    margin: 0 0 18px;
    letter-spacing: -.5px;
}

.hero h1 em {
    font-style: normal;
    color: var(--gold-bright);
}

.hero p.lead {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 0 26px;
}

.hero .ar {
    display: block;
    direction: rtl;
    color: #c9c9d6;
    font-size: 15px;
    margin-top: 6px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-art {
    display: flex;
    justify-content: center;
}

.hero-art .badge {
    width: min(340px, 78%);
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .65));
    border-radius: 28%;
}

/* ---------- sections ---------- */
section { padding: 64px 0; }

.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(24px, 2.6vw, 34px); margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; line-height: 1.7; }

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
}

.card .icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--gold-soft);
    color: var(--gold-bright);
    font-size: 22px;
    margin-bottom: 18px;
}

.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    counter-reset: step;
}

.step {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 20px 22px;
}

.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    color: var(--gold);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .14em;
    display: block;
    margin-bottom: 10px;
}

.step h4 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.download-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    background:
        radial-gradient(520px 200px at 90% 0%, rgba(212, 175, 55, .18), transparent 70%),
        var(--panel);
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 22px;
    padding: 34px 36px;
}

.download-band h2 { margin: 0 0 8px; font-size: 26px; }
.download-band p { margin: 0; color: var(--muted); }

/* ---------- forms / panels ---------- */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.narrow { max-width: 520px; margin: 0 auto; }

.panel h1, .panel h2 { margin-top: 0; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; letter-spacing: .02em; }

.field input, .field select {
    width: 100%;
    background: #0d0d14;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    color: var(--text);
    padding: 13px 15px;
    font-size: 15px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus, .field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .16);
}

.field .hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.alert {
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 14.5px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert-error { background: rgba(239, 83, 80, .12); border-color: rgba(239, 83, 80, .3); color: #ffb4b2; }
.alert-ok { background: rgba(102, 187, 106, .12); border-color: rgba(102, 187, 106, .3); color: #b7e6b9; }

.flash {
    margin: 22px 0 0;
    border-radius: 12px;
    padding: 13px 18px;
    background: rgba(102, 187, 106, .12);
    border: 1px solid rgba(102, 187, 106, .3);
    color: #b7e6b9;
}

/* ---------- device dashboard ---------- */
.device-head {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin: 34px 0 26px;
}

.device-title h1 { margin: 0; font-size: 28px; }
.device-title p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(102, 187, 106, .12);
    color: #b7e6b9;
    border: 1px solid rgba(102, 187, 106, .3);
}
.badge-status.is-off { background: rgba(255, 255, 255, .06); color: var(--muted); border-color: var(--line); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}
.stat span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.stat strong { font-size: 19px; font-weight: 600; word-break: break-all; }

.split {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    align-items: start;
}

.playlist-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #101017;
    margin-bottom: 12px;
}

.playlist-item:last-child { margin-bottom: 0; }
.playlist-item h4 { margin: 0 0 4px; font-size: 16px; }
.playlist-item .meta { color: var(--muted); font-size: 13px; line-height: 1.6; word-break: break-all; }

.tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold-bright);
    background: var(--gold-soft);
    border-radius: 6px;
    padding: 3px 7px;
    margin-right: 6px;
}

.empty {
    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    color: var(--muted);
    font-size: 14.5px;
}

/* ---------- footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 30px;
    padding: 34px 0;
    background: #06060a;
}

.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { display: block; font-size: 15px; }
.footer-brand span { color: var(--muted); font-size: 12.5px; }
.footer-links { display: flex; gap: 20px; font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold-bright); }
.footer-copy { color: #5e5e70; font-size: 12.5px; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero-art { order: -1; }
    .hero-art .badge { width: min(260px, 60%); }
    .cards { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .nav { flex-wrap: wrap; gap: 14px; font-size: 14px; }
    .hero { padding: 54px 0 46px; }
    .hero p.lead { font-size: 15.5px; }
    .cards, .steps, .stat-grid, .form-row { grid-template-columns: 1fr; }
    .panel { padding: 22px; }
    .download-band { padding: 24px; }
    .playlist-item { flex-direction: column; }
}
