* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

.page.active {
    display: flex;
}

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
}

.status-right {
    display: flex;
    gap: 8px;
}

/* 扫码页面样式 */
.scan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
}

.back-btn, .more-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.scan-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

/* 视频流 */
#video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* 扫码区域 */
.scan-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.scan-frame {
    width: 300px;
    height: 300px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.3);
}

/* 扫描框角标 */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #07c160;
}

.corner.top-left {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-radius: 4px 0 0 0;
}

.corner.top-right {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 4px 0 0;
}

.corner.bottom-left {
    bottom: -1px;
    left: -1px;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 4px;
}

.corner.bottom-right {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 4px 0;
}

/* 扫描线动画 */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #07c160, transparent);
    animation: scanLine 2s linear infinite;
    box-shadow: 0 0 10px #07c160;
}

@keyframes scanLine {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

.scan-tip {
    margin-top: 30px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

/* 底部功能按钮 */
.scan-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
}

.footer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.photo-icon::before {
    content: "📷";
}

.flashlight-icon::before {
    content: "🔦";
}

.my-qr-icon::before {
    content: "📱";
}

.footer-btn span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* 支付页面样式 */
.payment-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.payment-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-left: 16px;
}

.payment-header .back-btn {
    color: #000;
}

/* 收款人信息 */
.payee-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background-color: #fff;
}

.payee-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #07c160;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    color: #fff;
    margin-bottom: 12px;
    background-size: cover;
    background-position: center;
}

.payee-type {
    font-size: 17px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* 金额输入 */
.amount-section {
    padding: 0 20px 30px;
    background-color: #fff;
    text-align: center;
}

.amount-input {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 10px;
}

.amount-symbol {
    font-size: 30px;
    color: #333;
    margin-right: 5px;
    font-weight: 400;
}

#amount {
    flex: 0 1 auto;
    border: none;
    outline: none;
    font-size: 50px;
    font-weight: 500;
    color: #333;
    background: transparent;
    padding: 0;
    line-height: 1;
    caret-color: #07c160;
    min-width: 100px;
    text-align: left;
}

#amount::placeholder {
    color: #c9c9c9;
}

.amount-hint {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* 键盘 */
.keyboard {
    background-color: #f5f5f5;
    padding: 20px 0;
}

.key-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 12px;
    padding: 0 15px;
}

.key {
    width: 31%;
    height: 70px;
    background-color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 28px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.key:active {
    background-color: #f0f0f0;
}

.delete-key {
    font-size: 24px;
    color: #666;
}

/* 支付按钮 */
.pay-btn-container {
    padding: 16px 20px;
    background-color: #fff;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.pay-btn {
    width: 100%;
    height: 50px;
    background-color: #07c160;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.4);
}

.pay-btn:active {
    background-color: #06b356;
    transform: scale(0.98);
}

/* 支付页面整体 */
#paymentPage {
    background-color: #fff;
    overflow-y: auto;
    padding-bottom: 100px;
}

/* 支付页面标题 */
.payment-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.payment-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0;
    margin-left: 16px;
    flex: 1;
    text-align: center;
}

/* 支付成功页面 */
.success-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #fff;
    padding: 20px;
}

.success-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #07c160;
    color: #fff;
    font-size: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

.success-title {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin-bottom: 15px;
}

.success-amount {
    font-size: 40px;
    font-weight: 600;
    color: #000;
    margin-bottom: 30px;
}

.payee-info-small {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
}

.payee-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #07c160;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #fff;
}

.payee-name-small {
    font-size: 16px;
    color: #666;
}

.success-buttons {
    width: 100%;
    max-width: 300px;
}

.success-btn {
    width: 100%;
    height: 50px;
    background-color: #07c160;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.success-btn:active {
    background-color: #06b356;
}