:root {
    --gold: #e8a93c;
    --gold-light: #f8c96b;
    --gold-deep: #b8791f;
    --bg: #120a04;
    --bg-soft: #1b1108;
    --card: rgba(52, 33, 18, 0.66);
    --card-2: rgba(28, 17, 9, 0.78);
    --border: rgba(232, 169, 60, 0.16);
    --border-strong: rgba(232, 169, 60, 0.38);
    --text: #f8eddb;
    --text-2: #cfb392;
    --text-3: #91775b;
    --green: #57bd82;
    --red: #e2573f;
    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --mono: "Ubuntu", ui-monospace, "SF Mono", Menlo, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(120% 90% at 50% -10%, #35210f 0%, #1c1108 45%, var(--bg) 100%) fixed;
    color: var(--text);
    font-family: "Cairo", "Ubuntu", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.7;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(232, 169, 60, 0.05) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.5;
}

.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.glow-top {
    top: -220px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 420px;
    background: rgba(232, 169, 60, 0.22);
}

.glow-bottom {
    bottom: -260px;
    right: -120px;
    width: 520px;
    height: 380px;
    background: rgba(232, 169, 60, 0.10);
}

a {
    color: var(--gold-light);
    text-decoration: none;
}

a:hover {
    color: #fff3dc;
}

/* ---------- top bar ---------- */
.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: min(1120px, 92%);
    margin: 0 auto;
    padding: 22px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand img {
    border-radius: 14px;
    box-shadow: 0 0 0 1px var(--border-strong), 0 12px 26px -14px rgba(232, 169, 60, 0.8);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-text strong {
    font-size: 1.15rem;
    letter-spacing: 0.14em;
    background: linear-gradient(180deg, #ffe9bb, var(--gold) 55%, var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text small {
    color: var(--text-3);
    font-size: 0.72rem;
}

.topnav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, rgba(232, 169, 60, 0.16), rgba(232, 169, 60, 0.05));
    color: #f4d9a8;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.pill svg {
    width: 16px;
    height: 16px;
    color: var(--gold);
}

.pill:hover {
    transform: translateY(-1px);
    border-color: rgba(232, 169, 60, 0.7);
    background: linear-gradient(180deg, rgba(232, 169, 60, 0.3), rgba(232, 169, 60, 0.1));
}

/* ---------- hero ---------- */
main {
    position: relative;
    z-index: 2;
    width: min(1120px, 92%);
    margin: 0 auto;
    padding-bottom: 40px;
}

.hero {
    text-align: center;
    padding: 26px 0 40px;
}

.eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(232, 169, 60, 0.08);
    color: var(--gold-light);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(1.9rem, 4.6vw, 3.1rem);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.grad {
    background: linear-gradient(180deg, #ffe9bb, var(--gold) 50%, var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-2);
    font-size: 0.98rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.chip {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-2);
    font-size: 0.76rem;
}

/* ---------- cards ---------- */
.grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 20px;
    align-items: start;
}

.card {
    position: relative;
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--card), var(--card-2));
    box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0 18% auto 18%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 169, 60, 0.6), transparent);
}

.card h2 {
    margin: 0 0 18px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h2::before {
    content: "";
    width: 6px;
    height: 18px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
}

/* ---------- steps ---------- */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.steps li {
    display: flex;
    gap: 14px;
}

.step-n {
    flex: 0 0 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: rgba(232, 169, 60, 0.12);
    color: var(--gold-light);
    font-weight: 700;
    font-size: 0.85rem;
}

.steps strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}

.steps p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-2);
}

.note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 22px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(232, 169, 60, 0.28);
    background: rgba(232, 169, 60, 0.06);
    color: var(--text-2);
    font-size: 0.8rem;
}

.note svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--gold);
    margin-top: 3px;
}

/* ---------- form ---------- */
.user-welcome {
    display: none;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(87, 189, 130, 0.1);
    border: 1px solid rgba(87, 189, 130, 0.28);
    color: #b7e6c9;
    font-size: 0.82rem;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: var(--text-2);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="password"],
input[type="text"],
select {
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(232, 169, 60, 0.18);
    background: rgba(10, 6, 2, 0.72);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

.input-wrap input {
    padding-inline-end: 46px;
}

input::placeholder {
    color: #6b5540;
    font-family: var(--mono);
}

input:focus,
select:focus {
    outline: none;
    border-color: rgba(232, 169, 60, 0.55);
    box-shadow: 0 0 0 3px rgba(232, 169, 60, 0.18);
}

.ghost-btn {
    position: absolute;
    inset-inline-end: 8px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.ghost-btn:hover {
    color: var(--gold-light);
    background: rgba(232, 169, 60, 0.1);
}

.ghost-btn svg {
    width: 18px;
    height: 18px;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: "";
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-inline-start: 2px solid var(--gold);
    border-block-end: 2px solid var(--gold);
    transform: translateY(-70%) rotate(-45deg);
    pointer-events: none;
}

select {
    cursor: pointer;
    font-family: "Cairo", sans-serif;
    font-size: 0.9rem;
}

select option {
    background: #1b1108;
    color: var(--text);
}

.primary,
.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.primary {
    background: linear-gradient(180deg, #f6c877, var(--gold) 55%, #c78c26);
    color: #2a1708;
    box-shadow: 0 16px 34px -18px rgba(232, 169, 60, 0.9);
}

.primary svg {
    width: 18px;
    height: 18px;
}

.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.primary:disabled {
    opacity: 0.65;
    cursor: progress;
}

.secondary {
    background: rgba(232, 169, 60, 0.1);
    border: 1px solid var(--border-strong);
    color: var(--gold-light);
}

.secondary:hover {
    background: rgba(232, 169, 60, 0.2);
}

.primary.small,
.secondary.small {
    width: auto;
    padding: 10px 16px;
    font-size: 0.82rem;
}

/* ---------- toasts ---------- */
.toast {
    margin-top: 18px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(87, 189, 130, 0.32);
    background: linear-gradient(180deg, rgba(87, 189, 130, 0.12), rgba(20, 40, 28, 0.35));
}

.toast.hidden {
    display: none;
}

#privateUrlToast {
    border-color: var(--border-strong);
    background: linear-gradient(180deg, rgba(232, 169, 60, 0.12), rgba(40, 26, 12, 0.35));
}

.toast-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

.toast-close {
    border: none;
    background: transparent;
    color: var(--text-3);
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.toast-close:hover {
    color: var(--text);
}

.toast-body {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: var(--text-2);
}

.toast-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- terminal ---------- */
.terminal-card {
    margin-top: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(12, 7, 3, 0.92), rgba(20, 12, 6, 0.92));
    box-shadow: 0 30px 60px -45px rgba(0, 0, 0, 0.95);
    overflow: hidden;
    direction: ltr;
}

.terminal-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(232, 169, 60, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-r { background: #e2573f; }
.dot-y { background: var(--gold); }
.dot-g { background: var(--green); }

.terminal-label {
    margin-inline-start: auto;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--text-3);
    text-transform: uppercase;
    direction: rtl;
}

.terminal {
    margin: 0;
    padding: 18px;
    min-height: 168px;
    max-height: 340px;
    overflow: auto;
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.9;
    color: #d8cbb8;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal .terminal-info { color: #a58a63; }
.terminal .terminal-success { color: var(--green); }
.terminal .terminal-error { color: var(--red); }
.terminal .terminal-muted { color: var(--text-3); }

.caret {
    display: inline-block;
    width: 8px;
    height: 14px;
    margin-inline-start: 4px;
    background: var(--gold);
    vertical-align: -2px;
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ---------- footer ---------- */
.site-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: min(1120px, 92%);
    margin: 10px auto 34px;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(58, 38, 22, 0.5), rgba(20, 12, 6, 0.7));
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand img {
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--border-strong);
}

.footer-brand div {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.footer-brand strong {
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.footer-brand span {
    color: var(--text-3);
    font-size: 0.72rem;
}

.footer-links {
    display: flex;
    gap: 8px;
}

.footer-links a {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--gold-light);
    font-family: var(--mono);
}

.footer-links a:hover {
    border-color: var(--border-strong);
    background: rgba(232, 169, 60, 0.1);
}

.hidden {
    display: none !important;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 12px;
    }
}

@media (max-width: 560px) {
    .topbar {
        justify-content: center;
        text-align: center;
    }

    .card {
        padding: 20px;
    }

    .brand-text strong {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    footer.site-footer {
        justify-content: center;
        text-align: center;
    }
}
