/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --border: #eaeaea;
  --border-hover: #e5cdd1;
  --text: #171717;
  --text-secondary: #737373;
  --text-muted: #a3a3a3;
  --accent: #0070f3;
  --accent-hover: #0060df;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
  --transition: 150ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 导航栏 */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  display: flex;
  align-items: center;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.navbar-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-right: 40px;
}
.navbar-brand:hover { text-decoration: none; }
.nav-links {
  display: flex;
  gap: 8px;
  flex: 1 1;
}
.nav-link {
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg);
  text-decoration: none;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.btn-primary:hover {
  background: #404040;
  color: #fff;
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg);
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
}

/* 卡片 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 12px rgba(0,0,0,0.06),
    0 8px 24px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.05),
    0 6px 16px rgba(0,0,0,0.08),
    0 12px 32px rgba(0,0,0,0.06);
}
.card-header {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: rgba(253, 245, 247, 0.5);
}
.card-body { padding: 20px; }

/* 用户链接（头像+昵称）统一组件 */
.user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.user-link:hover { color: var(--text); }
.user-link-avatar,
.user-link-init {
  border-radius: 50%;
  flex-shrink: 0;
}
.user-link-avatar {
  object-fit: cover;
}
.user-link-init {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--text);
  font-weight: 600;
}
.user-link .user-link-avatar,
.user-link .user-link-init {
  width: 40px;
  height: 40px;
  font-size: 16px;
}
.user-link-sm .user-link-avatar,
.user-link-sm .user-link-init {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.card-body-code { padding: 0; }
.card-body-code .code-block-wrapper { margin: 0; }
.card-body-code .shiki-wrapper pre.shiki {
  border: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 20px;
}

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 14px 20px;
  text-align: left;
  white-space: nowrap;  /* 强制不换行 */
}
.table th {
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.table td {
  border-bottom: 1px solid var(--border);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg); }

/* 题目列表状态 */
.problem-table .row-passed {
  background: rgba(34, 197, 94, 0.08);
}
.problem-table .row-passed:hover {
  background: rgba(34, 197, 94, 0.12);
}
.problem-table .row-attempted {
  background: rgba(239, 68, 68, 0.06);
}
.problem-table .row-attempted:hover {
  background: rgba(239, 68, 68, 0.10);
}
.score-passed {
  color: #16a34a;
  font-weight: 600;
}
.score-attempted {
  color: #dc2626;
  font-weight: 600;
}

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: var(--bg); color: var(--text-secondary); }

/* 搜索框 */
.search-form {
  display: flex;
  gap: 12px;
  align-items: center;
}
.search-input-wrapper {
  flex: 1 1;
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 10px 40px 10px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-clear {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  border: none;
  background: var(--border);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-clear:hover {
  background: var(--text-muted);
  color: white;
}

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.form-input, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: var(--transition);
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 16px;
  gap: 16px;
}

/* 页面头部 */
.page-header {
  margin-bottom: 24px;
}
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.btn-xs {
  padding: 4px 8px;
  font-size: 12px;
}

/* 博客详情页 bp = blog post */
.bp {
  width: 100%;
}
.bp-header {
  margin-bottom: 32px;
}
.bp-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 12px 0;
}
.bp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  width: 100%;
}
.bp-date {
  color: var(--text-muted);
}
.bp-actions {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}
.bp-btn {
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 400;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.bp-btn:hover:not(:disabled) {
  color: var(--text);
  background: rgba(0,0,0,0.04);
}
.bp-btn-danger {
  color: var(--text-muted);
}
.bp-btn-danger:hover:not(:disabled) {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.06);
}
.bp-article {
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.bp-article .markdown-body {
  font-size: 16px;
  line-height: 1.75;
}
.bp-article .markdown-body h1 { font-size: 20px; margin: 24px 0 10px; }
.bp-article .markdown-body h2 { font-size: 18px; margin: 20px 0 8px; }
.bp-article .markdown-body h3 { font-size: 16px; margin: 16px 0 6px; }
.bp-article .markdown-body h1:first-child,
.bp-article .markdown-body h2:first-child,
.bp-article .markdown-body h3:first-child { margin-top: 0; }
.bp-article .markdown-body p { margin-bottom: 16px; }
.bp-article .markdown-body ul, .bp-article .markdown-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.bp-article .markdown-body pre {
  padding: 16px;
  margin: 16px 0;
  background: #f6f8fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}
.bp-article .markdown-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--border);
  background: rgba(0,0,0,0.02);
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
}
.bp-comments {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.bp-comments-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: var(--text);
}
.bp-comment-form {
  margin-bottom: 24px;
}
.bp-comment-input-wrap {
  position: relative;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.bp-comment-input-wrap:focus-within {
  border-color: var(--accent);
}
.bp-comment-input {
  width: 100%;
  padding: 0 56px 0 0;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  border: none;
  background: transparent;
  resize: none;
  min-height: 64px;
  display: block;
}
.bp-comment-input:focus {
  outline: none;
}
.bp-comment-send {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.bp-comment-send:hover:not(:disabled) {
  background: var(--accent-hover);
}
.bp-comment-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.bp-comment-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px 0;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}
.bp-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bp-comment-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg);
  border-radius: var(--radius);
}
.bp-comment-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.bp-comment-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}
.bp-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bp-comment-body {
  flex: 1 1;
  min-width: 0;
}
.bp-comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.bp-comment-time {
  color: var(--text-muted);
  font-size: 12px;
}
.bp-comment-actions {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}
.bp-comment-action {
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.bp-comment-action:hover {
  color: var(--text);
}
.bp-comment-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.bp-comment-action-danger:hover {
  color: var(--danger);
}
.bp-comment-action-primary {
  color: var(--accent);
}
.bp-comment-action-primary:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}
.bp-comment-edit {
  margin-top: 6px;
}
.bp-comment-edit-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 72px;
  margin-bottom: 8px;
}
.bp-comment-edit-input:focus {
  outline: none;
  border-color: var(--accent);
}
.bp-comment-edit-actions {
  display: flex;
  gap: 12px;
}
.bp-comment-text {
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.bp-mention {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.bp-mention:hover {
  text-decoration: underline;
}

/* 主内容 */
.main-content {
  padding: 32px 0;
  min-height: calc(100vh - 140px);
}

/* 页脚 */
.footer {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.footer a { color: var(--text-muted); }

/* 用户下拉 */
.user-dropdown { position: relative; }
.user-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.user-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.user-arrow.open { transform: rotate(180deg); }
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 120px;
  box-shadow: var(--shadow);
  z-index: 1000;
}
.user-dropdown-menu a,
.user-dropdown-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition);
}
.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}
.user-dropdown-menu button { color: var(--danger); }
.user-dropdown-menu button:hover { background: #fef2f2; }
.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* 用户名组件 */
.user-name { font-weight: 500; }
.user-admin { color: rgb(255, 51, 204); font-weight: 600; } /* Admin 粉色 */
.user-bot { color: #6366f1; font-weight: 500; } /* Bot 紫蓝色 */

/* UOJ Rating 颜色 */
.rating-gray { color: #999; }
.rating-green { color: #5eb95e; }
.rating-blue { color: #0088cc; }
.rating-purple { color: #9d3dcf; }
.rating-orange { color: #ff8c00; }
.rating-red { color: #cc0000; font-weight: 600; }

/* 分数 */
.score { font-weight: 600; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.score-100 { color: var(--success); }
.score-high { color: #22c55e; }
.score-mid { color: var(--warning); }
.score-low { color: #f97316; }
.score-zero { color: var(--text-muted); }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.pagination a:hover {
  border-color: var(--border-hover);
  text-decoration: none;
}
.pagination .active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* 提示框 */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-mono { font-family: 'SF Mono', Monaco, Consolas, monospace; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* 代码 */
pre, code {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 13px;
}
pre {
  background: #1a1a1a;
  color: #e5e5e5;
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--border); }

/* 首页两栏 */
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-gap: 24px;
  gap: 24px;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

/* 管理网格 */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.admin-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.admin-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
}
.admin-icon-blue { background: #dbeafe; color: #2563eb; }
.admin-icon-green { background: #dcfce7; color: #16a34a; }
.admin-icon-purple { background: #f3e8ff; color: #9333ea; }
.admin-icon-orange { background: #ffedd5; color: #ea580c; }
.admin-icon-pink { background: #fce7f3; color: #db2777; }
.admin-icon-gray { background: var(--bg); color: var(--text-secondary); }
.admin-info { flex: 1 1; }
.admin-label { font-size: 14px; font-weight: 600; color: var(--text); }
.admin-count { font-size: 28px; font-weight: 700; color: var(--text); margin-top: 4px; }
.admin-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* 设置页 */
.settings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-gap: 32px;
  gap: 32px;
}
.settings-sidebar { position: -webkit-sticky; position: sticky; top: 92px; align-self: start; }
.settings-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
}
.settings-nav-item {
  display: block;
  padding: 10px 14px;
  color: var(--text-secondary);
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}
.settings-nav-item:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}
.settings-nav-item.active {
  background: var(--text);
  color: #fff;
}
@media (max-width: 768px) {
  .settings-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* 用户主页 */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.user-profile-avatar {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.user-profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.user-profile-avatar span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  border-radius: 50%;
}
.user-profile-info { flex: 1 1; }
.user-profile-name {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.user-profile-id { color: var(--text-muted); font-size: 14px; margin-bottom: 6px; }
.user-profile-org { color: var(--text-secondary); font-size: 14px; }
.user-profile-motto { color: var(--text-muted); font-style: italic; font-size: 14px; margin-top: 8px; }
.user-profile-meta {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 12px;
  gap: 12px;
}
.stat-item {
  text-align: center;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}
.stat-value { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 头像上传 */
.avatar-upload { display: flex; gap: 24px; align-items: flex-start; }
.avatar-current {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-current img { width: 100%; height: 100%; object-fit: cover; }
.avatar-current span { color: #fff; font-size: 32px; font-weight: 600; }
.avatar-actions { flex: 1 1; }
.avatar-crop-container { flex: 1 1; }
.ReactCrop { border-radius: var(--radius); overflow: hidden; }

/* 权限选项 */
.permission-group { display: flex; flex-direction: column; gap: 10px; }
.permission-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.permission-option:hover { border-color: var(--border-hover); }
.permission-option input { margin-top: 3px; }
.permission-label { display: flex; flex-direction: column; gap: 2px; }
.permission-label strong { color: var(--text); font-size: 14px; }
.permission-label small { color: var(--text-muted); font-size: 12px; }

/* 题目页面 */
.problem-container {
  max-width: 1200px;
  margin: 0 auto;
}
.problem-header {
  text-align: center;
  padding-bottom: 24px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}
.problem-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}
.problem-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.problem-author {
  color: var(--text-muted);
}
.problem-source {
  color: var(--text-muted);
}
.source-link {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}
.source-link:hover {
  text-decoration: underline;
}
.problem-stats-inline {
  color: var(--text-muted);
}
.problem-stats-inline strong {
  color: var(--text-secondary);
}
.stat-rate {
  color: var(--success);
  font-weight: 600;
}
.problem-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.problem-nav-link {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}
.problem-nav-link:hover {
  color: var(--text);
  text-decoration: none;
}
.problem-nav-link.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.problem-body {
  min-height: 400px;
}
.problem-description {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}
.problem-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.problem-body {
  padding: 28px;
  min-height: 400px;
}
.problem-description {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}
.problem-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.problem-login-required {
  text-align: center;
  padding: 80px 20px;
}
.problem-login-required p {
  color: var(--text-muted);
  margin-bottom: 20px;
}
.problem-submit-page {
  max-width: 100%;
}

/* 提交记录 */
.problem-submissions {
  margin: 0 -4px;
}
.submissions-table {
  width: 100%;
  border-collapse: collapse;
}
.submissions-table th,
.submissions-table td {
  padding: 14px 16px;
  text-align: left;
}
.submissions-table th {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
}
.submissions-table td {
  border-bottom: 1px solid var(--border);
}
.submissions-table tbody tr:hover {
  background: var(--bg);
}
.submission-id {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  color: var(--text-muted);
}
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
}
/* === 题目级别状态 (4 种) === */
.status-accepted { background: #dcfce7; color: #166534; }
.status-unaccepted { background: #fee2e2; color: #991b1b; }
.status-ce { background: #fef3c7; color: #92400e; } /* Compile Error - 黄色 */
.status-danger { background: #7f1d1d; color: #fef2f2; } /* Danger - 深红 */

/* === Task 级别详细状态 === */
.status-wrong { background: #fee2e2; color: #991b1b; } /* Wrong Answer */
.status-re { background: #fce7f3; color: #9d174d; } /* Runtime Error - 粉色 */
.status-tle { background: #e0e7ff; color: #3730a3; } /* Time Limit - 蓝紫 */
.status-mle { background: #ede9fe; color: #5b21b6; } /* Memory Limit - 紫色 */
.status-ole { background: #fef3c7; color: #78350f; } /* Output Limit - 琥珀 */
.status-error { background: #f3f4f6; color: #374151; } /* System Error - 灰色 */
.status-default { background: #f3f4f6; color: #6b7280; }
.status-pending, .status-waiting, .status-judging { 
  background: #dbeafe; color: #1e40af; 
}

/* Markdown 样式 */
.markdown-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 16px;
}
.markdown-body h1 { font-size: 24px; }
.markdown-body h2 { font-size: 20px; }
.markdown-body h3 { font-size: 16px; }
.markdown-body h1:first-child, .markdown-body h2:first-child { margin-top: 0; }
.markdown-body p { margin-bottom: 16px; }
.markdown-body ul, .markdown-body ol { padding-left: 24px; margin-bottom: 16px; }
.markdown-body li { margin-bottom: 6px; }
.markdown-body code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}
.markdown-body pre {
  background: #f6f8fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
}
.markdown-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
}
.markdown-body blockquote {
  border-left: 3px solid var(--border);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
}
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.markdown-body th, .markdown-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.markdown-body th { background: var(--bg); font-weight: 600; }

/* Shiki 代码高亮 */
.code-block-wrapper {
  position: relative;
  margin: 16px 0;
}
.code-block-wrapper:hover .copy-button {
  opacity: 1;
}
.shiki-wrapper {
  margin: 0;
}
.shiki-wrapper pre.shiki {
  background: #f8f9fa !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  padding-right: 50px;
  margin: 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}
.shiki-wrapper code {
  background: none !important;
  padding: 0 !important;
}

/* 复制按钮 */
.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.copy-button:hover {
  background: var(--bg);
}
.copy-button svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* 编辑表单 */
.edit-form { max-width: 500px; }
.form-actions { margin-top: 24px; }

/* 博客编辑页：全宽，左右各一半 */
.blog-writer-form { max-width: none; }
.blog-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0;
  gap: 0;
  height: 60vh;
  min-height: 400px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}
.blog-editor-pane,
.blog-preview-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.blog-editor-pane { border-right: 1px solid #d1d5db; }
.blog-preview-pane { background: #fff; }
.blog-editor-toolbar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #f3f4f6;
  border-bottom: 1px solid #d1d5db;
  font-size: 13px;
  font-weight: 600;
}
.blog-editor-inner { flex: 1 1; min-height: 0; }
.blog-preview-inner {
  flex: 1 1;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}


