/* === Custom Font === */
body {
  font-family: "LXGW WenKai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 标签页字体 */
.md-tabs__link {
  font-family: "LXGW WenKai", sans-serif;
}

/* 侧边栏导航字体 */
.md-nav__link {
  font-family: "LXGW WenKai", sans-serif;
}

/* 目录字体 */
.md-nav--secondary .md-nav__link {
  font-family: "LXGW WenKai", sans-serif;
}

/* 返回顶部按钮字体 */
button.md-top {
  font-family: "LXGW WenKai", sans-serif;
  font-weight: bold;
}

/* === Table Styles === */
.md-typeset table:not([class]) {
  width: 100%;
  display: table;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: 8px 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.md-typeset__table {
  width: 100%;
  display: block;
  overflow-x: auto;
}

.md-typeset__scrollwrap {
  overflow-x: auto;
}

/* === Grid Background Effect === */
body::before {
  --size: 40px;
  --line: rgba(0, 0, 0, 0.06);
  content: '';
  height: 100vh;
  width: 100vw;
  position: fixed;
  background: linear-gradient(
        90deg,
        var(--line) 1px,
        transparent 1px var(--size)
      )
      50% 50% / var(--size) var(--size),
    linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% /
      var(--size) var(--size);
  -webkit-mask: linear-gradient(-20deg, transparent 50%, white);
          mask: linear-gradient(-20deg, transparent 50%, white);
  top: 0;
  left: 0;
  transform-style: flat;
  pointer-events: none;
  z-index: -1;
}

[data-md-color-scheme="slate"] body::before {
  --line: rgba(255, 255, 255, 0.06);
}

@supports (color: color-mix(in srgb, black, white)) {
  body::before {
    --line: color-mix(in srgb, var(--md-default-fg-color), transparent 90%);
  }
}

@media (max-width: 768px) {
  body::before {
    display: none;
  }
}

/* === Minimal Navigation Tabs === */
.md-tabs__list {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  border-bottom: none !important;
  box-shadow: none !important;
}

.md-tabs__item {
  height: 2.4rem;
  background: none !important;
  flex: 1;
  text-align: center;
  border-bottom: none !important;
  box-shadow: none !important;
}

.md-tabs {
  /* 防止透明度变化导致的布局移位 */
  will-change: opacity;
  transition: opacity 0.3s ease;
  border-bottom: none !important;
  box-shadow: none !important;
}

.md-tabs--hidden {
  pointer-events: none;
}

.md-tabs__link {
  font-size: 0.85rem;
  padding: 0 0.8rem;
  font-weight: 500;
  opacity: 0.6;
  transition: opacity 0.25s ease;
  background: none !important;
  background-image: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
}

.md-tabs__link:hover {
  opacity: 0.85;
  text-decoration: none !important;
}

.md-tabs__item--active .md-tabs__link,
.md-tabs__link--active {
  opacity: 1;
  font-weight: 600;
  color: inherit;
  border-bottom: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  background-image: none !important;
  background-size: 0 0 !important;
}

/* 移除标签下方的黑色指示线 */
.md-tabs__link--active::after,
.md-tabs__item--active .md-tabs__link::after {
  display: none !important;
}

.md-tabs__link::before,
.md-tabs__link::after,
.md-tabs__item::before,
.md-tabs__item::after {
  display: none !important;
}

/* === Sidebar Navigation Styles === */
.md-nav__link {
  padding: 0.5rem 0.8rem;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 0.25rem;
}

/* 统一有子菜单项的容器样式 */
.md-nav__item--nested > .md-nav__link,
.md-nav__container {
  padding: 0 !important;
}

.md-nav__container > .md-nav__link {
  padding: 0.5rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 400;
}

/* 调整子菜单缩进 - 减小左侧留白 */
.md-nav--primary .md-nav__list .md-nav__list {
  margin-left: 0.3rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--md-default-fg-color--lightest);
}

.md-nav__link:hover {
  background-color: var(--md-accent-fg-color--transparent);
}

.md-nav__link--active,
.md-nav__item--active > .md-nav__link {
  background-color: var(--md-accent-fg-color--transparent);
  color: var(--md-accent-fg-color);
  font-weight: 600;
}

/* === Mermaid Chart Font (use system font for faster rendering) === */
.mermaid {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* === Skill Icon Visibility Fix === */
/* 为技能图标添加深色背景，确保浅色模式下可见 */
.md-typeset figure img[width="64"] {
  background-color: #2d2d2d;
  border-radius: 8px;
  padding: 8px;
}

/* === Leaderboard Styles === */
.leaderboard-wrapper {
  --lb-primary: #00bcd4;
  --lb-bg: rgba(255, 255, 255, 0.5);
  --lb-border: rgba(0, 0, 0, 0.1);
  --lb-hover: rgba(0, 0, 0, 0.05);
  --lb-text: #333;
  --lb-text-muted: #666;
  --lb-rank-1: #ffd700;
  --lb-rank-2: #c0c0c0;
  --lb-rank-3: #cd7f32;
  margin: 2rem 0;
  font-family: "LXGW WenKai", sans-serif;
}

[data-md-color-scheme="slate"] .leaderboard-wrapper {
  --lb-primary: #64ffda;
  --lb-bg: rgba(30, 30, 35, 0.6);
  --lb-border: rgba(255, 255, 255, 0.1);
  --lb-hover: rgba(255, 255, 255, 0.05);
  --lb-text: #e0e0e0;
  --lb-text-muted: #999;
}

.leaderboard-header {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.leaderboard-header .lb-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0;
  flex-wrap: wrap;
  row-gap: 0.4rem;
}

.leaderboard-header .lb-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 600px) {
  /* On mobile: year row and month row each take a full line, but controls keep their natural size */
  .leaderboard-header .lb-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.leaderboard-header .lb-controls label {
  min-width: 3em;
  text-align: right;
  white-space: nowrap;
}

.leaderboard-header .lb-month-label {
  color: var(--lb-text-muted);
  font-size: 0.9rem;
}

.leaderboard-header .lb-year-label {
  color: var(--lb-text-muted);
  font-size: 0.9rem;
}

.leaderboard-header .lb-year-select,
.leaderboard-header .lb-month-select {
  font-size: 0.9rem;
  line-height: 1.2;
  height: 2rem;
  min-width: 6.5rem;
  font-family: "LXGW WenKai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border-radius: 10px;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2rem;
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 0.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5.5 7.5 10 12l4.5-4.5 1.4 1.4L10 14.8 4.1 8.9 5.5 7.5z'/%3E%3C/svg%3E");
  text-align: center;
  text-align-last: center;
}

[data-md-color-scheme="slate"] .leaderboard-header .lb-year-select,
[data-md-color-scheme="slate"] .leaderboard-header .lb-month-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M5.5 7.5 10 12l4.5-4.5 1.4 1.4L10 14.8 4.1 8.9 5.5 7.5z'/%3E%3C/svg%3E");
}

.leaderboard-header .lb-year-select {
  border: 1px solid var(--lb-border);
  background-color: var(--lb-bg);
  color: var(--lb-text);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
}

.leaderboard-header .lb-year-select:disabled {
  opacity: 0.6;
}

.leaderboard-header .lb-month-select {
  border: 1px solid var(--lb-border);
  background-color: var(--lb-bg);
  color: var(--lb-text);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
}

.leaderboard-header .lb-month-select:disabled {
  opacity: 0.6;
}

.leaderboard-subtitle {
  font-size: 0.9rem;
  color: var(--lb-text-muted);
  margin: 0;
  white-space: nowrap;
}

.leaderboard-content {
  background: var(--lb-bg);
  border-radius: 12px;
  border: 1px solid var(--lb-border);
  backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
  min-height: 300px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  text-align: left;
  padding: 1rem;
  color: var(--lb-text-muted);
  font-weight: normal;
  border-bottom: 1px solid var(--lb-border);
  white-space: nowrap;
}

.leaderboard-table td {
  padding: 0.8rem 1rem;
  color: var(--lb-text);
  border-bottom: 1px solid var(--lb-border);
  font-variant-numeric: tabular-nums;
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tr:hover td {
  background-color: var(--lb-hover);
}

.col-rank { width: 80px; min-width: 80px; text-align: center !important; white-space: nowrap; }
.col-player { font-weight: 500; text-align: center !important; width: 60%; }
.col-stat { text-align: center !important; width: 20%; min-width: 120px; }
.leaderboard-table thead .col-player,
.leaderboard-table thead .col-stat {
  text-align: center !important;
}
.leaderboard-table .col-empty {
  text-align: center !important;
  color: var(--lb-text-muted);
  padding: 2.2rem 1rem;
}

.rank-badge {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  font-weight: bold;
  color: var(--lb-text-muted);
}

.rank-1 .rank-badge {
  background: linear-gradient(135deg, var(--lb-rank-1), #d4af37);
  color: #fff;
  box-shadow: 0 0 10px var(--lb-rank-1);
}

.rank-2 .rank-badge {
  background: linear-gradient(135deg, var(--lb-rank-2), #a9a9a9);
  color: #fff;
}

.rank-3 .rank-badge {
  background: linear-gradient(135deg, var(--lb-rank-3), #a0522d);
  color: #fff;
}

.loading-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--lb-bg);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.loading-container.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--lb-border);
  border-top-color: var(--lb-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .leaderboard-title { font-size: 1.4rem; }
  .lb-tab-btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
  .leaderboard-table td, .leaderboard-table th { padding: 0.6rem 0.5rem; }
}
/* === Image Hover Zoom === */
/* 排除首页图片的悬浮放大效果 */
.md-typeset img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
}

.md-typeset img:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* === Achievements Icon Styling === */
.md-typeset img[src*="assets/guide/achievements/"] {
  width: 56px;
  height: 56px;
  max-width: none;
  object-fit: contain;
  padding: 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--md-default-bg-color), transparent 25%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  cursor: default;
  transform: none;
  transition: box-shadow 140ms ease, background-color 140ms ease, filter 140ms ease;
}

.md-typeset img[src*="assets/guide/achievements/"]:hover {
  transform: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  filter: saturate(1.05) contrast(1.02);
}

.md-typeset table:has(img[src*="assets/guide/achievements/"]) th,
.md-typeset table:has(img[src*="assets/guide/achievements/"]) td {
  padding: 6px 10px;
  vertical-align: middle;
}

.md-typeset table:has(img[src*="assets/guide/achievements/"]) td:first-child,
.md-typeset table:has(img[src*="assets/guide/achievements/"]) th:first-child {
  width: 96px;
  text-align: center;
}

/* 首页不应用图片悬浮放大效果 - 通过 JavaScript 添加 data-homepage 属性 */
[data-homepage] .md-typeset img {
  cursor: default;
}

[data-homepage] .md-typeset img:hover {
  transform: none;
  box-shadow: none;
}

/* 点击放大到全屏 */
.image-fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-fullscreen-modal.active {
  opacity: 1;
}

.image-fullscreen-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
}

.image-fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 10001;
}

.image-fullscreen-close:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .image-fullscreen-close {
    width: 36px;
    height: 36px;
    font-size: 24px;
    top: 10px;
    right: 10px;
  }
}

/* === Responsive Video Container === */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1.5em 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .video-container {
    padding-bottom: 56.25%; /* Keep 16:9 ratio on mobile */
    margin: 1em 0;
  }
}

/* === Scroll Reveal Animation === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.md-typeset .grid.cards > ul > li {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease,
              border-color 0.35s ease, box-shadow 0.35s ease;
}

.md-typeset .grid.cards.visible > ul > li {
  opacity: 1;
  transform: translateY(0);
}

.md-typeset .grid.cards.visible > ul > li:nth-child(1) { transition-delay: 0.05s; }
.md-typeset .grid.cards.visible > ul > li:nth-child(2) { transition-delay: 0.10s; }
.md-typeset .grid.cards.visible > ul > li:nth-child(3) { transition-delay: 0.15s; }
.md-typeset .grid.cards.visible > ul > li:nth-child(4) { transition-delay: 0.20s; }
.md-typeset .grid.cards.visible > ul > li:nth-child(5) { transition-delay: 0.25s; }
.md-typeset .grid.cards.visible > ul > li:nth-child(6) { transition-delay: 0.30s; }
.md-typeset .grid.cards.visible > ul > li:nth-child(7) { transition-delay: 0.35s; }
.md-typeset .grid.cards.visible > ul > li:nth-child(8) { transition-delay: 0.40s; }

/* === Homepage Hero Section === */
.hero {
  position: relative;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  margin: -0.8rem -0.8rem 2rem;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #0b3d91, #1a1a2e);
  background-size: 400% 400%;
  animation: heroGradient 12s ease infinite;
}

@keyframes heroGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(0, 210, 255, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(131, 58, 180, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 40px rgba(100, 149, 237, 0.5), 0 0 80px rgba(100, 149, 237, 0.2);
  margin-bottom: 1.5rem;
  animation: logoFloat 4s ease-in-out infinite, heroFadeIn 1s ease both;
  cursor: default;
}

.hero-logo:hover {
  transform: none !important;
  box-shadow: 0 0 40px rgba(100, 149, 237, 0.5), 0 0 80px rgba(100, 149, 237, 0.2) !important;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, #e0e7ff, #a5b4fc, #67e8f9, #c4b5fd);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientText 4s ease infinite, heroFadeIn 1s ease 0.2s both;
  margin: 0 0 0.6rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

@keyframes gradientText {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  margin: 0 0 2rem;
  animation: heroFadeIn 1s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroFadeIn 1s ease 0.6s both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: all 0.3s ease;
  font-family: "LXGW WenKai", sans-serif;
}

.hero-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero-scroll {
  margin-top: 2rem;
  animation: heroFadeIn 1s ease 0.8s both, scrollBounce 2s ease-in-out infinite;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.5rem;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .hero { padding: 3rem 1rem 2rem; margin: -0.8rem -0.8rem 1.5rem; }
  .hero-logo { width: 72px; height: 72px; }
}

/* === Stats Bar === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 0 0 2.5rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  animation: heroFadeIn 0.8s ease both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
}

[data-md-color-scheme="slate"] .stat-card {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

[data-md-color-scheme="slate"] .stat-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.3rem;
}

/* === Glow Cards (homepage grid) === */
.md-typeset .grid.cards > ol > li,
.md-typeset .grid.cards > ul > li {
  transition: all 0.35s ease;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.md-typeset .grid.cards > ol > li:hover,
.md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.1);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ol > li:hover,
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li:hover {
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.18);
}

/* === Notice Card === */
.notice-card {
  position: relative;
  padding: 1.5rem 1.8rem;
  margin: 2rem 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(251, 191, 36, 0.25);
  overflow: hidden;
}

.notice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
  border-radius: 4px 0 0 4px;
}

[data-md-color-scheme="slate"] .notice-card {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(245, 158, 11, 0.02));
  border-color: rgba(251, 191, 36, 0.2);
}

.notice-card h3 {
  margin-top: 0 !important;
  color: #f59e0b;
}

/* === Section Title === */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
  display: inline-block;
}

/* === Role Cards (guide/roles.md) === */
.md-typeset .role-card {
  --role-card-image-size: clamp(200px, 32vw, 280px);
  --role-card-bg: rgba(255, 255, 255, 0.6);
  --role-card-border: rgba(0, 0, 0, 0.1);

  display: grid;
  grid-template-columns: var(--role-card-image-size) 1fr;
  gap: 1rem 1.2rem;
  align-items: start;

  padding: 1rem;
  margin: 1.2rem 0;
  border: 1px solid var(--role-card-border);
  border-radius: 16px;
  background: var(--role-card-bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

[data-md-color-scheme="slate"] .md-typeset .role-card {
  --role-card-bg: rgba(30, 30, 35, 0.55);
  --role-card-border: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
}

@supports (color: color-mix(in srgb, black, white)) {
  .md-typeset .role-card {
    --role-card-bg: color-mix(in srgb, var(--md-default-bg-color), transparent 40%);
    --role-card-border: color-mix(in srgb, var(--md-default-fg-color), transparent 86%);
  }

  [data-md-color-scheme="slate"] .md-typeset .role-card {
    --role-card-bg: color-mix(in srgb, var(--md-default-bg-color), transparent 45%);
    --role-card-border: color-mix(in srgb, var(--md-default-fg-color), transparent 84%);
  }
}

.md-typeset .role-card__image {
  width: 100%;
  height: var(--role-card-image-size);
  object-fit: cover;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset .role-card__image {
  background: rgba(255, 255, 255, 0.06);
}

.md-typeset .role-card__content > :first-child {
  margin-top: 0;
}

.md-typeset .role-card__content p {
  margin: 0.25rem 0;
}

.md-typeset .role-card__content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .md-typeset .role-card {
    grid-template-columns: 1fr;
  }

  .md-typeset .role-card__image {
    width: min(var(--role-card-image-size), 100%);
    height: auto;
    aspect-ratio: 1 / 1;
    justify-self: center;
  }
}
