* {
    box-sizing: border-box
}

html,body,#root {
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: Inter,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
    font-weight: 500
}

.page {
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    background: var(--bg)
}

.card {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    color: var(--text)
}

.theme-light {
    --bg: #ffffff;
    --text: #111827;
    --subtext: #6b7280;
    --muted: #9ca3af;
    --accent: #2563eb;
    --input-bg: #ffffff;
    --input-soft: #f6f7f9;
    --border-default: #d1d5db
}

.theme-dark {
    --bg: #1a1a1a;
    --card-bg: transparent;
    --text: #e6e7e8;
    --subtext: #b0b3b8;
    --accent: #22c55e;
    --input-bg: #1f1f1f;
    --input-soft: #232323;
    --border-default: #3a3f3c;
    --border-primary: #2a2a2a;
    --amount-border: #2a2a2a
}

.label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .01em;
    margin-bottom: 8px;
    color: var(--subtext)
}

.input-row {
    height: 52px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    padding: 0 14px;
    gap: 8px;
    background: var(--input-bg);
    border: 1.5px solid var(--border-default);
    margin-bottom: 18px;
    transition: border-color .2s ease
}

.input-row input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text)
}

.input-row input::placeholder {
    color: var(--muted);
    font-weight: 500
}

.theme-light .input-row.primary:focus-within {
    border: 2px solid #2563eb
}

.theme-dark .input-row.primary:focus-within {
    border: 2px solid #22c55e
}

.input-row.primary:focus-within .paste,.input-row.primary:focus-within .contact-icon,.input-row.primary:focus-within .qr-icon {
    color: var(--accent);
    stroke: var(--accent);
    fill: var(--accent)
}

.theme-light .input-row.amount-row:focus-within {
    border: 2px solid #2563eb
}

.theme-dark .input-row.amount-row:focus-within {
    border: 2px solid #22c55e
}

.theme-light .input-row.amount-row:focus-within .unit,.theme-light .input-row.amount-row:focus-within .max {
    color: #2563eb
}

.theme-dark .input-row.amount-row:focus-within .unit,.theme-dark .input-row.amount-row:focus-within .max {
    color: #22c55e
}

.paste,.max {
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--accent)
}

.unit {
    font-size: 13px;
    color: var(--subtext)
}

.right-icons {
    display: flex;
    gap: 10px
}

.contact-icon,.qr-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    stroke: var(--accent);
    fill: var(--accent)
}

.network-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--input-soft);
    border: none;
    box-shadow: none;
    margin-bottom: 22px;
    width: fit-content
}

.network-left {
    display: flex;
    align-items: center;
    gap: 8px
}

.network-icon {
    width: 18px;
    height: 18px
}

.network-left span {
    font-size: 14px;
    font-weight: 500;
    color: var(--subtext)
}

.estimate {
    font-size: 13px;
    color: var(--subtext);
    margin-bottom: auto
}

.connect-btn {
    width: 100%;
    max-width: 360px;
    height: 52px;
    border-radius: 999px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    margin-top: auto;
    transition: background-color .25s ease,opacity .25s ease
}

.theme-light .connect-btn.idle {
    background: #a3a1ff;
    color: #fff;
    opacity: .85
}

.theme-light .connect-btn.active {
    background: #2563eb;
    color: #fff
}

.theme-dark .connect-btn.idle {
    background: #2e7d5b;
    color: #0b0b0b;
    opacity: .85
}

.theme-dark .connect-btn.active {
    background: #22c55e;
    color: #0b0b0b
}

.label {
    margin-bottom: 12px
}

.input-row.primary {
    margin-bottom: 24px
}

.input-row.amount-row {
    margin-bottom: 20px
}

.theme-light .network-left span {
    color: #6b7280;
    font-weight: 500
}

.theme-dark .network-left span {
    color: #b0b3b8;
    font-weight: 500
}

.theme-light .network-row {
    background: #f6f7f9
}

.label {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .01em;
    margin-bottom: 10px
}

.input-row input {
    font-size: 14.5px;
    font-weight: 500
}

.input-row input::placeholder {
    font-size: 14.5px;
    font-weight: 500
}

.network-left span {
    font-size: 13.5px;
    font-weight: 500
}

.theme-light .network-left span {
    color: #9ca3af
}

.theme-dark .network-left span {
    color: #8b8f94
}

.success-chip {
    margin-top: 12px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: #22c55e;
    color: #fff;
    font-weight: 600;
    font-size: 14px
}

.success-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #2ee68b;
    color: #0b1f14;
    font-size: 13px;
    font-weight: 600;
    animation: chip-in .25s ease-out
}

@keyframes chip-in {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(.95)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.connect-btn.success {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 1
}

.theme-light .connect-btn.success {
    background: #2563eb;
    color: #fff
}

.network-arrow {
    width: 16px;
    height: 16px
}

.theme-dark .connect-btn.success {
    background: #22c55e;
    color: #0b0b0b
}

.network-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover
}

.input-row {
    height: 56px;
    display: flex;
    align-items: center;
    border-radius: 14px;
    padding: 0 16px;
    gap: 10px;
    background: var(--input-bg);
    border: 1.5px solid #2a2d31;
    margin-bottom: 20px
}

.input-row input {
    font-size: 15px
}

.network-row {
    height: 40px;
    padding: 0 14px
}

.theme-light .input-row {
    border: 1.5px solid #e5e7eb
}

.theme-dark .input-row {
    border: 1.5px solid #3A3D40
}

.ps-backdrop {
    position: fixed;
    inset: 0;
    background: #00000073;
    display: flex;
    align-items: flex-end;
    z-index: 9999
}

.ps-sheet {
    width: 100%;
    max-height: 85vh;
    padding: 12px 18px 16px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    transform: translateY(100%)
}

.ps-sheet.light {
    background: #fff;
    color: #000
}

.ps-sheet.dark {
    background: #1a1d21;
    color: #fff
}

.ps-sheet:not(.closing) {
    animation: slideUp .25s ease forwards
}

.ps-sheet.closing {
    animation: slideDown .25s ease forwards
}

@keyframes slideUp {
    0% {
        transform: translateY(100%)
    }

    to {
        transform: translateY(0)
    }
}

@keyframes slideDown {
    0% {
        transform: translateY(0)
    }

    to {
        transform: translateY(100%)
    }
}

.ps-header {
    position: relative;
    width: 100%;
    height: 40px
}

.ps-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    padding: 0
}

.ps-sheet.light .ps-close {
    color: #6b7280
}

.ps-sheet.dark .ps-close {
    color: #fff
}

.ps-close:hover {
    opacity: .75
}

.ps-gif-wrap {
    display: flex;
    justify-content: center;
    margin: 10px 0 6px
}

.ps-sheet.dark .ps-gif-wrap {
    background: #1a1d21;
    margin: 0
}

.ps-gif-wrap img {
    width: 160px;
    height: auto;
    display: block
}

.ps-title {
    text-align: center;
    margin: 8px 0 4px
}

.ps-sub {
    text-align: center;
    font-size: 14px;
    opacity: .75
}

.ps-action {
    width: 100%;
    height: 50px;
    margin-top: 18px;
    border: none;
    border-radius: 26px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease,opacity .12s ease
}

.ps-sheet.light .ps-action {
    background: #2563eb;
    color: #fff
}

.ps-sheet.dark .ps-action {
    background: linear-gradient(135deg,#2ee68b,#18c97a);
    color: #0b1f14
}

.ps-action:active {
    transform: scale(.97)
}

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

.ps-sheet.dark .ps-title {
    color: #d1d5db;
    font-weight: 600
}

.ps-sheet.dark .ps-sub {
    color: #9ca3af;
    opacity: 1
}
