*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

:root {
    --bg: #faf8f5; /* Warm neutral background (creamy paper) */
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --text-primary: #1e1b18; /* Stark warm neutral dark grey */
    --text-secondary: #6e6760;
    --text-muted: #a19a93;
    --border: #e8e3dc; /* Soft warm border lines */
    --hover-bg: #f5f2eb;
    --active-online: #10b981;
    --icon-bg: #faf8f5;
    --icon-color: #6e6760;
    --donate-bg: #faf8f5;
    --header-bg: #f5f2eb;
    --input-bg: #ffffff;
    --btn-primary: #e25c3d; /* Coral primary button color */
    --btn-primary-hover: #cc4d30;
    --btn-primary-text: #ffffff;
    --accent: #e25c3d;
}

.dark {
    --bg: #1c1917; /* Warm charcoal (Stone 900) */
    --card-bg: #292524; /* Warm stone card dark (Stone 800) */
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --text-primary: #f5f2eb;
    --text-secondary: #a8a29e;
    --text-muted: #78716c;
    --border: #44403c;
    --hover-bg: #3c3836;
    --active-online: #10b981;
    --icon-bg: #3c3836;
    --icon-color: #a8a29e;
    --donate-bg: #3c3836;
    --header-bg: #221f1d;
    --input-bg: #292524;
    --btn-primary: #e25c3d;
    --btn-primary-hover: #f97316;
    --btn-primary-text: #ffffff;
    --accent: #e25c3d;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.page-loading {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page-loading.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: donate-loading-spin 0.75s linear infinite;
}

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

.page {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 32px 16px;
}

.owner-dashboard-nav { position:fixed; z-index:20; top:16px; left:50%; display:flex; align-items:center; gap:14px; max-width:calc(100% - 32px); padding:8px 10px 8px 14px; border:1px solid var(--border); border-radius:999px; background:color-mix(in srgb, var(--card-bg) 92%, transparent); box-shadow:0 8px 24px rgba(0,0,0,.12); color:var(--text-secondary); font-size:13px; transform:translateX(-50%); backdrop-filter:blur(12px); }.owner-dashboard-nav[hidden] { display:none; }.owner-dashboard-nav a { display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border-radius:999px; background:var(--accent); color:#fff; font-weight:700; text-decoration:none; }.owner-dashboard-nav a:hover { filter:brightness(.94); }body.owner-nav-visible { padding-top:84px; }.owner-nav-visible .owner-dashboard-nav { top:20px; }@media(max-width:560px){.owner-dashboard-nav{top:10px;gap:8px;padding:7px 8px 7px 11px;font-size:11px}.owner-dashboard-nav a{padding:6px 9px;font-size:11px}body.owner-nav-visible{padding-top:70px}.owner-nav-visible .owner-dashboard-nav{top:10px}}

.card {
    width: 100%;
    max-width: 720px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 20px 18px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
}

.streamer-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.streamer-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 2.5px solid var(--card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    background: var(--icon-bg);
}

.online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--active-online);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.streamer-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.streamer-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.verified-badge[hidden] { display: none; }

.verified-badge svg { width: 20px; height: 20px; display: block; }

.streamer-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.streamer-socials {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--donate-bg);
    color: var(--text-secondary);
    text-decoration: none;
}

.social-link svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.social-link .fa-brands, .social-link .fa-solid { font-size: 15px; line-height: 1; }
.social-link .fa-brands { font-family: 'Font Awesome 6 Brands' !important; font-weight: 400; }
.social-link .fa-solid { font-family: 'Font Awesome 6 Free' !important; font-weight: 900; }

.social-link:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.streamer-thai {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.streamer-about {
    padding: 0;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.streamer-identity + .streamer-about:not([hidden]) {
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.streamer-about > :first-child { margin-top: 0; }
.streamer-about > :last-child { margin-bottom: 0; }
.streamer-about h1, .streamer-about h2, .streamer-about h3 { color: var(--text-primary); line-height: 1.3; }
.streamer-about h1 { font-size: 18px; }
.streamer-about h2 { font-size: 16px; }
.streamer-about h3 { font-size: 14px; }
.streamer-about a { color: var(--accent); }
.streamer-about ul, .streamer-about ol { padding-left: 20px; }
.streamer-about blockquote { margin-left: 0; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--text-muted); }
.streamer-about img { max-width: 100%; height: auto; border-radius: 6px; }
.streamer-about pre { overflow: auto; padding: 12px; border-radius: 6px; background: var(--donate-bg); }
.streamer-about code { padding: 1px 4px; border-radius: 4px; background: var(--donate-bg); font-family: 'Fira Code', monospace; font-size: 0.9em; }
.streamer-about pre code { padding: 0; background: transparent; }
.streamer-about table { width: 100%; border-collapse: collapse; }
.streamer-about th, .streamer-about td { padding: 8px; border: 1px solid var(--border); text-align: left; }
.streamer-about th { color: var(--text-primary); background: var(--donate-bg); }
.markdown-align-left { text-align: left; }
.markdown-align-center { text-align: center; }
.markdown-align-right { text-align: right; }

.goal-bar {
    padding: 12px;
    border-radius: 8px;
}

.goal-text {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.goal-label { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.goal-values { color: var(--text-secondary); font-size: 14px; white-space: nowrap; }
.goal-values strong { color: var(--text-primary); font-weight: 700; }

.progress-track {
    height: 6px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

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

.maintenance-notice { display:grid; gap:3px; margin:0 12px 16px; padding:12px 14px; border:1px solid #e8b65a; border-radius:8px; background:#fff6df; color:#78500b; font-size:14px; line-height:1.45; }.maintenance-notice strong { font-size:15px; }.dark .maintenance-notice { border-color:#84631e; background:#3d321a; color:#ffe4a5; }
.maintenance-notice[hidden] { display:none; }

.label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 12px;
}

.amount-section {
    margin-bottom: 12px;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.minimum-donation {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.payment-methods {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.payment-method-option {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--donate-bg);
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.payment-method-option.active {
    border-color: var(--accent);
    background: var(--hover-bg);
}

.payment-method-option strong,
.payment-method-option span {
    display: block;
}

.payment-method-option span,
.payment-method-note {
    color: var(--text-muted);
    font-size: 14px;
}

.payment-method-logo { width: 28px; height: 28px; flex: 0 0 auto; object-fit: contain; }
.payment-method-info { min-width: 0; }

.payment-method-note {
    margin: 0 0 12px;
}

.transfer-details {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--donate-bg);
    text-align: center;
}

.transfer-method,
.transfer-account {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.transfer-number {
    margin: 0;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.transfer-number-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 6px 0;
}

.copy-account-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.copy-account-button:hover { color: var(--text-primary); background: var(--hover-bg); }
.copy-account-button.is-copied { color: #059669; border-color: #34d399; }

.amount-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.amount-btn {
    padding: 11px 12px;
    background: var(--donate-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Fira Code', 'Prompt', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.amount-btn:hover {
    background: var(--hover-bg);
}

.amount-btn.active {
    border-color: var(--text-primary);
    background: var(--text-primary);
    color: var(--card-bg);
}

.custom-btn {
    padding: 4px;
}

.custom-input {
    width: 100%;
    height: 100%;
    min-height: 38px;
    border: none;
    background: transparent;
    font-family: 'Fira Code', 'Prompt', monospace;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: inherit;
    outline: none;
}

.custom-input::placeholder {
    color: var(--text-muted);
}

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

.form-group {
    margin-bottom: 4px;
}

.input {
    width: 100%;
    padding: 11px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Fira Code', 'Prompt', monospace;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.input:focus {
    border-color: var(--text-primary);
}

.input::placeholder {
    color: var(--text-muted);
}

.textarea-wrapper {
    position: relative;
}

.textarea {
    width: 100%;
    padding: 11px 12px;
    padding-bottom: 28px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Fira Code', 'Prompt', monospace;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    resize: none;
}

.textarea:focus {
    border-color: var(--text-primary);
}

.textarea::placeholder {
    color: var(--text-muted);
}

.char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.voice-section {
    margin-bottom: 8px;
}

.voice-select-wrapper {
    display: flex;
    gap: 8px;
}

.voice-select {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Fira Code', 'Prompt', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-select:focus {
    border-color: var(--text-primary);
}

.preview-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--icon-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--icon-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-btn:hover {
    background: var(--hover-bg);
}

.preview-btn:active {
    transform: scale(0.95);
}

.donate-btn {
    display: flex;
    width: 100%;
    padding: 11px 12px;
    background: var(--btn-primary);
    border: none;
    border-radius: 12px;
    font-family: 'Fira Code', 'Prompt', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--btn-primary-text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.donate-btn:hover {
    background: var(--btn-primary-hover);
}

.donate-btn:active {
    transform: scale(0.98);
}

.donate-btn svg {
    fill: currentColor;
}

.btn-text {
    pointer-events: none;
}

.card-footer {
    padding: 8px 20px 12px;
    border-top: 1px solid var(--border);
}

.recent-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

.donation-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    background: var(--donate-bg);
    border-radius: 8px;
}

.donation-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--icon-bg);
    flex-shrink: 0;
}

.donation-body {
    flex: 1;
    min-width: 0;
}

.donation-info {
    display: flex;
    gap: 6px;
    align-items: baseline;
}

.donation-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.donation-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.donation-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.4;
}

.card-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 20px 14px;
}

.footer-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    font-family: 'Fira Code', 'Prompt', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-toggle:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.footer-toggle:active {
    transform: scale(0.95);
}

.toggle-label {
    pointer-events: none;
}

.moon-icon {
    display: none;
}

.dark .sun-icon {
    display: none;
}

.dark .moon-icon {
    display: block;
}

.footer-sep {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-powered {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

a.footer-powered { color: inherit; text-decoration: none; }
a.footer-powered:hover { color: var(--accent); }

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.modal-overlay.show {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 400px;
    max-height: calc(100dvh - 32px);
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex: 0 0 auto;
}

.modal-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--icon-bg);
    border: none;
    border-radius: 8px;
    color: var(--icon-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--hover-bg);
}

.modal-body {
    padding: 20px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
    .modal-overlay { padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
    .modal { max-height: calc(100dvh - 16px); border-radius: 8px; }
    .modal-header { padding: 12px 16px; }
    .modal-body { padding: 16px; }
}

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

.qr-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 12px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-hint {
    font-size: 14px;
    color: var(--text-muted);
}

.upload-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.upload-divider span {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    color: var(--text-muted);
}

.upload-area:hover {
    border-color: var(--text-secondary);
    background: var(--hover-bg);
}

.upload-area svg {
    margin-bottom: 8px;
}

.upload-area p {
    font-size: 14px;
    line-height: 1.6;
}

.upload-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.slip-preview {
    position: relative;
    display: inline-block;
    margin-top: 12px;
}

.slip-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.slip-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--text-primary);
    color: var(--card-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verify-btn {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: var(--btn-primary);
    border: none;
    border-radius: 12px;
    font-family: 'Fira Code', 'Prompt', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--btn-primary-text);
    cursor: pointer;
    opacity: 0.5;
    pointer-events: none;
}

.verify-btn.active {
    opacity: 1;
    pointer-events: auto;
}

.verify-btn.active:hover {
    background: var(--btn-primary-hover);
}

.verify-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.verify-result.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--accent);
}

.verify-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
}

.result-icon {
    margin-bottom: 8px;
}

.result-text {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.result-detail {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--card-bg);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 32px 0 rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

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

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.toast-content svg {
    color: var(--accent);
    flex-shrink: 0;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

@media (max-width: 440px) {
    .page {
        padding: 16px 12px;
    }

    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Leaderboard System (Claude minimalist style) --- */
.footer-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

.footer-tab {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: relative;
}

.footer-tab:hover {
    color: var(--text-primary);
}

.footer-tab.active {
    color: var(--text-primary);
}

.footer-tab.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
}

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

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--donate-bg);
    border-radius: 8px;
    animation: itemIn 0.3s ease;
}

@keyframes itemIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.leaderboard-rank-col {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.rank-number {
    font-family: 'Fira Code', monospace;
}

.rank-badge {
    font-size: 14px;
}

.leaderboard-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--icon-bg);
    flex-shrink: 0;
}

.leaderboard-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.leaderboard-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-meta {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 1px;
}

.leaderboard-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Fira Code', monospace;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
}
