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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    user-select: none;
}

/* 支付宝蓝色主题 */
:root {
    --alipay-blue: #1677ff;
    --alipay-blue-dark: #0958d9;
    --alipay-blue-light: #e6f4ff;
    --alipay-bg: #f5f5f5;
    --alipay-card: #ffffff;
    --alipay-text: #333333;
    --alipay-text-secondary: #666666;
    --alipay-text-light: #999999;
    --alipay-border: #e8e8e8;
}

/* 主容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 12px;
}

/* 收款卡片 */
.pay-card {
    background: var(--alipay-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pay-header {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: #fff;
    padding: 24px 20px;
    text-align: center;
    position: relative;
}

.pay-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.1));
}

.pay-header .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
}

.pay-header .shop-name {
    font-size: 20px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.pay-header .shop-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

/* 金额输入区 */
.amount-section {
    padding: 24px 20px 20px;
}

.amount-label {
    font-size: 14px;
    color: var(--alipay-text-secondary);
    margin-bottom: 16px;
    text-align: center;
}

.amount-input-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    background: var(--alipay-blue-light);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    transition: all 0.3s;
    overflow: hidden;
}

.amount-input-box:focus-within {
    border-color: var(--alipay-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1);
}

.amount-symbol {
    font-size: 36px;
    color: var(--alipay-text);
    font-weight: 600;
    margin-right: 4px;
}

.amount-input {
    font-size: 48px;
    color: var(--alipay-text);
    font-weight: 700;
    border: none;
    background: transparent;
    width: 100%;
    max-width: 280px;
    min-width: 100px;
    text-align: center;
    outline: none;
    font-family: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amount-input::placeholder {
    color: #bfbfbf;
}

/* 快速金额 */
.quick-amount {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.quick-amount-btn {
    padding: 12px 8px;
    border: 1px solid var(--alipay-border);
    border-radius: 8px;
    background: #fff;
    color: var(--alipay-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-amount-btn:hover {
    border-color: var(--alipay-blue);
    color: var(--alipay-blue);
    background: var(--alipay-blue-light);
}

.quick-amount-btn.active {
    background: var(--alipay-blue);
    color: #fff;
    border-color: var(--alipay-blue);
}

/* 备注输入 */
.remark-section {
    padding: 0 20px 20px;
}

.remark-label {
    font-size: 14px;
    color: var(--alipay-text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.remark-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--alipay-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--alipay-text);
    background: #fafafa;
    outline: none;
    font-family: inherit;
    resize: none;
    transition: all 0.2s;
}

.remark-input:focus {
    border-color: var(--alipay-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.remark-input::placeholder {
    color: #bfbfbf;
}

/* 支付方式 */
.pay-method-section {
    padding: 0 20px 20px;
}

.pay-method-title {
    font-size: 14px;
    color: var(--alipay-text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}

.pay-method-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #fafafa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.pay-method-item:hover {
    background: #f0f0f0;
}

.pay-method-item.active {
    border-color: var(--alipay-blue);
    background: var(--alipay-blue-light);
}

.pay-method-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--alipay-blue);
    color: #fff;
}

.pay-method-name {
    flex: 1;
    font-size: 16px;
    color: var(--alipay-text);
    font-weight: 500;
}

.pay-method-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pay-method-item.active .pay-method-check {
    background: var(--alipay-blue);
    border-color: var(--alipay-blue);
}

.pay-method-item.active .pay-method-check::after {
    content: "✓";
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* 支付按钮 */
.pay-btn {
    width: calc(100% - 40px);
    margin: 0 20px 16px;
    padding: 16px;
    background: var(--alipay-blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

.pay-btn:hover {
    background: var(--alipay-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 119, 255, 0.4);
}

.pay-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.pay-btn:disabled {
    background: #bfbfbf;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 其他支付方式链接 */
.other-pay-link {
    text-align: center;
    padding: 0 20px 20px;
}

.other-pay-btn {
    font-size: 14px;
    color: var(--alipay-blue);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.other-pay-btn:hover {
    color: var(--alipay-blue-dark);
    text-decoration: underline;
}

/* 底部说明 */
.footer-note {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--alipay-text-light);
}

/* 自定义键盘 */
.keyboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
}

.keyboard-overlay.show {
    display: block;
}

.keyboard {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f5f5f5;
    z-index: 101;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.keyboard.show {
    transform: translateY(0);
}

.keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--alipay-border);
}

.keyboard-title {
    font-size: 15px;
    color: var(--alipay-text-secondary);
}

.keyboard-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.keyboard-clear {
    font-size: 16px;
    color: var(--alipay-blue);
    cursor: pointer;
    font-weight: 500;
}

.keyboard-done {
    font-size: 16px;
    color: var(--alipay-blue);
    cursor: pointer;
    font-weight: 500;
}

.keyboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #d9d9d9;
}

.keyboard-key {
    background: #fff;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 500;
    color: var(--alipay-text);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.keyboard-key:active {
    background: #e8e8e8;
}

.keyboard-key.delete {
    background: #fff;
}

.keyboard-key.delete::after {
    content: "⌫";
    color: var(--alipay-text-secondary);
}

.keyboard-key.confirm {
    background: var(--alipay-blue);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.keyboard-key.confirm:active {
    background: var(--alipay-blue-dark);
}

/* TAB切换 */
.tab-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 12px;
}

.tab-header {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tab-btn {
    flex: 1;
    padding: 14px;
    text-align: center;
    font-size: 15px;
    color: var(--alipay-text-secondary);
    cursor: pointer;
    border: none;
    background: #fff;
    transition: all 0.2s;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--alipay-blue);
    background: var(--alipay-blue-light);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 打赏记录 */
.record-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.record-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.record-item:last-child {
    border-bottom: none;
}

.record-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--alipay-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    margin-right: 14px;
    flex-shrink: 0;
    font-weight: 500;
    /* 隐藏记录头像*/
    display: none;
}

.record-avatar.anonymous {
    background: #bfbfbf;
}

.record-info {
    flex: 1;
    min-width: 0;
}

.record-name {
    font-size: 14px;
    color: var(--alipay-text);
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.record-remark {
    font-size: 14px;
    color: var(--alipay-text-secondary);
    margin-bottom: 4px;
    word-break: break-all;
    line-height: 1.4;
}

.record-time {
    font-size: 12px;
    color: var(--alipay-text-light);
}

.record-amount {
    font-size: 18px;
    color: var(--alipay-blue);
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 10px;
}

/* 支付方式标签 */
.pay-method-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.pay-method-tag.alipay {
    background: #e6f4ff;
    color: #1677ff;
}

.pay-method-tag.weixin {
    background: #e6f7ed;
    color: #07c160;
}

.pay-method-tag.qq {
    background: #e6f7ff;
    color: #12b7f5;
}

.pay-method-tag.other {
    background: #f5f5f5;
    color: #999;
}

/* 汇总统计 */
.summary-card {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

.summary-title {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.summary-count {
    font-size: 32px;
    font-weight: 700;
}

.summary-text {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    gap: 8px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--alipay-border);
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
    color: var(--alipay-text);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: var(--alipay-blue);
    color: var(--alipay-blue);
}

.page-btn.active {
    background: var(--alipay-blue);
    color: #fff;
    border-color: var(--alipay-blue);
}

.page-btn:disabled {
    background: #f5f5f5;
    color: #bfbfbf;
    cursor: not-allowed;
    border-color: var(--alipay-border);
}

.page-info {
    font-size: 14px;
    color: var(--alipay-text-secondary);
    padding: 0 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--alipay-text-light);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    display: none;
}

.toast.show {
    display: block;
}

/* 其他支付方式弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 340px;
    width: 100%;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 24px 24px 0;
    text-align: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--alipay-text);
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 14px;
    color: var(--alipay-text-secondary);
    line-height: 1.5;
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.qr-code-img {
    max-width: 200px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.qr-hint {
    font-size: 13px;
    color: #4CAF50;
    margin-top: 12px;
}

.modal-footer {
    display: flex;
    border-top: 1px solid var(--alipay-border);
}

.modal-btn {
    flex: 1;
    padding: 16px;
    border: none;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.modal-btn:hover {
    background: #fafafa;
}

.modal-btn.primary {
    color: var(--alipay-blue);
}

/* PC端优化 */
@media (min-width: 768px) {
    body {
        background: #f0f2f5;
    }

    .container, .tab-container {
        max-width: 500px;
    }

    .pay-card {
        box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    }

    .keyboard {
        max-width: 500px;
        left: 50%;
        transform: translate(-50%, 100%);
    }

    .keyboard.show {
        transform: translate(-50%, 0);
    }

    .amount-input {
        cursor: text;
    }

    .modal-content {
        max-width: 380px;
    }
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    display: none;
}
