* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
header {
    text-align: center;
    margin-bottom: 30px;
}
header h1 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 6px;
}
header p {
    color: #666;
    font-size: 14px;
}
.search-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.search-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.search-row > input,
.search-input-wrap > input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    font-family: monospace;
    width: 100%;
}
.search-input-wrap > input:focus {
    border-color: #4a6cf7;
}
.search-row > button {
    padding: 12px 32px;
    background: #4a6cf7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.search-row > button:hover:not(:disabled) {
    background: #3b5de7;
}
.search-row > button:disabled {
    background: #a0b0f0;
    cursor: not-allowed;
}
.error-msg {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
}
/* ===== 查询历史下拉框 ===== */
.search-input-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
    width: 100%;
}
.search-input-wrap.focused > input {
    border-color: #4a6cf7;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.history-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #4a6cf7;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.10);
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
}
.history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.history-item:hover {
    background: #f5f8ff;
}
.history-item:last-of-type {
    border-bottom: none;
}
.history-main {
    flex: 1;
    min-width: 0;
}
.history-note {
    font-size: 12px;
    color: #4a6cf7;
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.note-tag {
    display: inline-block;
    background: #eef1ff;
    color: #4a6cf7;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: 1px;
}
.history-addr {
    font-family: monospace;
    font-size: 12.5px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.history-note-edit {
    margin-bottom: 2px;
}
.note-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #4a6cf7;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
}
.note-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #fff;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.note-btn:hover {
    color: #4a6cf7;
    border-color: #4a6cf7;
    background: #f5f8ff;
}
.del-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #fff;
    color: #ccc;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.del-btn:hover {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fef2f2;
}
/* ===== 确认弹窗 ===== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: confirm-fade-in 0.15s;
}
@keyframes confirm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.confirm-box {
    background: #fff;
    border-radius: 12px;
    padding: 28px 32px 22px;
    width: 360px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    animation: confirm-pop 0.2s cubic-bezier(0.18,0.89,0.32,1.28);
}
@keyframes confirm-pop {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.confirm-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}
.confirm-msg {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 24px;
    white-space: pre-wrap;
    word-break: break-all;
}
.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.confirm-btn {
    padding: 8px 22px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}
.confirm-btn.cancel {
    background: #f0f0f0;
    color: #666;
}
.confirm-btn.cancel:hover {
    background: #e4e4e4;
}
.confirm-btn.danger {
    background: #e74c3c;
    color: #fff;
}
.confirm-btn.danger:hover {
    background: #c0392b;
}
.history-tip {
    padding: 7px 12px;
    font-size: 11px;
    color: #bbb;
    text-align: center;
    background: #fafbfd;
    border-radius: 0 0 6px 6px;
}
.balance-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
}
.balance-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}
.balance-label {
    font-size: 12px;
    color: #999;
}
.balance-value {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    font-family: monospace;
    line-height: 1.2;
}
.balance-value small {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}
.balance-sub {
    font-size: 18px;
    color: #2e7d32;
    font-weight: 700;
    font-family: monospace;
    line-height: 1.2;
}
.balance-addr {
    font-size: 13px;
    max-width: 260px;
}
.status-bar {
    /* display: flex;
    justify-content: space-between;
    align-items: center; */
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}
.status-bar .total {
    font-weight: 600;
    color: #333;
}
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.loading .spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #4a6cf7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
thead {
    background: #f8f9fc;
}
th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
}
td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
tr:hover {
    background: #f8f9ff;
}
.tx-hash {
    font-family: monospace;
    font-size: 13px;
    color: #4a6cf7;
    text-decoration: none;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}
.tx-hash:hover {
    text-decoration: underline;
}
.address-link {
    font-family: monospace;
    font-size: 13px;
    color: #4a6cf7;
    text-decoration: none;
}
.address-link:hover {
    text-decoration: underline;
}
.address-link.has-note {
    font-family: inherit;
    font-weight: 600;
    color: #7b5cf0;
}
.addr-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}
.copy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    color: #999;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}
.copy-icon:hover {
    color: #4a6cf7;
    background: #f0f4ff;
}
.copy-icon.copied {
    color: #2e7d32;
}
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.tag-in {
    background: #e8f5e9;
    color: #2e7d32;
}
.tag-out {
    background: #fce4ec;
    color: #c62828;
}
.tag-unknown {
    background: #eee;
    color: #999;
}
.amount {
    font-weight: 600;
    font-size: 14px;
}
.amount-in {
    color: #2e7d32;
}
.amount-out {
    color: #c62828;
}
.status {
    font-size: 12px;
}
.status-success {
    color: #2e7d32;
}
.status-fail {
    color: #c62828;
}
.time {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #f0f0f0;
}
.pagination button {
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.pagination button:hover:not(:disabled) {
    background: #f0f4ff;
    border-color: #4a6cf7;
    color: #4a6cf7;
}
.pagination button:disabled {
    color: #ccc;
    cursor: not-allowed;
}
.pagination .page-info {
    font-size: 14px;
    color: #666;
}
.page-input {
    width: 64px;
    padding: 7px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}
.page-input::-webkit-outer-spin-button,
.page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.page-input:focus {
    border-color: #4a6cf7;
}
.page-input:disabled {
    background: #f5f5f5;
    color: #ccc;
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.footer {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 12px;
}
.footer a {
    color: #4a6cf7;
    text-decoration: none;
}
/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.88);
    color: #fff;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
}
.toast-fade-enter-active,
.toast-fade-leave-active {
    transition: opacity 0.25s, transform 0.25s;
}
.toast-fade-enter,
.toast-fade-leave-to {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    header {
        margin-bottom: 20px;
    }
    header h1 {
        font-size: 22px;
    }
    .search-section {
        padding: 16px;
    }
    .search-row {
        flex-direction: column;
    }
    .search-row > input,
    .search-input-wrap > input {
        width: 100%;
    }
    .search-row > button {
        width: 100%;
    }

    /* 余额卡片 */
    .balance-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
    }
    .balance-value {
        font-size: 22px;
    }
    .balance-addr {
        max-width: 100%;
        word-break: break-all;
        white-space: normal;
    }

    /* 状态栏 */
    .status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 13px;
    }

    /* 表格变卡片 */
    .table-wrapper {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }
    thead {
        display: none;
    }
    tbody tr {
        display: block;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        padding: 4px 14px;
        margin-bottom: 12px;
    }
    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 9px 0;
        border-bottom: 1px dashed #f0f0f0;
        text-align: right;
        font-size: 13px;
    }
    td:last-child {
        border-bottom: none;
    }
    td::before {
        content: attr(data-label);
        color: #999;
        font-size: 12px;
        font-weight: 600;
        flex-shrink: 0;
        margin-right: 12px;
    }
    .tx-hash {
        max-width: 58vw;
    }
    .address-link {
        word-break: break-all;
        white-space: normal;
        text-align: left;
    }
    .time {
        white-space: normal;
    }

    .pagination {
        padding: 12px 0 4px;
    }
    .pagination button {
        padding: 9px 22px;
    }
}