:root {
    color-scheme: dark;
    --bg: #090d18;
    --panel: #11182a;
    --panel-2: #161f34;
    --line: #283452;
    --text: #eef3ff;
    --muted: #9ca9c4;
    --accent: #7c9cff;
    --good: #64d98b;
    --warn: #ffd166;
    --bad: #ff7b7b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: radial-gradient(circle at top, #16213b 0, var(--bg) 42%);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
}

main {
    max-width: 1050px;
    margin: 0 auto;
    padding: 36px 18px 64px;
}

.top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
}

.brand {
    font-weight: 900;
    letter-spacing: .14em;
}

.pill {
    font-size: 12px;
    border: 1px solid var(--line);
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 20px;
}

.card {
    background: rgba(17, 24, 42, .94);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .2);
}

h1 {
    font-size: clamp(32px, 5vw, 55px);
    line-height: 1.02;
    margin: 0 0 14px;
}

h2 { margin: 0 0 18px; }

.lead {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.steps {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.step {
    background: var(--panel-2);
    border: 1px solid var(--line);
    padding: 13px 14px;
    border-radius: 14px;
    color: #c8d2e8;
}

.notice {
    border: 1px solid var(--line);
    background: #10172a;
    padding: 13px 14px;
    border-radius: 13px;
    margin: 0 0 14px;
}

.notice.bad { border-color: #683f47; color: #ffc7c7; }
.notice.good { border-color: #315f43; color: #baf6ca; }
.notice.warn { border-color: #655927; color: #ffe7a3; }

label {
    display: block;
    margin: 16px 0 8px;
    color: #c9d3e8;
    font-weight: 700;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    background: #0a1020;
    color: var(--text);
    padding: 14px 15px;
    border-radius: 12px;
    font: inherit;
    outline: none;
}

input:focus { border-color: var(--accent); }

button,
.button-link {
    border: 0;
    border-radius: 13px;
    padding: 14px 16px;
    font: inherit;
    font-weight: 850;
    background: linear-gradient(135deg, #7694ff, #8a69ff);
    color: white;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

button:disabled { opacity: .45; cursor: not-allowed; }

.pay-button {
    width: 100%;
    margin-top: 18px;
}

.presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.presets .preset {
    background: #1b2640;
    border: 1px solid var(--line);
    padding: 9px;
}

.small,
.muted {
    color: var(--muted);
    font-size: 13px;
}

.status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #202b45;
}

.status.paid { background: #143824; color: #9df2b7; }
.status.pending,
.status.processing { background: #433919; color: #ffe29a; }
.status.failed,
.status.error,
.status.expired { background: #47232b; color: #ffb6bf; }

.recent-card { margin-top: 20px; }
.result-card { max-width: 760px; margin: 8vh auto; }
.amount-big { font-size: 36px; font-weight: 900; margin: 8px 0; }

.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th,
.table td {
    text-align: left;
    padding: 11px 9px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table th { color: #93a2bf; }

.code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
    color: #b7c7ff;
}

.footer {
    margin-top: 24px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.button-link.secondary {
    background: #1b2640;
    border: 1px solid var(--line);
}

a { color: #adc0ff; }
code { color: #c6d2ff; }

@media (max-width: 800px) {
    .grid { grid-template-columns: 1fr; }
    .top { align-items: flex-start; flex-direction: column; }
    .presets { grid-template-columns: repeat(2, 1fr); }
    .actions { flex-direction: column; }
}
