body { font-family: Arial, sans-serif; margin: 0; background: #f4f6fb; color: #1f2937; }
.page-shell { max-width: 1280px; margin: 0 auto; padding: 24px; }
h1 { margin: 0 0 16px; font-size: 28px; }
.section { margin-bottom: 20px; }
.panel { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
.panel-title { font-size: 16px; font-weight: bold; margin-bottom: 12px; }
label { display: inline-block; min-width: 90px; margin-bottom: 8px; color: #4b5563; }
input, textarea, select, button { padding: 10px 12px; margin: 4px 8px 4px 0; border-radius: 8px; border: 1px solid #d1d5db; font-size: 14px; }
button { background: #2563eb; color: #fff; border: none; cursor: pointer; }
button:hover { opacity: 0.92; }
.danger-btn { background: #dc2626; }
.primary-btn { background: linear-gradient(135deg, #2563eb, #7c3aed); }
table { border-collapse: collapse; width: 100%; margin-top: 12px; background: #fff; overflow: hidden; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; }
th { background: #f8fafc; }
tr:hover td { background: #f9fbff; }
.result { margin-top: 16px; padding: 16px; border-radius: 12px; background: #f5f5f5; }
.hidden { display: none; }
.pager { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.page-number-btn { min-width: 40px; }
.active-page { background: #1d4ed8; }
.redeem-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at top left, #eef4ff 0%, #f6f3ff 42%, #f8fafc 100%); }
.redeem-wrapper { width: 100%; max-width: 560px; padding: 28px; }
.redeem-layout { max-width: 1260px; display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 28px; align-items: start; }
.redeem-main-panel { display: flex; flex-direction: column; gap: 24px; }
.redeem-card, .redeem-help-card, .redeem-qr-card { background: rgba(255, 255, 255, 0.96); border-radius: 24px; padding: 32px; box-shadow: 0 20px 50px rgba(37, 99, 235, 0.10); border: 1px solid rgba(226, 232, 240, 0.9); }
.redeem-qr-card { position: sticky; top: 28px; text-align: center; padding: 28px 24px; }
.redeem-qr-header, .redeem-help-header { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.redeem-title { font-size: 32px; font-weight: bold; margin-bottom: 8px; color: #111827; }
.redeem-subtitle { color: #6b7280; margin-bottom: 24px; font-size: 15px; }
.redeem-form { display: flex; flex-direction: column; gap: 12px; }
.redeem-input { width: 100%; box-sizing: border-box; padding: 16px 18px; font-size: 16px; border-radius: 14px; border: 1px solid #dbe3f0; background: #f8fbff; }
.redeem-btn { width: 100%; padding: 15px 16px; font-size: 16px; border-radius: 14px; }
.redeem-side-title { font-size: 22px; font-weight: bold; color: #111827; }
.redeem-qr-caption, .redeem-help-caption { font-size: 13px; line-height: 1.6; color: #6b7280; }
.redeem-qr-box { display: flex; justify-content: center; align-items: center; padding: 18px; background: linear-gradient(180deg, #f8fbff, #f1f5f9); border-radius: 20px; border: 1px solid #e2e8f0; }
.redeem-qr-image { max-width: 100%; width: 220px; border-radius: 16px; display: block; background: #fff; }
.markdown-content { color: #374151; line-height: 1.9; word-break: break-word; font-size: 15px; }
.markdown-content h1, .markdown-content h2, .markdown-content h3 { margin: 0 0 14px; color: #111827; line-height: 1.4; }
.markdown-content p, .markdown-content ul, .markdown-content ol, .markdown-content blockquote { margin: 0 0 14px; }
.markdown-content ul, .markdown-content ol { padding-left: 24px; }
.markdown-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 6px; }
.markdown-content pre { background: #111827; color: #f9fafb; padding: 14px; border-radius: 14px; overflow: auto; }
.markdown-content pre code { background: transparent; padding: 0; color: inherit; }
.markdown-content a { color: #2563eb; }
.markdown-content blockquote { border-left: 4px solid #cbd5e1; padding-left: 14px; color: #6b7280; }
.result-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.result-fail { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.result-item { background: rgba(255,255,255,0.72); border-radius: 12px; padding: 12px 14px; }
.result-label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.result-value { font-size: 14px; font-weight: bold; word-break: break-all; }
.config-markdown-layout { display: flex; gap: 16px; align-items: stretch; }
.config-markdown-col { flex: 1; min-width: 0; }
.config-markdown-input { width: 100%; height: 300px; resize: vertical; box-sizing: border-box; margin: 0; }
.config-markdown-preview { border: 1px solid #d1d5db; border-radius: 8px; padding: 12px; min-height: 280px; overflow: auto; box-sizing: border-box; background: #fff; }
@media (max-width: 960px) {
    .redeem-layout { grid-template-columns: 1fr; }
    .redeem-qr-card { position: static; order: 2; }
    .redeem-main-panel { order: 1; }
    .config-markdown-layout { flex-direction: column; }
}
