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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background: #f5f6fa;
}

.reward-page {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    position: relative;
}

/* ===== 顶部渐变装饰 ===== */
.header-banner {
    height: 120px;
    background: linear-gradient(135deg, #ff4d4f, #e82527);
    position: relative;
}
.header-banner::after {
    content: '';
    position: absolute;
    bottom: -20px; left: 0; right: 0;
    height: 40px;
    background: #fff;
    border-radius: 24px 24px 0 0;
}

/* ===== 头像 ===== */
.avatar-section {
    text-align: center;
    margin-top: -54px;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
}
.avatar-ring {
    display: inline-block;
    padding: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.avatar {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff4d4f;
}

/* ===== 标题区域 ===== */
.title-section {
    padding: 0 32px;
    margin-bottom: 4px;
}
.title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}
.title h1, .title h2, .title h3, .title p, .title span, .title * { text-align: inherit !important; }
.title img { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; display: block; }
.title p { margin: 0; padding: 0; }
.subtitle {
    font-size: 14px;
    color: #888;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}
.subtitle h1, .subtitle h2, .subtitle h3, .subtitle p, .subtitle span, .subtitle * { text-align: inherit !important; }
.subtitle img { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; display: block; }
.subtitle p { margin: 0; padding: 0; }

/* ===== 分隔线 ===== */
.section-divider {
    display: flex;
    align-items: center;
    padding: 24px 32px 16px;
}
.section-divider span {
    flex: 1;
    height: 1px;
    background: #eee;
}
.section-divider .dot {
    width: 5px; height: 5px;
    background: #ff4d4f;
    border-radius: 50%;
    margin: 0 14px;
    flex-shrink: 0;
}

/* ===== 打赏选项 ===== */
.reward-section {
    padding: 0 24px;
}
.action-section {
    padding: 8px 24px 0;
}
.section-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 14px;
}
.reward-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.reward-item {
    border: 1.5px solid #e8eaf0;
    border-radius: 12px;
    padding: 16px 8px 13px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: #fff;
}
.reward-item:active {
    transform: scale(0.95);
}
.reward-item.active {
    border-color: #ff4d4f;
    background: #fff5f5;
    box-shadow: 0 2px 10px rgba(255,77,79,0.12);
}
.reward-item .amount {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    transition: color 0.2s;
}
.reward-item .amount .yen {
    font-size: 14px;
    font-weight: 600;
    margin-right: 1px;
}
.reward-item.active .amount {
    color: #ff3b3b;
}
/* ===== 其他金额 ===== */
.custom-amount-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}
.custom-amount-input {
    width: 120px;
    padding: 8px 4px;
    border: none;
    border-bottom: 2px solid #ff4d4f;
    background: transparent;
    font-size: 20px;
    font-weight: 700;
    color: #ff3b3b;
    text-align: center;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}
.custom-amount-input::-webkit-inner-spin-button,
.custom-amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.custom-amount-input::placeholder {
    font-size: 14px;
    font-weight: 400;
    color: #ccc;
}
.custom-unit {
    font-size: 14px;
    color: #ff4d4f;
    font-weight: 600;
}
.pay-btn-inline {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, #ff4d4f, #e82527);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255,59,59,0.35);
}
.pay-btn-inline:active {
    transform: scale(0.97);
}
.pay-btn-inline.loading {
    pointer-events: none;
    opacity: 0.65;
}
.pay-hint {
    text-align: center;
    font-size: 13px;
    color: #ff4d4f;
    margin-top: 12px;
    letter-spacing: 0.5px;
    cursor: pointer;
}
.pay-hint:active {
    opacity: 0.6;
}

/* ===== 底部 ===== */
.footer-section {
    padding: 32px 24px 40px;
}
.footer-text {
    text-align: center;
    font-size: 12px;
    color: #ccc;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(40,40,60,0.9);
    color: #fff;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    max-width: 80%;
    text-align: center;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== 成功弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    max-width: 88%;
    max-height: 82vh;
    text-align: center;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.success-image {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.success-box {
    background: #fff;
    border-radius: 18px;
    padding: 44px 36px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.success-check { margin-bottom: 18px; }
.checkmark { width: 68px; height: 68px; }
.checkmark-circle {
    stroke: #ff4d4f;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circleDraw 0.6s ease-out 0.2s forwards;
}
.checkmark-check {
    stroke: #e82527;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkDraw 0.4s ease-out 0.7s forwards;
}
@keyframes circleDraw { to { stroke-dashoffset: 0; } }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
.success-box h2 { font-size: 22px; color: #333; margin-bottom: 6px; font-weight: 600; }
.success-box p { font-size: 14px; color: #999; }

/* ===== 其他金额 ===== */
.custom-amount-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 12px;
}
.custom-amount-input {
    width: 120px;
    padding: 8px 4px;
    border: none;
    border-bottom: 2px solid #ff4d4f;
    background: transparent;
    font-size: 20px;
    font-weight: 700;
    color: #ff3b3b;
    text-align: center;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}
.custom-amount-input::-webkit-inner-spin-button,
.custom-amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.custom-amount-input::placeholder {
    font-size: 14px;
    font-weight: 400;
    color: #ccc;
}
.custom-unit {
    font-size: 14px;
    color: #ff4d4f;
    font-weight: 600;
}
