/* ============================================================
   Hermes Git — 自定义主题  (Claude, 2026-06-02)
   登录页 moe 背景 + 毛玻璃登录卡 + 蓝紫 accent
   背景图：/assets/img/login-bg.jpg  ← 换图只需替换这一个文件
   备用图：/assets/img/login-bg-alt.jpg (shigure)
   作用域：登录相关样式用 :has(.page-content.user.signin) 限定，不影响仓库/其它页面
   ============================================================ */

/* ---------- 全局 accent（蓝紫） ---------- */
:root,
.theme-gitea-auto,
.theme-gitea-light,
.theme-gitea-dark {
  --color-primary: #6d74f0;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #5c63e8;
  --color-primary-dark-2: #4f54da;
  --color-primary-dark-3: #4148c8;
  --color-primary-light-1: #838af4;
  --color-primary-light-2: #9aa0f7;
  --color-primary-light-3: #b3b8fa;
  --color-primary-hover: #5c63e8;
  --color-primary-active: #4f54da;
}

/* ============ 登录页（仅此页生效） ============ */

/* 让 Gitea 默认底色透明，露出背景图 */
body:has(.page-content.user.signin),
body:has(.page-content.user.signin) .full.height,
body:has(.page-content.user.signin) .page-content {
  background: transparent !important;
}

/* 全屏背景图 + 暗化/蓝紫渐变罩，保证文字可读 */
.page-content.user.signin::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: url("/assets/img/login-bg.jpg") center center / cover no-repeat;
}
.page-content.user.signin::after {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(135deg,
              rgba(16,18,38,.74) 0%,
              rgba(46,30,72,.58) 55%,
              rgba(14,16,34,.84) 100%);
}

/* 导航栏透明化（仅登录页） */
body:has(.page-content.user.signin) #navbar,
body:has(.page-content.user.signin) .secondary-nav {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body:has(.page-content.user.signin) #navbar a,
body:has(.page-content.user.signin) #navbar .item,
body:has(.page-content.user.signin) #navbar .dropdown {
  color: #eef1ff !important;
}

/* 登录卡：毛玻璃 */
.page-content.user.signin .ui.container.fluid { background: transparent; }
.page-content.user.signin .ui.form,
.page-content.user.signin form.ui.form {
  max-width: 420px;
  margin: 5vh auto 0;
  padding: 2.2rem 2rem 1.8rem;
  background: rgba(22,24,46,.52);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}

/* 卡片内文字/标题/标签/链接 → 浅色 */
.page-content.user.signin h1,
.page-content.user.signin h2,
.page-content.user.signin h3,
.page-content.user.signin h4,
.page-content.user.signin .ui.header,
.page-content.user.signin .ui.form label,
.page-content.user.signin .ui.form .field > label,
.page-content.user.signin .ui.divider,
.page-content.user.signin a:not(.ui.button) {
  color: #eaecff !important;
}
.page-content.user.signin .ui.form .field > label { font-weight: 600; }
.page-content.user.signin a:not(.ui.button):hover { color: #b3b8fa !important; }

/* 输入框 */
.page-content.user.signin .ui.form input,
.page-content.user.signin .ui.form .ui.input > input {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  color: #1a1c2e;
}
.page-content.user.signin .ui.form input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(109,116,240,.45);
}

/* 登录按钮：渐变 */
.page-content.user.signin .ui.primary.button {
  background: linear-gradient(135deg,#6d74f0,#8b6cf0);
  border: none; border-radius: 10px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(109,116,240,.45);
}
.page-content.user.signin .ui.primary.button:hover { filter: brightness(1.08); }

/* 记住我等 checkbox 文字 */
.page-content.user.signin .ui.checkbox label { color: #d7daf5 !important; }

/* ============ 页脚品牌条 ============ */
.hermes-footer-note {
  text-align: center;
  padding: .5rem 0 .2rem;
  font-size: .82rem;
  opacity: .72;
}
.hermes-footer-note .hermes-dot { color: #8b6cf0; }

/* ============ moe 首页落地页（覆盖 home.tmpl） ============ */
.hermes-home { min-height: 86vh; }
.hermes-home::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: url("/assets/img/home-bg.jpg") center center / cover no-repeat;
}
.hermes-home::after {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,16,40,.52) 0%, rgba(30,18,52,.74) 70%, rgba(16,14,34,.88) 100%);
}
body:has(.hermes-home),
body:has(.hermes-home) .full.height,
body:has(.hermes-home) .page-content { background: transparent !important; }
body:has(.hermes-home) #navbar {
  background: rgba(20,18,40,.32) !important;
  backdrop-filter: blur(8px); border-color: transparent !important; box-shadow: none !important;
}
body:has(.hermes-home) #navbar a,
body:has(.hermes-home) #navbar .item { color: #eef1ff !important; }

.hermes-hero { text-align: center; padding: 7vh 1rem 2rem; }
.hermes-hero-logo { width: 84px; height: 84px; filter: drop-shadow(0 6px 22px rgba(123,92,255,.6)); }
.hermes-hero-title {
  font-size: 3.2rem; margin: .5rem 0 0; color: #fff; font-weight: 800; letter-spacing: .04em;
  text-shadow: 0 4px 26px rgba(0,0,0,.55);
}
.hermes-hero-sub { font-size: 1.15rem; color: #e3e5ff; opacity: .94; margin: .35rem 0 1.7rem; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hermes-hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hermes-btn { padding: .62rem 1.6rem; border-radius: 12px; font-weight: 600; text-decoration: none; transition: all .15s; }
.hermes-btn.primary { background: linear-gradient(135deg, #7b5cff, #4f8cff); color: #fff; box-shadow: 0 8px 22px rgba(109,116,240,.5); }
.hermes-btn.ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.32); backdrop-filter: blur(6px); }
.hermes-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.hermes-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(218px, 1fr)); gap: 1rem;
  max-width: 940px; margin: 1rem auto 4rem; padding: 0 1rem;
}
.hermes-card {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.3rem; border-radius: 16px;
  background: rgba(22,22,46,.5); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.hermes-card .hc-ico { font-size: 1.7rem; }
.hermes-card b { color: #fff; font-size: 1.05rem; }
.hermes-card span { color: #cbcff2; font-size: .86rem; line-height: 1.5; }

/* ============ Round 2 (2026-06-02)：字体 / 暖配色 / 站点级背景 / 背景轮播 / dashboard ============ */

/* 标题/品牌用霞鹜文楷（柔和耐看）；正文与代码保持系统/等宽字体保证可读 */
.hermes-hero-title, .hermes-hero-sub, .hermes-card b, #navbar .brand,
.page-content.user.signin h1, .page-content.user.signin h2,
.page-content.user.signin h3, .page-content.user.signin h4, .page-content.user.signin .ui.header {
  font-family: "LXGW WenKai", ui-rounded, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* 暖化配色：靛蓝 → 紫罗兰 */
:root, .theme-gitea-auto, .theme-gitea-light, .theme-gitea-dark {
  --color-primary: #8b5cf0;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #7a4ce0;
  --color-primary-dark-2: #6a3fd0;
  --color-primary-light-1: #a784f5;
  --color-primary-light-2: #bda3f8;
  --color-primary-hover: #7a4ce0;
  --color-primary-active: #6a3fd0;
}
.hermes-btn.primary,
.page-content.user.signin .ui.primary.button {
  background: linear-gradient(135deg, #ff7eb6 0%, #8b5cf0 55%, #6d74f0 100%) !important;
  box-shadow: 0 8px 22px rgba(176,106,240,.5) !important;
}

/* 背景轮播：home/login 的 ::before 用 JS 随机设的 --hg-rot-bg（无 JS 时回退默认图） */
.hermes-home::before { background-image: var(--hg-rot-bg, url("/assets/img/home-bg.jpg")); }
.page-content.user.signin::before { background-image: var(--hg-rot-bg, url("/assets/img/login-bg.jpg")); }

/* 站点级淡背景：除 home/login 外（explore/dashboard/repo…）透出一点 moe 氛围，重度暗化保可读 */
body {
  background-image: linear-gradient(rgba(15,14,30,.91), rgba(20,15,36,.95)), url("/assets/img/login-bg-alt.jpg");
  background-size: cover; background-position: center; background-attachment: fixed;
}
.full.height, .page-content { background-color: transparent !important; }

/* dashboard（登录后主页）内容卡毛玻璃化 */
.page-content.dashboard .ui.segment,
.page-content.dashboard .dashboard-repos,
.page-content.dashboard #dashboard-repo-list,
.page-content.dashboard .feeds .flex-item,
.page-content.dashboard .ui.attached.segment {
  background: rgba(26,24,50,.55) !important;
  backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 14px !important;
}
