:root {
    --primary: #0D9488;
    --primary-hover: #0F766E;
    --primary-light: #5EEAD4;
    --primary-shadow-soft: rgba(13, 148, 136, 0.15);
    --primary-shadow-strong: rgba(13, 148, 136, 0.30);
    --primary-tint-subtle: rgba(13, 148, 136, 0.05);
    --primary-surface-soft: color-mix(in srgb, var(--primary) 10%, var(--white) 90%);
    --primary-border-soft: color-mix(in srgb, var(--primary) 22%, var(--white) 78%);
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-light: #64748B;
    --bg: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --white: #FFFFFF;
    --border-subtle: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
}

::selection {
    background: color-mix(in srgb, var(--primary) 28%, var(--white) 72%);
    color: var(--text-primary);
}

::-moz-selection {
    background: color-mix(in srgb, var(--primary) 28%, var(--white) 72%);
    color: var(--text-primary);
}

.container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: linear-gradient(135deg,
            var(--primary-hover) 0%,
            var(--primary) 55%,
            var(--primary-light) 100%);
    padding: 24px 20px;
    text-align: center;
}

.logo-img {
    display: block;
    margin: 0 auto;
    max-width: 120px;
    height: auto;
    filter:
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.38)) drop-shadow(0 8px 18px rgba(15, 23, 42, 0.18));
}

.card-body {
    position: relative;
    isolation: isolate;
    padding: 32px 24px;
}

.card-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--card-body-watermark-image, none);
    background-repeat: space;
    background-position: center 32px;
    background-size: 32px auto;
    opacity: 0.04;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
    .card-body::before {
        background-color: var(--primary);
        background-image: none;
        background-repeat: no-repeat;
        background-position: center 32px;
        background-size: 32px auto;
        -webkit-mask-image: var(--card-body-watermark-mask, none);
        -webkit-mask-repeat: space;
        -webkit-mask-position: center 32px;
        -webkit-mask-size: 32px auto;
        mask-image: var(--card-body-watermark-mask, none);
        mask-repeat: space;
        mask-position: center 32px;
        mask-size: 32px auto;
    }
}

.card-body>* {
    position: relative;
    z-index: 1;
}

h1 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.3;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.recipient-name {
    color: var(--text-primary);
    font-weight: 700;
}

.description-section {
    margin: 20px 0;
    text-align: center;
}

.description-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.description-value {
    color: var(--text-primary);
    font-size: 15px;
    font-style: italic;
    line-height: 1.5;
}

.qr-instructions {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 16px;
}

.qr-sub-instructions {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.qr-section {
    text-align: center;
    margin: 20px 0;
}

.qr-code {
    max-width: 240px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 3px solid var(--primary);
    padding: 12px;
    background: var(--white);
    box-shadow: 0 4px 12px var(--primary-shadow-soft);
}

.qr-code.is-hidden {
    display: none;
}

.qr-lazy-note {
    font-size: 12px;
    color: var(--text-light);
    margin: 0 0 12px;
}

.qr-lazy-btn {
    display: none;
    margin: 0 auto 8px;
    max-width: 240px;
}

.qr-lazy-btn.is-visible {
    display: flex;
}

.amount-display {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 12px 0;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-shadow-strong);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    margin-top: 12px;
}

.btn-secondary:hover {
    background: var(--primary-tint-subtle);
}

#show-qr-btn,
#want-link-btn {
    background: var(--white);
}

#show-qr-btn:hover,
#want-link-btn:hover {
    background: var(--primary-surface-soft);
}

.info-link {
    text-align: center;
    margin: 16px 0;
}

.info-link a {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.info-link a:hover {
    text-decoration: underline;
}

.details-section {
    margin-top: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
}

.detail-value {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    flex: 1;
    word-break: break-word;
}

.pix-code-container {
    margin: 24px 0;
    text-align: left;
}

.pix-code-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-left: 4px;
}

.pix-code-box {
    width: 100%;
    background: var(--bg-secondary);
    border: 1.5px dashed var(--border-subtle);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    word-break: break-all;
    user-select: all;
    cursor: text;
    line-height: 1.4;
    outline: none;
    resize: none;
}

.pix-code-box::selection {
    background: color-mix(in srgb, var(--primary) 82%, var(--white) 18%);
    color: var(--white);
}

.pix-code-box::-moz-selection {
    background: color-mix(in srgb, var(--primary) 82%, var(--white) 18%);
    color: var(--white);
}

.detail-value.mono {
    font-family: var(--font-mono);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #DCFCE7;
    color: #166534;
    padding: 4px 10px;
    margin-left: 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.verified-badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.security-message {
    background: #FEF3C7;
    border-left: 4px solid var(--warning);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    color: #92400E;
    margin-top: 24px;
    display: flex;
    gap: 10px;
}

.security-message .icon {
    flex-shrink: 0;
    font-size: 16px;
}

.copy-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.footer {
    text-align: center;
    padding: 24px 20px;
}

.report-btn {
    color: var(--text-light);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.report-btn:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

.disclaimer {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.toast-notification {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--primary-surface-soft);
    border: 1px solid var(--primary-border-soft);
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: calc(100% - 40px);
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-success {
    border-color: var(--primary, #0D9488);
}

.toast-error .toast-icon {
    color: #EF4444;
}

.toast-error {
    background: color-mix(in srgb, #EF4444 8%, var(--white) 92%);
    border-color: color-mix(in srgb, #EF4444 18%, var(--white) 82%);
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 24px;
    height: 24px;
}

.toast-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.35;
}

.toast-message-line {
    display: block;
}

.toast-message-line+.toast-message-line {
    margin-top: 2px;
}

@media (max-width: 480px) {
    .card-header {
        padding: 20px 16px;
    }

    .logo-img {
        max-width: 100px;
    }

    .card-body {
        padding: 28px 20px;
    }

    h1 {
        font-size: 20px;
    }

    .amount-display {
        font-size: 28px;
    }

    .amount-source {
        margin-top: 4px;
        font-size: 12px;
        color: #475569;
    }

    .qr-code {
        max-width: 200px;
    }

    .detail-label {
        min-width: 80px;
        font-size: 12px;
    }

    .detail-value {
        font-size: 12px;
    }
}
