/* ============================================================
   TKE Workshop 极简现代风 - 纯 CSS 美化（无自定义 header）
   ============================================================ */

/* 1. Header 样式：纯白，微阴影 */
.md-header {
  background-color: #ffffff !important;
  color: #202124 !important;
  height: 64px !important;
  box-shadow: 0 1px 2px rgba(60,64,67,0.1) !important;
  border-bottom: none !important;
}

[data-md-color-scheme="slate"] .md-header {
  background-color: #1a1a1a !important;
  color: #e8eaed !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

/* 内部对齐 */
.md-header__inner {
  height: 64px !important;
  display: flex !important;
  align-items: center !important;
}

/* 2. Logo 样式 */
.md-logo svg,
.md-logo img {
  width: 28px !important;
  height: 28px !important;
}

.md-header__title {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin-left: 0.5rem !important;
  color: #202124 !important;
}

[data-md-color-scheme="slate"] .md-header__title {
  color: #e8eaed !important;
}

/* 3. 导航标签 (Tabs) 样式：加大字号，增加间距 */
.md-tabs {
  background-color: #ffffff !important;
  height: 52px !important;
  border-bottom: 1px solid #e8eaed !important;
}

[data-md-color-scheme="slate"] .md-tabs {
  background-color: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
}

.md-tabs__list {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.md-tabs__item {
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
}

.md-tabs__link {
  color: #5f6368 !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  opacity: 1 !important;
  padding: 0 20px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
  border-bottom: 3px solid transparent !important;
  box-sizing: border-box !important;
}

[data-md-color-scheme="slate"] .md-tabs__link {
  color: #9aa0a6 !important;
}

/* Hover 与 Active 状态 */
.md-tabs__link:hover {
  color: #1a73e8 !important;
  background-color: rgba(26, 115, 232, 0.04) !important;
}

.md-tabs__link--active,
.md-tabs__link[aria-selected="true"] {
  color: #1a73e8 !important;
  font-weight: 600 !important;
  border-bottom-color: #1a73e8 !important;
}

[data-md-color-scheme="slate"] .md-tabs__link:hover,
[data-md-color-scheme="slate"] .md-tabs__link--active {
  color: #8ab4f8 !important;
  border-bottom-color: #8ab4f8 !important;
}

/* 4. 搜索框美化 */
.md-search__form {
  background-color: #f1f3f4 !important;
  border-radius: 20px !important;
  height: 40px !important;
}

[data-md-color-scheme="slate"] .md-search__form {
  background-color: #2a2a2a !important;
}

.md-search__input {
  font-size: 0.9rem !important;
}

/* 5. 工具按钮样式 */
.md-header__button.md-icon {
  color: #5f6368 !important;
}

[data-md-color-scheme="slate"] .md-header__button.md-icon {
  color: #9aa0a6 !important;
}

.md-header__button.md-icon:hover {
  background-color: rgba(0,0,0,0.05) !important;
  border-radius: 50% !important;
}

[data-md-color-scheme="slate"] .md-header__button.md-icon:hover {
  background-color: rgba(255,255,255,0.1) !important;
}

/* 6. 调整 Header 元素顺序：主题切换放到搜索框后 */
nav.md-header__inner.md-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

/* Logo */
nav.md-header__inner > a.md-logo {
  order: 1 !important;
}

/* 汉堡菜单 */
nav.md-header__inner > label.md-header__button {
  order: 2 !important;
}

/* 标题 */
nav.md-header__inner > .md-header__title {
  order: 3 !important;
  flex-grow: 1 !important;
}

/* 搜索框 - 放在右侧区域的第一个 */
nav.md-header__inner > .md-search {
  order: 10 !important;
}

/* 主题切换按钮（小太阳）- 放在搜索框后 */
nav.md-header__inner > form.md-header__option {
  order: 11 !important;
  margin-left: 0.4rem !important;
}

/* GitHub 图标 - 放最后 */
nav.md-header__inner > .md-header__source {
  order: 12 !important;
  margin-left: 0.4rem !important;
}
