:root {
    --tp-bg: #111827;
    --tp-text: #8d99a9;
    --tp-text-muted: #697486;
    --tp-accent: #3f8f61;
    --tp-primary: #5b55c8;
    --tp-primary-hover: #4f49b5;
    --tp-success: #4a9a5c;
    --tp-address: #3f8f61;
    --tp-warning: #4aa66d;
    --tp-input-bg: #bfc5cd;
    --tp-input-text: #0f172a;
    --tp-qrcode-bg: #c8ccd1;
    --tp-link: #5a57d6;
}

html,
body.tp-dark {
    background: var(--tp-bg);
    color: var(--tp-text);
    min-height: 100%;
}

body.tp-dark .container {
    max-width: 543px;
}

body.tp-dark main {
    width: 100%;
}

body.tp-dark a {
    color: var(--tp-link);
    text-decoration: none;
}

body.tp-dark a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

.tp-pay {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.4rem 1rem 3rem;
    text-align: center;
}

.tp-pay-title {
    font-size: 1.38rem;
    font-weight: 300;
    color: var(--tp-text);
    margin-bottom: 1.35rem;
    line-height: 1.6;
}

.tp-pay-title .tp-accent {
    color: var(--tp-accent);
    font-weight: 300;
}

.tp-address-bar {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 410px;
    min-height: 49px;
    margin: 0 auto 1.05rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--tp-input-bg);
}

.tp-address-input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--tp-input-text);
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    outline: none;
    min-width: 0;
    letter-spacing: 0;
}

.tp-copy-btn,
body.tp-dark .btn-primary.tp-copy-btn {
    border: 0;
    border-radius: 0;
    background: var(--tp-primary);
    color: #fff;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.tp-copy-btn:hover,
body.tp-dark .btn-primary.tp-copy-btn:hover {
    background: var(--tp-primary-hover);
    color: #fff;
}

.tp-copy-btn.btn-sm,
body.tp-dark .btn-primary.tp-copy-btn.btn-sm {
    border-radius: 999px;
    font-size: 0.72rem;
    padding: 0.22rem 0.78rem;
    line-height: 1.2;
    min-height: unset;
}

.tp-countdown {
    color: var(--tp-text);
    font-size: 1.45rem;
    font-weight: 600;
    margin-bottom: 0.95rem;
    font-family: Arial, "Helvetica Neue", sans-serif;
}

.tp-countdown-value {
    color: var(--tp-success);
}

.tp-warning {
    color: var(--tp-warning);
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.tp-chain-info {
    color: var(--tp-accent);
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.tp-qrcode-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 264px;
    height: 264px;
    box-sizing: border-box;
    background: var(--tp-qrcode-bg);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 0.55rem;
    overflow: hidden;
}

.tp-qrcode-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    transform: scale(1.18);
}

.tp-address-display {
    color: var(--tp-address);
    font-weight: 400;
    word-break: break-all;
    margin: 0.65rem auto 0.55rem;
    max-width: 410px;
    line-height: 1.5;
}

.tp-address-display.tron {
    font-size: 0.9rem;
}

.tp-address-display.evm {
    font-size: 12px;
}

.tp-details {
    max-width: 360px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.98rem;
    line-height: 1.95;
}

.tp-details .tp-label {
    color: var(--tp-text-muted);
}

.tp-details .tp-value {
    color: var(--tp-accent);
    font-weight: 400;
}

.tp-amount-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.tp-amount-row .tp-value {
    color: var(--tp-accent);
}

.tp-buy-links {
    margin-top: 1.6rem;
    color: var(--tp-text-muted);
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.6;
}

.tp-buy-links .tp-value {
    color: var(--tp-accent);
}

body.tp-dark .display-4,
body.tp-dark h1 {
    color: var(--tp-text);
}

body.tp-dark .text-success {
    color: var(--tp-success) !important;
}

@media (min-width: 768px) {
    body.tp-dark .container {
        max-width: 680px;
    }

    .tp-pay {
        transform: scale(1.125);
        transform-origin: top center;
        margin-bottom: 7rem;
    }
}

@media (max-width: 420px) {
    .tp-address-bar {
        border-radius: 16px;
        flex-direction: column;
        max-width: 100%;
    }

    .tp-address-input {
        font-size: 0.9rem;
        padding: 0.7rem 0.85rem;
        text-align: center;
    }

    .tp-copy-btn,
    body.tp-dark .btn-primary.tp-copy-btn {
        border-radius: 0 0 16px 16px;
        width: 100%;
    }

    .tp-copy-btn.btn-sm,
    body.tp-dark .btn-primary.tp-copy-btn.btn-sm {
        width: auto;
        border-radius: 999px;
    }

    .tp-qrcode-wrap {
        width: 244px;
        height: 244px;
        padding: 0;
    }

    .tp-qrcode-wrap img {
        transform: scale(1.15);
    }
}
