* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #faf5f0; color: #3d2c1a; }
.app { max-width: 960px; margin: 0 auto; padding: 20px; }

header { text-align: center; margin-bottom: 24px; }
header h1 { font-size: 28px; color: #e85d3a; margin-bottom: 4px; }
.subtitle { color: #8c7a6b; font-size: 14px; margin-bottom: 16px; }

nav { display: flex; gap: 8px; justify-content: center; }
.tab { padding: 8px 20px; border: 2px solid #e8d5c8; background: #fff; border-radius: 20px; cursor: pointer; font-size: 14px; color: #8c7a6b; }
.tab.active { background: #e85d3a; border-color: #e85d3a; color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar button { padding: 8px 16px; background: #e85d3a; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.status { font-size: 13px; color: #8c7a6b; }

.rankings-grid { display: flex; flex-direction: column; gap: 12px; }
.rank-card { background: #fff; border-radius: 12px; padding: 16px; border: 1px solid #e8d5c8; cursor: pointer; transition: box-shadow .2s; }
.rank-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.rank-card .rank { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 6px; font-weight: bold; font-size: 14px; margin-right: 10px; }
.rank-card .rank.top3 { background: #e85d3a; color: #fff; }
.rank-card .rank { background: #f0e8e0; color: #8c7a6b; }
.rank-card .title { font-size: 16px; font-weight: 600; color: #3d2c1a; }
.rank-card .author { font-size: 13px; color: #8c7a6b; margin-left: 8px; }
.rank-card .desc { font-size: 13px; color: #6b5a4a; margin-top: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-card .meta { font-size: 12px; color: #a89484; margin-top: 6px; display: flex; gap: 12px; }
.rank-card .badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-fire { background: #fff0e6; color: #e85d3a; }
.badge-hot { background: #fff8e6; color: #c9940a; }

.gen-form { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e8d5c8; }
.gen-form label { display: block; font-size: 14px; font-weight: 600; color: #3d2c1a; margin-top: 12px; margin-bottom: 4px; }
.gen-form select, .gen-form textarea { width: 100%; padding: 10px; border: 1px solid #e0d0c0; border-radius: 8px; font-size: 14px; }
.gen-form textarea { resize: vertical; }
.gen-form button { margin-top: 16px; padding: 12px 24px; background: #e85d3a; color: #fff; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; width: 100%; }

.gen-result { margin-top: 16px; }
.gen-result .outline-card { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e8d5c8; margin-bottom: 12px; }
.gen-result .outline-card h3 { color: #e85d3a; margin-bottom: 8px; }
.gen-result .outline-card .meta { color: #8c7a6b; font-size: 13px; margin-bottom: 12px; }
.gen-result .outline-card .section { margin-bottom: 16px; }
.gen-result .outline-card .section h4 { color: #3d2c1a; font-size: 14px; margin-bottom: 4px; }
.gen-result .outline-card .section p { color: #6b5a4a; font-size: 13px; line-height: 1.6; }
.gen-result .chapter { background: #faf5f0; border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.gen-result .chapter .ch-title { font-weight: 600; color: #e85d3a; font-size: 14px; }
.gen-result .chapter .ch-content { color: #6b5a4a; font-size: 13px; margin-top: 4px; line-height: 1.5; }
.gen-result .chapter .ch-hook { background: #fff0e6; display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; color: #e85d3a; margin-top: 4px; }
.gen-result .quote { background: #fef6f0; border-left: 3px solid #e85d3a; padding: 8px 12px; margin: 4px 0; border-radius: 0 8px 8px 0; font-size: 13px; color: #6b5a4a; font-style: italic; }

.loading { text-align: center; padding: 40px; color: #8c7a6b; }
.loading .spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid #e8d5c8; border-top-color: #e85d3a; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.match-bar { display: flex; align-items: center; gap: 6px; width: 100px; }
.match-bar .match-fill { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #e8d5c8, #e85d3a); flex-shrink: 0; }
.match-bar span { font-size: 11px; color: #8c7a6b; white-space: nowrap; }
