/* 幽默回复侧边栏现代轻奢与极简设计 */
:root {
  --primary: #07c160;
  --primary-hover: #06ad56;
  --primary-light: #e8f8f0;
  --accent: #ff9800;
  --accent-light: #fff3e0;
  --bg-main: #f7f8fa;
  --bg-card: #ffffff;
  --text-main: #1f2329;
  --text-sub: #646a73;
  --text-muted: #8f959e;
  --border: #e4e7ed;
  --border-light: #ebeef5;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  padding: 12px;
  min-height: 100vh;
}

/* 顶部状态栏 */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 20px;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.brand-badge {
  font-size: 11px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #eaedf1;
  color: var(--text-main);
}

/* 输入框区域 */
.comment-box-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}

.comment-box-wrap:focus-within {
  border-color: var(--primary);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.comment-textarea {
  width: 100%;
  min-height: 58px;
  max-height: 140px;
  border: none;
  resize: vertical;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-main);
  background: transparent;
  outline: none;
}

.comment-textarea::placeholder {
  color: var(--text-muted);
}

/* 按钮与操作区域 */
.action-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(7, 193, 96, 0.25);
  transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 风格标签筛选 */
.filter-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-tag {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-tag.active {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
  font-weight: 600;
}

/* 回复卡片列表 */
.reply-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
}

.reply-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.style-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.style-cold {
  background: #e0f2fe;
  color: #0284c7;
}

.style-self {
  background: #fef3c7;
  color: #d97706;
}

.style-absurd {
  background: #f3e8ff;
  color: #9333ea;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f0f2f5;
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--primary);
  color: #fff;
}

.copy-btn.copied {
  background: var(--primary) !important;
  color: #fff !important;
}

.reply-content {
  font-size: 13.5px;
  line-height: 1.6;
  color: #1e293b;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
  word-break: break-word;
}

/* 技法折叠抽屉 */
.engineering-toggle {
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px dashed var(--border-light);
  padding-top: 8px;
  user-select: none;
}

.engineering-toggle:hover {
  color: var(--primary);
}

.engineering-panel {
  display: none;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-sub);
}

.engineering-panel.open {
  display: block;
}

.eng-item {
  margin-bottom: 4px;
}

.eng-label {
  font-weight: 600;
  color: #475569;
}

.eng-val-highlight {
  color: #e11d48;
  font-weight: 600;
}

/* Loading 骨架屏 */
.loading-box {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.loading-box.active {
  display: flex;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e6e8eb 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-line.mid {
  width: 70%;
}

.loading-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  animation: pulse 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 36px 12px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.empty-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 12px;
  line-height: 1.5;
}

/* 底部状态 */
.footer {
  margin-top: 20px;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

/* 抽屉配置面板 */
.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  backdrop-filter: blur(2px);
}

.settings-modal.active {
  display: flex;
  align-items: flex-end;
}

.settings-content {
  background: #fff;
  width: 100%;
  border-radius: 16px 16px 0 0;
  padding: 18px 16px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 4px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
}
