/* ========== 全局样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #fff8f0 0%, #fff 30%, #fafafa 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== 顶部导航 ========== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.top-bar .logo {
    font-size: 20px;
    font-weight: 700;
    color: #e8541e;
    letter-spacing: 1px;
}

.top-bar .admin-link {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}
.top-bar .admin-link:hover { color: #e8541e; }

/* ========== 主容器 ========== */
.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ========== 作者信息卡片 ========== */
.author-card {
    text-align: center;
    padding: 30px 20px 20px;
}

.author-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    background: #fff0e8;
}

.author-name {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.author-desc {
    color: #888;
    font-size: 14px;
    line-height: 1.8;
}

/* ========== 统计条 ========== */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 16px 0;
    margin: 10px 0 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

/* ========== 赞赏面板 ========== */
.donate-panel {
    background: #fff;
    border-radius: 20px;
    padding: 30px 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}

.panel-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 24px;
    position: relative;
}

.panel-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7c948);
    border-radius: 2px;
    margin: 8px auto 0;
}

/* 金额选择 */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 14px 8px;
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    background: #fafafa;
    font-size: 17px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.amount-btn:hover {
    border-color: #ffb899;
    background: #fff5f0;
    color: #e8541e;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(230,85,30,0.1);
}

.amount-btn.active {
    border-color: #ff6b35;
    background: linear-gradient(135deg, #fff0e8, #ffddc8);
    color: #e8541e;
    box-shadow: 0 4px 16px rgba(230,85,30,0.15);
    transform: translateY(-1px);
}

.amount-btn .unit {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}

/* 自定义金额 */
.custom-amount-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    background: #fafafa;
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    padding: 0 16px;
    transition: border-color 0.3s;
}

.custom-amount-wrap:focus-within {
    border-color: #ff6b35;
    background: #fff;
}

.custom-amount-wrap .prefix {
    font-size: 20px;
    color: #999;
    margin-right: 4px;
    font-weight: 500;
}

.custom-amount-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-size: 18px;
    outline: none;
    color: #333;
    font-weight: 600;
}

.custom-amount-wrap input::placeholder {
    color: #ccc;
    font-weight: 400;
    font-size: 16px;
}

/* 昵称输入 */
.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
    padding-left: 4px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    background: #fafafa;
    font-family: inherit;
    resize: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #ff6b35;
    background: #fff;
}

.input-group textarea {
    height: 80px;
    line-height: 1.6;
}

/* 赞赏按钮 */
.donate-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(255,107,53,0.3);
    position: relative;
    overflow: hidden;
}

.donate-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255,107,53,0.4);
}

.donate-submit:active {
    transform: translateY(0);
}

.donate-submit:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ========== 赞赏记录 ========== */
.records-section {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #333;
}

.section-count {
    font-size: 13px;
    color: #bbb;
}

.record-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f8f8f8;
    animation: fadeInUp 0.4s ease both;
}

.record-item:last-child { border-bottom: none; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.record-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
    background: #f5f5f5;
}

.record-info {
    flex: 1;
    min-width: 0;
}

.record-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.record-msg {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.record-right {
    text-align: right;
    flex-shrink: 0;
}

.record-amount {
    font-size: 16px;
    font-weight: 700;
    color: #e8541e;
}

.record-time {
    font-size: 12px;
    color: #bbb;
    margin-top: 2px;
}

/* 加载更多 */
.load-more {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: none;
    margin-top: 8px;
    border-radius: 10px;
    transition: all 0.3s;
}

.load-more:hover {
    color: #e8541e;
    background: #fafafa;
}

.load-more:disabled {
    color: #ccc;
    cursor: default;
}

.no-records {
    text-align: center;
    padding: 40px 0;
    color: #ccc;
}

.no-records .icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

/* ========== 弹窗 Toast ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 20px 40px;
    border-radius: 16px;
    font-size: 16px;
    text-align: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast .amount {
    font-size: 28px;
    font-weight: 800;
    display: block;
    margin-bottom: 4px;
}

/* ========== 响应式 ========== */
@media (max-width: 480px) {
    .container { padding: 0 16px 40px; }
    .amount-grid { gap: 10px; }
    .amount-btn { padding: 12px 6px; font-size: 16px; border-radius: 12px; }
    .donate-panel, .records-section { padding: 20px 16px; border-radius: 16px; }
    .stats-bar { gap: 30px; }
    .stat-value { font-size: 22px; }
    .record-msg { max-width: 160px; }
}
