/* ROY的随记 - 虾饺风格 v2 */

:root {
  --md-primary-fg-color: #7EC8D9;
  --md-primary-fg-color--light: #A8DDE8;
  --md-primary-fg-color--dark: #4A7FA0;
  --md-accent-fg-color: #F0A08C;
  --md-accent-fg-color--transparent: rgba(240, 160, 140, 0.1);
  --md-default-bg-color: #F7F3EC;
  --md-default-bg-color--light: #FBF9F5;
  --md-default-bg-color--lighter: #FFFFFF;
  --md-default-fg-color: #3A2520;
  --md-default-fg-color--light: #8A7D72;
  --md-default-fg-color--lighter: #B0A89E;
  --md-code-bg-color: #F0EDE6;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #7EC8D9;
  --md-primary-fg-color--light: #A8DDE8;
  --md-primary-fg-color--dark: #5BA8C0;
  --md-accent-fg-color: #F0A08C;
  --md-default-bg-color: #1A1D20;
  --md-default-bg-color--light: #22262A;
  --md-default-bg-color--lighter: #2A2F34;
  --md-default-fg-color: #F0EDE6;
  --md-default-fg-color--light: #C4BDB3;
  --md-code-bg-color: #22262A;
}

/* 导航栏 - 毛玻璃效果 */
.md-header {
  background: rgba(126, 200, 217, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

[data-md-color-scheme="slate"] .md-header {
  background: rgba(37, 40, 44, 0.95);
  box-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* 搜索栏 */
.md-search__form {
  background: rgba(255,255,255,0.2);
  border-radius: 24px;
  transition: all 0.2s;
}
.md-search__form:hover {
  background: rgba(255,255,255,0.25);
}
.md-search__input {
  border-radius: 24px;
  background: transparent;
  color: white;
  font-size: 0.85rem;
  padding-left: 3rem;
}
.md-search__input::placeholder {
  color: rgba(255,255,255,0.7);
}
.md-search__icon {
  color: rgba(255,255,255,0.8);
}

[data-md-color-scheme="slate"] .md-search__form {
  background: rgba(126, 200, 217, 0.15);
}
[data-md-color-scheme="slate"] .md-search__form:hover {
  background: rgba(126, 200, 217, 0.2);
}
[data-md-color-scheme="slate"] .md-search__input {
  color: #E5DDD3;
}
[data-md-color-scheme="slate"] .md-search__input::placeholder {
  color: rgba(229, 221, 211, 0.5);
}

/* 侧边栏 */
.md-sidebar { font-size: 0.82rem; }
.md-nav__link--active { color: #4A7FA0 !important; font-weight: 600; }

/* 顶级导航项样式（首页、笔记、标签索引） */
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link {
  font-weight: 600;
  font-size: 0.9rem;
  color: #3A2520;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s;
  margin-bottom: 0.2rem;
}
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link:hover {
  background: rgba(126, 200, 217, 0.08);
}

/* 嵌套分组（笔记）的标题 - 和首页样式一致 */
.md-nav__item--nested > .md-nav__link {
  font-weight: 600;
  font-size: 0.9rem;
  color: #3A2520;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 0.2rem;
}

/* 移除分隔线 */
.md-nav--primary > .md-nav__list > .md-nav__item--nested {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* 子项样式（笔记列表里的文章） */
.md-nav__item--nested .md-nav__list {
  padding-left: 1rem;
  margin-top: 0.3rem;
}
.md-nav__item--nested .md-nav__item .md-nav__link {
  font-size: 0.8rem;
  font-weight: 400;
  color: #8A7D72;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}
.md-nav__item--nested .md-nav__item .md-nav__link:hover {
  background: rgba(126, 200, 217, 0.06);
  color: #4A7FA0;
}

/* 深色模式 */
[data-md-color-scheme="slate"] .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link,
[data-md-color-scheme="slate"] .md-nav__item--nested > .md-nav__link {
  color: #F0EDE6;
}
[data-md-color-scheme="slate"] .md-nav__link--active { color: #A8DDE8 !important; }
[data-md-color-scheme="slate"] .md-nav__item--nested .md-nav__item .md-nav__link {
  color: #C4BDB3;
}
[data-md-color-scheme="slate"] .md-nav__item--nested .md-nav__item .md-nav__link:hover {
  color: #A8DDE8;
}

/* 内容区 */
.md-content { max-width: 800px; }
.md-content__inner { padding-top: 1.5rem; }

/* 文章标题 */
.md-content h1 {
  font-weight: 700;
  color: #3A2520;
  border-bottom: 2px solid rgba(126, 200, 217, 0.3);
  padding-bottom: 0.5rem;
}
[data-md-color-scheme="slate"] .md-content h1 { color: #F0EDE6; }

.md-content h2 {
  color: #4A7FA0;
  font-weight: 600;
  margin-top: 2rem;
}
[data-md-color-scheme="slate"] .md-content h2 { color: #A8DDE8; }

/* 标签 */
.md-tag {
  background: linear-gradient(135deg, rgba(126,200,217,0.15), rgba(240,160,140,0.15));
  color: #4A7FA0;
  border-radius: 12px;
  padding: 3px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(126,200,217,0.2);
  transition: all 0.2s;
}
.md-tag:hover {
  background: #7EC8D9;
  color: white;
  border-color: #7EC8D9;
}

/* 链接 */
.md-content a:not(.md-tag) {
  color: #4A7FA0;
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 127, 160, 0.25);
  transition: all 0.15s;
}
.md-content a:not(.md-tag):hover {
  color: #F0A08C;
  border-bottom-color: #F0A08C;
}

[data-md-color-scheme="slate"] .md-content a:not(.md-tag) {
  color: #A8DDE8;
  border-bottom-color: rgba(168, 221, 232, 0.3);
}
[data-md-color-scheme="slate"] .md-content a:not(.md-tag):hover {
  color: #F0A08C;
  border-bottom-color: #F0A08C;
}

/* 提示框 */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px;
  border-left: 4px solid #7EC8D9;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* 表格 */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.md-typeset table:not([class]) th {
  background: #7EC8D9;
  color: white;
  font-weight: 600;
  font-size: 0.82rem;
}
.md-typeset table:not([class]) td {
  font-size: 0.85rem;
}

/* 页脚 */
.md-footer {
  background: linear-gradient(135deg, #4A7FA0, #7EC8D9);
}

/* kbd 样式 */
kbd {
  background: rgba(126, 200, 217, 0.12);
  border: 1px solid rgba(126, 200, 217, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.8em;
  color: #4A7FA0;
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(126, 200, 217, 0.4);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: #7EC8D9; }

/* 笔记元信息样式 */
.note-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 1rem;
  background: rgba(126, 200, 217, 0.06);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #8A7D72;
}
.note-meta strong { color: #4A7FA0; }

[data-md-color-scheme="slate"] .note-meta {
  background: rgba(126, 200, 217, 0.08);
  color: #C4BDB3;
}
[data-md-color-scheme="slate"] .note-meta strong { color: #A8DDE8; }
