:root {
    --bg: #0b0e12;
    --panel: #0f141a;
    --text: #e6edf3;
    --muted: #8b949e;
    --accent: #5863ff;
    --nick: #6a71df;
    --verse: #c9d1d9;
    --link: #6a71df;
    --line: #1f252b;
    --radius: 14px;
    --highlight: rgba(88, 99, 255, 0.15);
    --bookmark: #ffd700;
}

* {
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    border-radius: 1rem;
    background: var(--link);
}

html,
body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

.wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    width: 100%;
    max-width: 1000px;
}

header h1 {
    margin: 0;
    font-size: clamp(18px, 4vw, 22px);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: clamp(12px, 2.5vw, 13px);
}

.card {
    width: 100%;
    max-width: 1000px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.instructions {
    padding: 20px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.1);
}

.instructions strong {
    color: var(--accent);
}

.scripture {
    font-style: italic;
    color: var(--verse);
    margin: 14px 0;
    padding: 12px;
    border-left: 3px solid var(--accent);
    background: rgba(88, 99, 255, 0.05);
    border-radius: 0 8px 8px 0;
}

.donation-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.donation-options {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.05);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: 1px;
    -ms-overflow-style: none;
    justify-content: center;
}

.donation-options::-webkit-scrollbar {
    display: none;
}

.donation-option {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.donation-option:hover,
.donation-option.active {
    background: var(--highlight);
    color: var(--accent);
    border-color: var(--accent);
}

.donation-custom-input {
    all: unset;
    text-align: center;
    width: 60px;
    font-size: 13px;
    color: var(--text);
    cursor: text;
}

.donation-custom-input::-webkit-inner-spin-button,
.donation-custom-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.donation-custom-input[type="number"] {
    -moz-appearance: textfield;
}

.crypto-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    display: table;
}

.crypto-table thead {
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid var(--line);
}

.crypto-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--accent);
    font-size: 14px;
}

.crypto-table tbody tr {
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
}

.crypto-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.crypto-table td {
    padding: 18px 20px;
    vertical-align: middle;
}

.crypto-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    color: var(--accent);
}

.crypto-name {
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.wallet-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.wallet {
    word-break: break-all;
    font-family: monospace;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 45px 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    flex: 1;
    transition: all 0.2s ease;
    line-height: 1.4;
    color: var(--muted);
}

.wallet:hover {
    background: rgba(255, 255, 255, 0.06);
}

.copy-btn-inside {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 14px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.copy-btn-inside:hover {
    color: var(--accent);
    background: rgba(88, 99, 255, 0.1);
}

.crypto-amount {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.crypto-amount i {
    font-size: 11px;
    color: var(--accent);
}

.log {
    padding: 10px 0;
    display: none;
    flex-direction: column;
    gap: 16px;
}

.line {
    padding: 16px 18px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--line);
    margin: 0 16px;
}

.line:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.crypto-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.prefix {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.prefix i {
    font-size: 16px;
    color: var(--accent);
    width: 24px;
    text-align: center;
    line-height: 1;
    vertical-align: middle;
}

.thank-you-message {
    display: none;
    text-align: center;
    padding: 10px;
    margin: 10px 20px;
    border-radius: 8px;
    background: rgba(88, 99, 255, 0.1);
    color: var(--accent);
    font-size: 14px;
}

.bottom-nav {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: var(--panel);
    justify-content: center;
    flex-wrap: wrap;
}

.nav-buttons.bottom-nav {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: var(--panel);
    justify-content: center;
    flex-wrap: wrap;
}

.nav-buttons.bottom-nav a,
.nav-buttons.bottom-nav button {
    flex: 1;
    min-width: 120px;
}

.nav-buttons.bottom-nav button {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    background-color: var(--highlight);
    color: #fff;
    transition: background 0.2s;
}

.nav-buttons.bottom-nav button:hover {
    background-color: #6a71df;
}

.nav-buttons.bottom-nav a button {
    background-color: var(--highlight);
}

button {
    cursor: pointer;
    background: #0b1015;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 15px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}

button:hover:not(:disabled) {
    background: #161c23;
}

button i {
    color: var(--accent);
}

.footer {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding: 10px;
    width: 100%;
    max-width: 1000px;
}

.pulse {
    animation: pulse 2s infinite;
}

input::placeholder {
    color: var(--muted);
    font-size: 12px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
    margin-left: 5px;
}

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

@media (max-width: 768px) {
    .crypto-table {
        display: none;
    }

    .log {
        display: flex;
    }

    .wrap {
        padding: 12px;
        gap: 12px;
    }

    .line {
        padding: 12px 14px;
        gap: 8px;
    }

    .wallet {
        font-size: 12px;
        padding: 10px 40px 10px 10px;
    }

    .instructions {
        padding: 16px;
        font-size: 13px;
    }

    .copy-btn-inside {
        right: 8px;
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .nav-buttons.bottom-nav a,
    .nav-buttons.bottom-nav button {
        min-width: 100px;
    }

    .donation-options {
        padding: 10px 16px;
    }

    .donation-option {
        padding: 8px 14px;
        font-size: 12px;
    }
    .donation-option[data-amount="custom"] {
        display: none;
    }
}

@media (max-width: 480px) {
    .wrap {
        padding: 10px;
    }

    header h1 {
        flex-direction: column;
        gap: 5px;
    }

    .wallet {
        font-size: 11px;
    }

    .crypto-amount {
        font-size: 11px;
    }

    .nav-buttons.bottom-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-buttons.bottom-nav a,
    .nav-buttons.bottom-nav button {
        min-width: auto;
    }

    .scripture {
        font-size: 13px;
        padding: 10px;
    }

    .donation-option {
        padding: 8px 12px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .prefix {
        font-size: 14px;
    }

    .prefix i {
        font-size: 14px;
        width: 20px;
    }

    .donation-option {
        padding: 6px 10px;
        font-size: 10px;
    }
}

@media (hover: none) {
    button:hover:not(:disabled) {
        background: #0b1015;
    }

    .copy-btn-inside:hover {
        color: var(--muted);
        background: rgba(255, 255, 255, 0.05);
    }

    button:active:not(:disabled) {
        background: #161c23;
    }

    .copy-btn-inside:active {
        color: var(--accent);
        background: rgba(88, 99, 255, 0.1);
    }

    .donation-option:hover {
        background: rgba(255, 255, 255, 0.03);
        border-color: var(--line);
        color: var(--muted);
    }

    .donation-option:active,
    .donation-option.active {
        background: var(--highlight);
        color: var(--accent);
        border-color: var(--accent);
    }
}
