/* ============================================
   任务网 - 前台样式 (Professional UI)
   ============================================ */

/* ---------- 全局 ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #f3f4f6;
  color: #374151;
  line-height: 1.6;
}
a { color: #4f46e5; text-decoration: none; }
a:hover { color: #3730a3; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { color: #1f2937; }

/* ---------- 顶部导航 ---------- */
.navbar {
  background: #1e293b;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  min-height: 60px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.navbar-brand {
  color: #f1f5f9 !important;
  font-size: 20px;
  font-weight: 700;
  padding: 18px 20px;
  letter-spacing: 0.5px;
}
.navbar-brand:hover { color: #818cf8 !important; }
.navbar-nav > li > a {
  color: #cbd5e1 !important;
  font-size: 14px;
  padding: 19px 16px;
  transition: all 0.2s;
}
.navbar-nav > li > a:hover { color: #fff !important; background: rgba(255,255,255,0.08) !important; }
.navbar-nav > li.active > a { color: #fff !important; background: #4f46e5 !important; }

/* 右侧用户信息 */
.navbar-right > li > a { color: #94a3b8 !important; font-size: 13px; }
.navbar-right > li > a:hover { color: #fff !important; }

/* navbar-toggle 适配暗色背景 */
.navbar-toggle { border-color: rgba(255,255,255,0.2); }
.navbar-toggle .icon-bar { background-color: #cbd5e1; }
.navbar-toggle:hover { background: rgba(255,255,255,0.08); }

/* ---------- 主容器 ---------- */
.main-wrap {
  padding-top: 120px;
  padding-bottom: 30px;
}

/* ---------- 卡片（替代 panel）---------- */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 24px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  background: #f9fafb;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* 文章详情页 h1 标题，沿用 card-header 样式 */
.card > h1 {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  background: #f9fafb;
  border-radius: 8px 8px 0 0;
  margin: 0;
}
.card-header::after { content: ''; display: table; clear: both; }
.card-body { padding: 20px; }
.card-body.no-padding { padding: 0; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 8px 8px;
  color: #9ca3af;
  font-size: 13px;
}
.card-footer::after { content: ''; display: table; clear: both; }

/* ---------- 带色彩的卡片标题 ---------- */
.card-primary .card-header { background: #4f46e5; color: #fff; border-bottom-color: #4338ca; }
.card-success .card-header { background: #059669; color: #fff; border-bottom-color: #047857; }
.card-info    .card-header { background: #0891b2; color: #fff; border-bottom-color: #0e7490; }
.card-warning .card-header { background: #d97706; color: #fff; border-bottom-color: #b45309; }
.card-danger  .card-header { background: #dc2626; color: #fff; border-bottom-color: #b91c1c; }
/* h1 在彩色卡片中也延续对应配色 */
.card-warning > h1 { background: #d97706; color: #fff; border-bottom-color: #b45309; }
.card-primary > h1 { background: #4f46e5; color: #fff; border-bottom-color: #4338ca; }
.card-success > h1 { background: #059669; color: #fff; border-bottom-color: #047857; }
.card-info    > h1 { background: #0891b2; color: #fff; border-bottom-color: #0e7490; }
.card-danger  > h1 { background: #dc2626; color: #fff; border-bottom-color: #b91c1c; }

/* ---------- 首页公告 Bar ---------- */
.notice-bar {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  padding: 14px 22px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}
.notice-bar a { color: #fef08a; font-weight: 600; }
.notice-bar a:hover { color: #fff; }

/* ---------- 表格 ---------- */
.table { margin-bottom: 0; }
.table thead th {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.table tbody td {
  padding: 12px 14px;
  border-top: 1px solid #f3f4f6;
  font-size: 14px;
  vertical-align: middle;
}
.table tbody tr:hover { background: #f8fafc; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fafbfc; }

/* ---------- 按钮 ---------- */
.btn {
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.btn:active { box-shadow: none !important; }
.btn-primary { background: #4f46e5; border-color: #4338ca; }
.btn-primary:hover { background: #4338ca; border-color: #3730a3; }
.btn-success { background: #059669; border-color: #047857; }
.btn-success:hover { background: #047857; border-color: #065f46; }
.btn-info { background: #0891b2; border-color: #0e7490; }
.btn-info:hover { background: #0e7490; border-color: #155e75; }
.btn-warning { background: #d97706; border-color: #b45309; color: #fff; }
.btn-warning:hover { background: #b45309; border-color: #92400e; color: #fff; }
.btn-danger { background: #dc2626; border-color: #b91c1c; }
.btn-danger:hover { background: #b91c1c; border-color: #991b1b; }
.btn-default { background: #fff; border-color: #d1d5db; color: #374151; }
.btn-default:hover { background: #f9fafb; border-color: #9ca3af; }
.btn-xs { padding: 3px 10px; font-size: 11px; border-radius: 3px; }
.btn-sm { padding: 5px 14px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 16px; border-radius: 8px; }
.btn-block { display: block; width: 100%; }

/* ---------- 标签 ---------- */
.label { font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 3px; }
.label-success { background: #059669; }
.label-danger  { background: #dc2626; }
.label-warning { background: #d97706; }
.label-info    { background: #0891b2; }
.label-default { background: #e5e7eb; color: #6b7280; }
.label-primary { background: #4f46e5; }

/* ---------- 徽章 ---------- */
.badge { background: #4f46e5; border-radius: 10px; padding: 3px 9px; font-size: 11px; }

/* ---------- 表单 ---------- */
.form-control {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: none;
  padding: 9px 12px;
  font-size: 14px;
  height: auto;
}
.form-control:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.form-group { margin-bottom: 18px; }
.form-group label { font-weight: 600; font-size: 13px; color: #4b5563; margin-bottom: 5px; }

/* ---------- 首页特色卡片 ---------- */
.feature-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
  transition: all 0.2s;
}
.feature-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.feature-card .feature-icon { font-size: 36px; margin-bottom: 10px; }
.feature-card h5 { margin: 8px 0; font-weight: 700; font-size: 15px; }
.feature-card p { color: #9ca3af; font-size: 13px; margin: 0; }

/* ---------- 排行榜 ---------- */
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  gap: 12px;
  font-size: 14px;
}
.rank-list li:last-child { border-bottom: none; }
.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #9ca3af;
}
.rank-list li:nth-child(1) .rank-num { background: linear-gradient(135deg, #f59e0b, #d97706); }
.rank-list li:nth-child(2) .rank-num { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank-list li:nth-child(3) .rank-num { background: linear-gradient(135deg, #d97706, #b45309); }
.rank-name { flex: 1; font-weight: 500; }
.rank-score { color: #4f46e5; font-weight: 700; font-size: 13px; }

/* ---------- 友情链接 ---------- */
.link-tags { padding: 6px 0; }
.link-tags a {
  display: inline-block;
  padding: 6px 14px;
  margin: 3px;
  border-radius: 20px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.link-tags a:hover {
  background: #4f46e5;
  color: #fff;
}

/* ---------- 登录/注册 ---------- */
.auth-wrapper { padding: 20px 0; }
.auth-box {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  overflow: hidden;
}
.auth-box .auth-header {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 28px 30px;
  text-align: center;
}
.auth-box .auth-header h3 { margin: 0; font-size: 20px; font-weight: 700; color: #fff; }
.auth-box .auth-header p { margin: 6px 0 0; opacity: 0.85; font-size: 13px; }
.auth-box .auth-body { padding: 28px 30px 20px; }
.auth-box .auth-footer {
  padding: 14px;
  text-align: center;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
  color: #6b7280;
}
.auth-box .auth-footer a { color: #4f46e5; font-weight: 600; }

/* ---------- 签到页 ---------- */
.sign-wrap { text-align: center; }
.sign-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 40px;
  line-height: 90px;
  margin: 0 auto 16px;
}
.sign-btn {
  font-size: 17px;
  padding: 12px 48px;
  border-radius: 30px;
  font-weight: 600;
}
.sign-days { font-size: 36px; font-weight: 800; color: #dc2626; }

/* ---------- 个人中心 ---------- */
.profile-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 28px 24px;
  text-align: center;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 32px;
  line-height: 72px;
  margin: 0 auto 14px;
}
.profile-box h3 { font-size: 18px; font-weight: 700; margin: 6px 0; }
.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}
.profile-stats .stat-num { font-size: 20px; font-weight: 700; color: #4f46e5; }
.profile-stats .stat-label { font-size: 11px; color: #9ca3af; margin-top: 2px; }

/* ---------- 内容列表 ---------- */
.article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}
.article-row:hover { background: #f9fafb; }
.article-row:last-child { border-bottom: none; }
.article-row .article-title { font-size: 15px; font-weight: 500; color: #1f2937; flex: 1; }
.article-row .article-meta { font-size: 12px; color: #9ca3af; white-space: nowrap; margin-left: 16px; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 30px 0;
  margin-top: 48px;
  text-align: center;
  font-size: 13px;
  border-top: 3px solid #4f46e5;
}
.site-footer .container p { margin: 4px 0; }
.site-footer a { color: #a5b4fc; }
.site-footer a:hover { color: #fff; }

/* ---------- 分页 ---------- */
.pagination { margin: 0; }
.pagination > li > a,
.pagination > li > span {
  border-radius: 5px !important;
  margin: 0 2px;
  border: 1px solid #d1d5db;
  color: #4b5563;
  padding: 6px 13px;
  font-size: 13px;
}
.pagination > li > a:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.pagination > .active > a,
.pagination > .active > span { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.pagination > .disabled > span { color: #d1d5db; }

/* ---------- 提示消息 ---------- */
.alert {
  border: none;
  border-radius: 6px;
  padding: 14px 20px;
}
.alert-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #059669; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-left: 4px solid #dc2626; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #d97706; }
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid #4f46e5; }

/* ---------- 列表组覆盖 ---------- */
.list-group { margin-bottom: 0; }
.list-group-item {
  border-radius: 0 !important;
  border-left: none;
  border-right: none;
  padding: 13px 20px;
  font-size: 14px;
}
.list-group-item:first-child { border-top: none; }

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #9ca3af !important; }
.text-danger { color: #dc2626 !important; }
.text-success { color: #059669 !important; }
.text-primary { color: #4f46e5 !important; }
.pull-right { float: right !important; }
.pull-left  { float: left !important; }
.clearfix::after { content: ''; display: table; clear: both; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f3f4f6; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ---------- 响应式 ---------- */
@media (max-width: 767px) {
  .navbar-brand { font-size: 17px; padding: 16px 15px; }
  .navbar-nav > li > a { padding: 12px 15px; font-size: 13px; }
  .main-wrap { padding-top: 80px; padding-bottom: 20px; }
  .auth-box { margin: 0 10px; }
  .card-header { font-size: 14px; padding: 12px 16px; }
  .table thead th { font-size: 11px; padding: 8px; }
  .table tbody td { font-size: 13px; padding: 10px 8px; }
  .article-row { flex-direction: column; align-items: flex-start; }
  .article-row .article-meta { margin-left: 0; margin-top: 4px; }
}
