:root {
    --bg-1: #0b0e17;
    --bg-2: #131827;
    --card: #181d2d;
    --line: #262c42;
    --text: #e8ebf5;
    --muted: #8890ad;
    --accent: #f7931a;
    --accent-2: #ffa938;
    --danger: #ff4f64;
    --success: #24c77b;
    --radius: 14px;
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: radial-gradient(ellipse at top, var(--bg-2) 0%, var(--bg-1) 70%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.pay-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pay-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.pay-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.pay-head {
    text-align: center;
    margin-bottom: 22px;
}

.pay-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.3px;
    color: var(--accent);
}

.pay-sub {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.site-badge {
    display: block;
    background: rgba(247, 147, 26, 0.08);
    border: 1px solid rgba(247, 147, 26, 0.25);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.45;
}
.site-badge strong { color: var(--accent); font-weight: 700; }
.site-badge code {
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--muted);
}

.pay-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Карточка плана (режим подписки) */
.plan-card {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.12) 0%, rgba(255, 169, 56, 0.04) 100%);
    border: 1px solid rgba(247, 147, 26, 0.35);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    text-align: center;
}

.plan-card .plan-name {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 6px;
}

.plan-card .plan-price {
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 8px;
}

.plan-card .plan-price .plan-currency {
    font-size: 18px;
    color: var(--muted);
    font-weight: 600;
    margin-left: 4px;
}

.plan-card .plan-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}

.plan-card .plan-period {
    font-size: 12px;
    color: var(--accent);
    margin-top: 6px;
    font-weight: 600;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.field-hint {
    color: var(--muted);
    opacity: 0.7;
    font-weight: 400;
}

.field input,
.field select {
    background: var(--bg-1);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.field input::placeholder { color: #4b5372; }

.field input:focus,
.field select:focus {
    border-color: var(--accent);
    background: #11162a;
}

.field input[readonly] {
    color: var(--text);
    opacity: 0.85;
    cursor: not-allowed;
    font-weight: 600;
}

.field input[readonly]:focus {
    border-color: var(--line);
    background: var(--bg-1);
}

.field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px var(--bg-1) inset;
    -webkit-text-fill-color: var(--text);
}

.field-amount {
    display: flex;
    gap: 8px;
}

.field-amount input {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

.field-amount select {
    width: 92px;
    font-weight: 600;
    cursor: pointer;
}

.field input[type=number]::-webkit-outer-spin-button,
.field input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.field input[type=number] { -moz-appearance: textfield; }

.quick-amounts {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    flex: 1;
    min-width: 60px;
    background: var(--bg-1);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.chip:hover {
    color: var(--text);
    border-color: var(--accent);
}

.chip.active {
    background: rgba(247, 147, 26, 0.12);
    color: var(--accent);
    border-color: var(--accent);
}

.pay-btn {
    position: relative;
    margin-top: 6px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #111;
    border: 0;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.05s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 6px 20px -6px rgba(247, 147, 26, 0.55);
}

.pay-btn:hover:not(:disabled) { box-shadow: 0 10px 30px -6px rgba(247, 147, 26, 0.7); }
.pay-btn:active:not(:disabled) { transform: translateY(1px); }
.pay-btn:disabled { cursor: not-allowed; opacity: 0.7; }

.pay-btn.is-loading .pay-btn-text { visibility: hidden; }
.pay-btn.is-loading .pay-btn-loader {
    display: block;
    position: absolute;
    left: 50%; top: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(0,0,0,0.25);
    border-top-color: #111;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.pay-btn-loader { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.pay-error {
    background: rgba(255, 79, 100, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 79, 100, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
}

.pay-foot {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.pay-coins {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.pay-coins span {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--muted);
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-weight: 600;
}

.pay-note {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.pay-note a {
    color: var(--accent);
    text-decoration: none;
}
.pay-note a:hover { text-decoration: underline; }

/* Status pages (success/fail) */
.status-card { text-align: center; }
.status-icon {
    width: 64px; height: 64px;
    margin: 8px auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}
.status-icon.ok { background: rgba(36, 199, 123, 0.15); color: var(--success); }
.status-icon.fail { background: rgba(255, 79, 100, 0.15); color: var(--danger); }
.status-card h1 { font-size: 22px; margin: 0 0 8px; }
.status-card p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

@media (max-width: 480px) {
    .pay-card { padding: 22px 18px; border-radius: 12px; }
    .pay-logo { font-size: 18px; }
}
