/* ==========================================================================
   ImgHub Glass Theme
   A presentation layer that sits on top of the prebuilt frontend.
   - full-bleed photographic backdrop with adjustable blur / dim / glass
   - translucent "frosted glass" surfaces for the uploader, login and admin
   - refined typography, controls, and micro-interactions
   Loaded from index.html after the application styles.
   ========================================================================== */

/* ---------- design tokens ---------- */
:root {
  --tch-accent: #4f46e5;
  --tch-accent-2: #7c3aed;
  --tch-accent-3: #0891b2;
  --tch-ink: #1b1e34;
  --tch-ink-soft: #454b63;
  --tch-ink-mute: #6d7389;
  --tch-glass-a: 0.58;
  --tch-surface: rgba(255, 255, 255, var(--tch-glass-a));
  --tch-surface-strong: rgba(255, 255, 255, 0.74);
  --tch-surface-soft: rgba(255, 255, 255, 0.3);
  --tch-chip: rgba(255, 255, 255, 0.5);
  --tch-border: rgba(255, 255, 255, 0.75);
  --tch-border-soft: rgba(35, 40, 80, 0.1);
  --tch-shadow:
    0 30px 80px -34px rgba(38, 42, 110, 0.45),
    0 4px 14px -6px rgba(38, 42, 110, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --tch-shadow-sm:
    0 12px 30px -16px rgba(38, 42, 110, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --tch-title-gradient: linear-gradient(102deg, #2b2a66 0%, #5b4bd6 38%, #8b5cf6 66%, #0e7490 100%);
  --tch-dropzone: rgba(255, 255, 255, 0.26);
  --tch-dropzone-hover: rgba(255, 255, 255, 0.4);
  --tch-dash: rgba(70, 74, 130, 0.28);
  --tch-veil:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.05) 0%, rgba(248, 250, 255, 0.4) 58%, rgba(248, 250, 255, 0.82) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(248, 250, 255, 0.48) 100%);
  --tch-dim-color: #f3f5ff;
  --tch-dim: 0.12;
  --tch-blur: 0px;
  --tch-panel-radius: 32px;
  color-scheme: light;
}

html.dark {
  --tch-accent: #8b9cff;
  --tch-accent-2: #b98bff;
  --tch-accent-3: #4fd1c5;
  --tch-ink: #f5f7ff;
  --tch-ink-soft: #c3cbe4;
  --tch-ink-mute: #8f9ab8;
  --tch-surface: rgba(16, 20, 36, var(--tch-glass-a));
  --tch-surface-strong: rgba(15, 19, 34, 0.72);
  --tch-surface-soft: rgba(15, 19, 34, 0.28);
  --tch-chip: rgba(255, 255, 255, 0.07);
  --tch-border: rgba(255, 255, 255, 0.13);
  --tch-border-soft: rgba(255, 255, 255, 0.08);
  --tch-shadow:
    0 40px 90px -40px rgba(0, 0, 0, 0.85),
    0 2px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --tch-shadow-sm:
    0 16px 36px -22px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --tch-title-gradient: linear-gradient(102deg, #ffffff 0%, #dbe4ff 32%, #b7a6ff 64%, #7de3e0 100%);
  --tch-dropzone: rgba(255, 255, 255, 0.035);
  --tch-dropzone-hover: rgba(255, 255, 255, 0.06);
  --tch-dash: rgba(255, 255, 255, 0.18);
  --tch-veil:
    radial-gradient(120% 80% at 50% 0%, rgba(8, 12, 26, 0.1) 0%, rgba(6, 10, 22, 0.45) 55%, rgba(4, 7, 16, 0.82) 100%),
    linear-gradient(180deg, rgba(5, 8, 18, 0.18) 0%, rgba(4, 7, 16, 0.6) 100%);
  --tch-dim-color: #03050c;
  --tch-dim: 0.3;
  color-scheme: dark;
}

/* ---------- map the app's own palette onto the theme ---------- */
html:not(.dark) {
  --primary-color: #4f46e5;
  --primary-color-accent: #4338ca;
  --el-color-primary: #4f46e5;
  --el-color-primary-rgb: 79, 70, 229;
  --el-color-primary-light-3: #818cf8;
  --el-color-primary-light-5: #a5b4fc;
  --el-color-primary-light-7: #c7d2fe;
  --el-color-primary-light-8: #ddd6fe;
  --el-color-primary-light-9: #eef2ff;
  --el-color-primary-dark-2: #4338ca;
  --bg-color: #eef2ff;
  --admin-container-bg-color: #eef2ff;
  --glass-bg: rgba(255, 255, 255, 0.56);
  --glass-border: rgba(255, 255, 255, 0.78);
  --glass-shadow: var(--tch-shadow);
  --glass-header-bg: rgba(255, 255, 255, 0.5);
  --glass-header-border: rgba(255, 255, 255, 0.7);
  --upload-title-text-color: var(--tch-ink);
  --upload-header-color: var(--tch-ink);
  --upload-main-title-color: var(--tch-ink);
  --upload-text-color: var(--tch-ink-soft);
  --page-footer-text-color: var(--tch-ink-mute);
  --page-footer-name-color: var(--tch-ink);
  --login-title-color: var(--tch-ink);
  --password-input-bg-color: rgba(255, 255, 255, 0.55);
  --admin-container-color: var(--tch-ink);
  --admin-dashborad-stats-bg-color: rgba(255, 255, 255, 0.55);
  --admin-dashboard-btn-bg-color: rgba(255, 255, 255, 0.55);
  --admin-dashboard-imgcard-bg-color: rgba(255, 255, 255, 0.55);
  --dialog-bg-color: rgba(255, 255, 255, 0.92);
  --dialog-surface-bg-color: rgba(255, 255, 255, 0.7);
  --dialog-section-bg-color: rgba(238, 242, 255, 0.7);
  --dialog-control-bg-color: rgba(255, 255, 255, 0.6);
}

html.dark {
  --primary-color: #8b9cff;
  --primary-color-accent: #a5b4fc;
  --el-color-primary: #8b9cff;
  --el-color-primary-rgb: 139, 156, 255;
  --el-color-primary-light-3: #a5b4fc;
  --el-color-primary-light-5: #818cf8;
  --el-color-primary-light-7: #6366f1;
  --el-color-primary-light-8: #4f46e5;
  --el-color-primary-light-9: rgba(99, 102, 241, 0.16);
  --el-color-primary-dark-2: #a5b4fc;
  --bg-color: #070b16;
  --admin-container-bg-color: #070b16;
  --glass-bg: rgba(16, 20, 36, 0.52);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: var(--tch-shadow);
  --glass-header-bg: rgba(12, 16, 30, 0.55);
  --glass-header-border: rgba(255, 255, 255, 0.1);
  --upload-title-text-color: var(--tch-ink);
  --upload-header-color: var(--tch-ink);
  --upload-main-title-color: var(--tch-ink);
  --upload-text-color: var(--tch-ink-soft);
  --page-footer-text-color: var(--tch-ink-mute);
  --page-footer-name-color: #e6eaff;
  --login-title-color: var(--tch-ink);
  --password-input-bg-color: rgba(255, 255, 255, 0.05);
  --admin-container-color: var(--tch-ink);
  --admin-dashborad-stats-bg-color: rgba(16, 20, 36, 0.5);
  --admin-dashboard-btn-bg-color: rgba(16, 20, 36, 0.5);
  --admin-dashboard-imgcard-bg-color: rgba(16, 20, 36, 0.5);
  --dialog-bg-color: rgba(17, 21, 38, 0.94);
  --dialog-surface-bg-color: rgba(255, 255, 255, 0.05);
  --dialog-section-bg-color: rgba(255, 255, 255, 0.04);
  --dialog-control-bg-color: rgba(255, 255, 255, 0.06);
}

/* ---------- canvas ---------- */
html {
  background: #eef2ff;
  scrollbar-color: rgba(99, 102, 241, 0.45) transparent;
}
html.dark {
  background: #070b16;
}
body {
  background: transparent !important;
  color: var(--tch-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#app,
.container,
.upload-home,
.login,
.el-container,
.main-container,
.status-panel {
  background: transparent !important;
}
::selection {
  background: rgba(124, 92, 255, 0.3);
  color: inherit;
}

/* the app's own rotating wallpaper is replaced by the theme backdrop */
#bg1,
#bg2 {
  display: none !important;
}

/* ---------- backdrop ---------- */
#tch-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #070b16;
}
html:not(.dark) #tch-backdrop {
  background: #eef2ff;
}
.tch-bg-layer {
  position: absolute;
  inset: -6%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  filter: blur(var(--tch-blur)) saturate(1.06) brightness(1.02);
  transition: opacity 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.tch-bg-layer.is-active {
  opacity: 1;
  animation: tch-drift 52s ease-in-out infinite alternate;
}
.tch-veil,
.tch-dim,
.tch-grain {
  position: absolute;
  inset: 0;
}
.tch-veil {
  background: var(--tch-veil);
}
.tch-dim {
  background: var(--tch-dim-color);
  opacity: var(--tch-dim);
  transition: opacity 0.35s ease;
}
.tch-grain {
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
.tch-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: tch-float 26s ease-in-out infinite alternate;
}
.tch-orb--one {
  width: 42vw;
  height: 42vw;
  left: -12vw;
  top: -14vw;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.5), transparent 68%);
}
.tch-orb--two {
  width: 36vw;
  height: 36vw;
  right: -10vw;
  bottom: -16vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.32), transparent 68%);
  animation-delay: -9s;
}
html:not(.dark) .tch-orb {
  opacity: 0.25;
  mix-blend-mode: multiply;
}

@keyframes tch-drift {
  from {
    transform: scale(1.06) translate3d(-0.6%, -0.4%, 0);
  }
  to {
    transform: scale(1.12) translate3d(0.8%, 0.6%, 0);
  }
}
@keyframes tch-float {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4vw, 3vh, 0) scale(1.12);
  }
}
@keyframes tch-pulse {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.28);
    opacity: 0;
  }
  100% {
    transform: scale(1.28);
    opacity: 0;
  }
}

/* ---------- shared surfaces & controls ---------- */
body .logo {
  width: 64px;
  height: 64px;
  padding: 6px;
  border-radius: 20px;
  background: var(--tch-surface);
  border: 1px solid var(--tch-border);
  box-shadow: var(--tch-shadow-sm);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
body .logo:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 18px 40px -18px rgba(99, 102, 241, 0.7);
}
body .toggle-dark-button,
body .more-button,
body .upload-method-button,
body .directory-tree-trigger,
body .mobile-more-button,
body .quick-toolbar-button,
body .folder-upload-icon-button {
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
  color: var(--tch-ink-soft) !important;
  border-radius: 14px !important;
  box-shadow: var(--tch-shadow-sm) !important;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
body .toggle-dark-button:hover,
body .more-button:hover,
body .upload-method-button:hover,
body .directory-tree-trigger:hover,
body .mobile-more-button:hover,
body .quick-toolbar-button:hover,
body .folder-upload-icon-button:hover {
  transform: translateY(-2px);
  color: var(--tch-accent) !important;
  border-color: rgba(139, 156, 255, 0.55) !important;
  box-shadow: 0 16px 34px -16px rgba(60, 66, 160, 0.55) !important;
}
body .toggle-dark-button,
body .more-button,
body .upload-method-button,
body .directory-tree-trigger {
  width: 42px;
  height: 42px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body .upload-folder .el-input__wrapper {
  height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border);
  box-shadow: var(--tch-shadow-sm) !important;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
body .upload-folder .el-input__inner {
  color: var(--tch-ink) !important;
}
body .upload-folder .el-input__inner::placeholder {
  color: var(--tch-ink-mute) !important;
}
body .upload-folder .el-input__wrapper.is-focus {
  border-color: rgba(139, 156, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

/* ---------- home: hero ---------- */
body.tch-home .upload-home {
  min-height: 100vh;
  padding: 84px 20px 56px;
  box-sizing: border-box;
  justify-content: center;
}
body.tch-home .header {
  flex-direction: column;
  gap: 2px;
  margin-top: 1.5vh;
  top: 0;
  padding: 6px 15px 2px;
}
body.tch-home .title {
  font-size: clamp(2.35rem, 4.6vw, 3.35rem) !important;
  line-height: 1.28 !important;
  letter-spacing: 0.03em !important;
  animation: none !important;
  padding-bottom: 0.12em !important;
  filter: drop-shadow(0 10px 30px rgba(76, 84, 190, 0.28));
}
body.tch-home .title:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 14px 36px rgba(99, 102, 241, 0.4));
}
body.tch-home .main-title {
  background: var(--tch-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  text-shadow: none !important;
}
body.tch-home .title-crayon-text,
body.tch-home .title:after {
  display: none !important;
}
body.tch-home .header::after {
  content: "轻盈 · 私密 · 属于你的图片空间";
  display: block;
  margin-top: 2px;
  font-family: Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  color: var(--tch-ink-mute);
  text-align: center;
  text-indent: 0.42em;
  opacity: 0.9;
}
html[lang="en"] body.tch-home .header::after {
  content: "A quiet, private home for your images";
  letter-spacing: 0.22em;
  text-indent: 0.22em;
}

/* ---------- home: uploader ---------- */
body.tch-home .upload-form {
  width: min(880px, 92vw);
}
body.tch-home .upload-card-wrapper {
  width: 100% !important;
}
body.tch-home .upload-card {
  width: 100% !important;
  padding: 10px !important;
  border-radius: var(--tch-panel-radius) !important;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: var(--tch-shadow) !important;
  backdrop-filter: blur(26px) saturate(1.45);
  -webkit-backdrop-filter: blur(26px) saturate(1.45);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
body.tch-home .upload-card:hover {
  border-color: rgba(160, 172, 255, 0.5) !important;
  box-shadow:
    0 44px 100px -44px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(139, 156, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}
body.tch-home .upload-card .el-upload {
  display: block;
  width: 100%;
}
body.tch-home .el-upload-dragger {
  width: 100%;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 28px !important;
  border-radius: 24px !important;
  border: 1.5px dashed var(--tch-dash) !important;
  background: var(--tch-dropzone) !important;
  opacity: 1 !important;
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}
body.tch-home .el-upload-dragger:hover {
  border-color: rgba(139, 156, 255, 0.6) !important;
  background: var(--tch-dropzone-hover) !important;
  box-shadow: inset 0 0 60px rgba(99, 102, 241, 0.08);
}
body.tch-home .el-upload-dragger .el-icon--upload {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff !important;
  background: linear-gradient(140deg, #6366f1 0%, #8b5cf6 52%, #22d3ee 110%);
  box-shadow:
    0 20px 48px -16px rgba(99, 102, 241, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
body.tch-home .el-upload-dragger .el-icon--upload::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(139, 156, 255, 0.4);
  animation: tch-pulse 3.4s ease-out infinite;
  pointer-events: none;
}
body.tch-home .el-upload-dragger:hover .el-icon--upload {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 26px 60px -16px rgba(99, 102, 241, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
body.tch-home .upload-plus-icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.6;
}
body.tch-home .upload-prompt-row {
  gap: 8px;
}
body.tch-home .el-upload__text {
  font-size: 15px !important;
  letter-spacing: 0.02em;
  color: var(--tch-ink-soft) !important;
}
body.tch-home .el-upload__text em {
  color: var(--tch-ink) !important;
  font-weight: 600;
  padding: 3px 9px;
  margin: 0 1px;
  border-radius: 8px;
  background: var(--tch-chip);
  border: 1px solid var(--tch-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
body.tch-home .el-upload__text::after {
  content: "支持拖拽 · 粘贴 · 文件夹批量上传";
  display: block;
  margin-top: 16px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--tch-ink-mute);
}
html[lang="en"] body.tch-home .el-upload__text::after {
  content: "Drag, paste, or upload a whole folder";
  letter-spacing: 0.08em;
}
body.tch-home .folder-upload-icon-button {
  width: 30px;
  height: 30px;
  border-radius: 9px !important;
}

/* ---------- home: stats dock（仅在空状态生效，有文件时交给下面的列表规则） ---------- */
body.tch-home .upload-list-card:not(.upload-list-busy) {
  width: min(880px, 92vw) !important;
  height: 74px !important;
  margin-top: 16px !important;
  border-radius: 22px !important;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: var(--tch-shadow-sm) !important;
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
}
body.tch-home .upload-list-dashboard {
  padding: 0 22px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
body.tch-home .upload-list-dashboard-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--tch-ink-soft) !important;
}
body.tch-home .upload-list-dashboard-title .el-icon {
  color: var(--tch-accent);
  font-size: 15px;
}
body.tch-home .modern-action-group {
  background: var(--tch-chip) !important;
  border: 1px solid var(--tch-border) !important;
  border-radius: 12px;
  padding: 3px;
}
body.tch-home .modern-action-btn {
  border-radius: 9px;
  transition: background 0.25s ease, transform 0.25s ease;
}
body.tch-home .modern-action-btn:hover {
  transform: translateY(-1px);
  background: rgba(139, 156, 255, 0.12);
}

/* ---------- home: quick toolbar & footer ---------- */
body .quick-toolbar {
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: var(--tch-shadow) !important;
  border-radius: 22px !important;
  padding: 6px !important;
  gap: 6px;
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
}
body .quick-toolbar-button {
  width: 40px;
  height: 40px;
  border-radius: 14px !important;
}
body .page-footer {
  font-size: 13px !important;
  letter-spacing: 0.03em;
  color: var(--tch-ink-mute) !important;
  opacity: 0.95;
}
body .footer-name {
  color: var(--tch-ink) !important;
}

/* ---------- login ---------- */
body.tch-login .login {
  padding: 96px 20px 48px;
  background: transparent !important;
}
body.tch-login .login-container {
  width: min(440px, 92vw) !important;
  padding: 46px 42px 40px !important;
  border-radius: 32px !important;
  gap: 20px !important;
  background: var(--tch-surface-strong) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: var(--tch-shadow) !important;
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  overflow: hidden;
}
body.tch-login .login-container::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  pointer-events: none;
}
body.tch-login .login-container::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  top: -170px;
  right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 156, 255, 0.45), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}
body.tch-login .login-container > * {
  position: relative;
  z-index: 1;
}
body.tch-login .login-title {
  font-size: 1.6rem !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.45;
  text-align: center;
  color: var(--tch-ink) !important;
  text-shadow: none !important;
}
body.tch-login .input-container {
  width: 100%;
  max-width: 348px;
}
body.tch-login .input-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tch-ink-mute) !important;
}
body.tch-login .password-input .el-input__wrapper {
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--tch-chip) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.tch-login .password-input .el-input__wrapper.is-focus {
  border-color: rgba(139, 156, 255, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}
body.tch-login .password-input .el-input__inner {
  color: var(--tch-ink) !important;
  letter-spacing: 0.08em;
}
body.tch-login .submit {
  width: 100%;
  max-width: 348px;
  height: 50px;
  margin-top: 4px;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(120deg, #6366f1 0%, #8b5cf6 55%, #22d3ee 120%) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  box-shadow: 0 18px 42px -16px rgba(99, 102, 241, 0.8) !important;
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}
body.tch-login .submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 24px 52px -16px rgba(99, 102, 241, 0.9) !important;
}
body.tch-login .submit:active {
  transform: translateY(0);
}
body.tch-login .page-footer {
  margin-top: 18px;
}

/* ---------- admin shell ---------- */
body.tch-admin .admin-header-content {
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
  border-radius: 20px !important;
  box-shadow: var(--tch-shadow) !important;
  backdrop-filter: blur(26px) saturate(1.5);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
}
body.tch-admin .page-switcher-sheet {
  background: var(--tch-chip) !important;
  border: 1px solid var(--tch-border) !important;
  border-radius: 14px !important;
}
body.tch-admin .page-option.is-current {
  color: var(--tch-ink) !important;
}
body.tch-admin .admin-header-search .el-input__wrapper {
  height: 40px;
  border-radius: 12px;
  background: var(--tch-chip) !important;
  border: 1px solid var(--tch-border);
  box-shadow: none !important;
}
body.tch-admin .admin-header-search .el-input__inner {
  color: var(--tch-ink) !important;
}
body.tch-admin .admin-header-search .el-input__inner::placeholder {
  color: var(--tch-ink-mute) !important;
}
body.tch-admin .admin-header-control {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--tch-ink-soft) !important;
  transition: background 0.25s ease, color 0.25s ease;
}
body.tch-admin .admin-header-control:hover {
  background: var(--tch-chip) !important;
  color: var(--tch-accent) !important;
}
body.tch-admin .main-container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 44px 0 !important;
  box-sizing: border-box;
}
body.tch-admin .breadcrumb-container {
  padding: 9px 14px !important;
  border-radius: 16px;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border);
  box-shadow: var(--tch-shadow-sm);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
body.tch-admin .content {
  margin-top: 16px;
  padding: 18px !important;
  border-radius: 24px;
  background: var(--tch-surface-soft) !important;
  border: 1px solid var(--tch-border-soft);
  box-shadow: var(--tch-shadow-sm);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}
body.tch-admin .empty-icon {
  color: rgba(139, 156, 255, 0.35);
}
body.tch-admin .empty-text {
  color: var(--tch-ink) !important;
}
body.tch-admin .empty-hint {
  color: var(--tch-ink-mute) !important;
}
body.tch-admin .pagination-container {
  margin-top: 16px;
  padding: 10px 16px !important;
  border-radius: 16px;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border);
  box-shadow: var(--tch-shadow-sm);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
body.tch-admin .stats-badge {
  background: var(--tch-chip) !important;
  border-color: var(--tch-border) !important;
  color: var(--tch-ink-soft) !important;
}

/* system settings page */
body.tch-admin .status-hero {
  padding: 6px 12px 26px !important;
}
body.tch-admin .status-hero-title {
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--tch-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
body.tch-admin .status-hero-summary,
body.tch-admin .status-hero-date,
body.tch-admin .status-hero-kicker {
  color: var(--tch-ink-mute) !important;
}
body.tch-admin .sidebar-container {
  border-radius: 20px !important;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: var(--tch-shadow) !important;
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
}
body.tch-admin .menu-item {
  border-radius: 12px !important;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
body.tch-admin .menu-item:hover {
  transform: translateX(2px);
  background: rgba(139, 156, 255, 0.12) !important;
}
body.tch-admin .menu-item.is-active {
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.28), rgba(139, 92, 246, 0.2)) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(139, 156, 255, 0.28);
}
body.tch-admin .overview-card {
  border-radius: 20px !important;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: var(--tch-shadow-sm) !important;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
body.tch-admin .overview-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 156, 255, 0.45) !important;
  box-shadow: 0 26px 60px -30px rgba(0, 0, 0, 0.7) !important;
}
body.tch-admin .overview-card .card-icon {
  border-radius: 16px !important;
  background: linear-gradient(140deg, #6366f1, #8b5cf6 60%, #22d3ee) !important;
  color: #fff !important;
  box-shadow: 0 14px 30px -14px rgba(99, 102, 241, 0.8);
}
body.tch-admin .chart-card {
  border-radius: 22px !important;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: var(--tch-shadow-sm) !important;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}
body.tch-admin .chart-title,
body.tch-admin .card-title {
  letter-spacing: 0.02em;
}
body.tch-admin .card-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* element-plus overlays keep their own surfaces, just soften the corners */
body .el-dialog,
body .el-message-box,
body .el-drawer {
  border-radius: 22px !important;
}
body .el-message-box {
  border-radius: 22px !important;
}
body .el-button {
  border-radius: 10px;
}
body .el-button--primary {
  background: linear-gradient(120deg, #6366f1, #8b5cf6 70%, #7c3aed) !important;
  border: 0 !important;
  box-shadow: 0 12px 26px -14px rgba(99, 102, 241, 0.7);
}
body .el-button--primary:hover {
  filter: brightness(1.06);
}
body .el-input__wrapper {
  border-radius: 10px;
}

/* ---------- theme settings panel ---------- */
.tch-bg-button {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2147482000;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 16px 0 13px;
  border-radius: 999px;
  border: 1px solid var(--tch-border);
  background: var(--tch-surface);
  color: var(--tch-ink);
  font: 500 13px/1 Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: var(--tch-shadow-sm);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tch-bg-button:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 156, 255, 0.55);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}
.tch-bg-button svg {
  width: 18px;
  height: 18px;
}
.tch-bg-button .tch-bg-button-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}
body.tch-admin .tch-bg-button {
  bottom: 20px;
}
.tch-panel {
  position: fixed;
  left: 24px;
  bottom: 80px;
  z-index: 2147482001;
  width: 336px;
  max-height: min(640px, calc(100vh - 120px));
  overflow: auto;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid var(--tch-border);
  background: var(--tch-surface-strong);
  color: var(--tch-ink);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(34px) saturate(1.6);
  -webkit-backdrop-filter: blur(34px) saturate(1.6);
  transform-origin: bottom left;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.25s;
  scrollbar-width: thin;
}
.tch-panel[hidden] {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.97);
  pointer-events: none;
}
.tch-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.tch-panel-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tch-panel-sub {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--tch-ink-mute);
}
.tch-panel-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--tch-border);
  border-radius: 10px;
  background: var(--tch-chip);
  color: var(--tch-ink-soft);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: color 0.2s ease, background 0.2s ease;
}
.tch-panel-close:hover {
  color: var(--tch-ink);
  background: rgba(139, 156, 255, 0.16);
}
.tch-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tch-preset {
  position: relative;
  height: 72px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--tch-border);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
  color: #fff;
  font: 500 11.5px/1.2 Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.04em;
  text-align: left;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.tch-preset::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(4, 8, 18, 0.72) 100%);
}
.tch-preset span {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.tch-preset:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 156, 255, 0.6);
}
.tch-preset.is-active {
  border-color: rgba(160, 172, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(139, 156, 255, 0.35);
}
.tch-preset.is-auto {
  background: linear-gradient(135deg, #10142a 0%, #312e81 45%, #e9f1ff 46%, #ffeef7 100%);
}
.tch-preset.is-custom {
  background: repeating-linear-gradient(135deg, rgba(139, 156, 255, 0.1) 0 10px, transparent 10px 20px), var(--tch-chip);
  color: var(--tch-ink-soft);
}
.tch-preset.is-custom::after {
  display: none;
}
.tch-preset.is-custom span {
  position: static;
  display: grid;
  place-items: center;
  height: 100%;
  text-shadow: none;
}
.tch-upload-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}
.tch-upload-btn {
  flex: 1;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 11px;
  border: 1px dashed var(--tch-dash);
  background: var(--tch-chip);
  color: var(--tch-ink-soft);
  font: 500 12px/1 Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.tch-upload-btn:hover {
  border-color: rgba(139, 156, 255, 0.6);
  color: var(--tch-ink);
}
.tch-upload-btn input {
  display: none;
}
.tch-sliders {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.tch-slider {
  display: grid;
  grid-template-columns: 52px 1fr 38px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--tch-ink-soft);
}
.tch-slider output {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--tch-ink-mute);
  font-size: 11px;
}
.tch-slider input[type="range"] {
  width: 100%;
  height: 4px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  outline: none;
  cursor: pointer;
}
.tch-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #6366f1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.tch-panel-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--tch-border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tch-reset {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--tch-border);
  background: transparent;
  color: var(--tch-ink-soft);
  font: 500 12px/1 Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tch-reset:hover {
  color: var(--tch-ink);
  border-color: rgba(139, 156, 255, 0.5);
}
.tch-hint {
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--tch-ink-mute);
}
.tch-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 2147482002;
  transform: translate(-50%, 12px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(15, 19, 34, 0.9);
  color: #fff;
  font: 500 12.5px/1 Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}
.tch-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body.tch-home .upload-home {
    padding: 76px 14px 44px;
  }
  body.tch-home .title {
    font-size: clamp(1.9rem, 8vw, 2.5rem) !important;
  }
  body.tch-home .header::after {
    font-size: 10px;
    letter-spacing: 0.3em;
  }
  body.tch-home .upload-form,
  body.tch-home .upload-list-card {
    width: min(100%, 560px) !important;
  }
  body.tch-home .el-upload-dragger {
    min-height: 330px;
    padding: 34px 18px !important;
  }
  body.tch-home .el-upload-dragger .el-icon--upload {
    width: 70px;
    height: 70px;
    margin-bottom: 24px;
  }
  body.tch-home .upload-plus-icon {
    width: 27px;
    height: 27px;
  }
  body.tch-home .el-upload__text {
    font-size: 13.5px !important;
  }
  body.tch-home .el-upload__text::after {
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }
  body.tch-home .upload-list-dashboard {
    padding: 0 14px;
  }
  body.tch-login .login-container {
    padding: 38px 26px 32px !important;
    border-radius: 26px !important;
  }
  body.tch-login .login-title {
    font-size: 1.35rem !important;
  }
  body.tch-admin .main-container {
    padding: 18px 14px 0 !important;
  }
  body.tch-admin .content {
    padding: 12px !important;
    border-radius: 20px;
  }
  body.tch-admin .breadcrumb-container {
    border-radius: 14px;
  }
  .tch-bg-button {
    left: 14px;
    bottom: 14px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .tch-bg-button .tch-bg-label {
    display: none;
  }
  .tch-panel {
    left: 12px;
    right: 12px;
    bottom: 70px;
    width: auto;
    max-height: calc(100vh - 100px);
    border-radius: 22px;
  }
}

@media (max-width: 480px) {
  body.tch-home .header {
    margin-top: 0;
  }
  body.tch-home .upload-list-card {
    height: 64px !important;
  }
  body.tch-home .upload-list-dashboard-title {
    gap: 7px;
    font-size: 12px;
  }
  body.tch-home .quick-toolbar {
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tch-bg-layer.is-active,
  .tch-orb,
  body.tch-home .el-upload-dragger .el-icon--upload::after {
    animation: none !important;
  }
  .tch-bg-layer {
    transition-duration: 0.01ms;
  }
}

/* ==========================================================================
   Anime light layer
   - sakura / firefly particle canvas, sky rays, aura and cursor light
   - iridescent card rim, sheen sweep, spotlight inside the drop zone
   - a few Japanese decorative details for the anime mood
   All of it is decorative: nothing here changes layout or behaviour.
   ========================================================================== */

@property --tch-ring-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --tch-pink: #ff9ec7;
  --tch-pink-deep: #f472b6;
  --tch-lilac: #b8a6ff;
  --tch-sky: #8ee7ff;
  --tch-fx: 1;
  --tch-halo: rgba(255, 158, 199, 0.26);
  --tch-aura-2: rgba(184, 166, 255, 0.16);
}
html.dark {
  --tch-halo: rgba(255, 158, 199, 0.2);
  --tch-aura-2: rgba(140, 130, 255, 0.16);
}

/* light scenes: let the sky show through instead of a flat white wash */
html:not(.dark) {
  --tch-veil:
    radial-gradient(120% 82% at 50% 0%, rgba(255, 255, 255, 0.02) 0%, rgba(248, 250, 255, 0.16) 58%, rgba(246, 249, 255, 0.46) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(248, 250, 255, 0.3) 100%);
  --tch-surface: rgba(255, 251, 254, calc(var(--tch-glass-a) * 0.8));
  --tch-surface-strong: rgba(255, 251, 254, 0.84);
  --tch-dropzone: rgba(255, 255, 255, 0.22);
  --tch-dropzone-hover: rgba(255, 255, 255, 0.34);
  --tch-dash: rgba(214, 96, 156, 0.42);
  --tch-border: rgba(255, 255, 255, 0.86);
}

/* ---------- atmospheric layers ---------- */
.tch-rays,
.tch-aura,
.tch-leak,
.tch-spot,
.tch-petals,
.tch-petals-front,
.tch-vertical {
  pointer-events: none;
}

.tch-rays {
  position: absolute;
  inset: -35% -15% -15%;
  background: repeating-conic-gradient(
    from 0deg at 58% -6%,
    rgba(255, 255, 255, 0.16) 0deg 1deg,
    rgba(255, 255, 255, 0) 1deg 6.4deg
  );
  filter: blur(7px);
  opacity: calc(var(--tch-fx) * 0.45);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(62% 58% at 58% 0%, #000 0%, rgba(0, 0, 0, 0.35) 46%, transparent 74%);
  mask-image: radial-gradient(62% 58% at 58% 0%, #000 0%, rgba(0, 0, 0, 0.35) 46%, transparent 74%);
  animation: tch-rays-breathe 18s ease-in-out infinite;
  will-change: opacity, transform;
}
html:not(.dark) .tch-rays {
  opacity: calc(var(--tch-fx) * 0.5);
  background: repeating-conic-gradient(
    from 0deg at 58% -6%,
    rgba(255, 255, 255, 0.55) 0deg 1.1deg,
    rgba(255, 255, 255, 0) 1.1deg 6.8deg
  );
}

.tch-aura {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 118vmin;
  height: 118vmin;
  margin: -59vmin 0 0 -59vmin;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tch-halo) 0%, var(--tch-aura-2) 36%, transparent 66%);
  filter: blur(22px);
  mix-blend-mode: screen;
  opacity: calc(var(--tch-fx) * 0.85);
  animation: tch-aura-breathe 14s ease-in-out infinite;
}
html:not(.dark) .tch-aura {
  mix-blend-mode: normal;
  opacity: calc(var(--tch-fx) * 0.5);
}

.tch-leak {
  position: absolute;
  right: -14%;
  top: -26%;
  width: 78vmax;
  height: 78vmax;
  border-radius: 50%;
  background: radial-gradient(circle at 68% 34%, rgba(255, 170, 215, 0.24), rgba(255, 190, 230, 0.06) 45%, transparent 62%);
  filter: blur(42px);
  mix-blend-mode: screen;
  opacity: calc(var(--tch-fx) * 0.8);
}
html:not(.dark) .tch-leak {
  opacity: calc(var(--tch-fx) * 0.45);
  mix-blend-mode: normal;
}

.tch-spot {
  position: absolute;
  left: 0;
  top: 0;
  width: 52vmax;
  height: 52vmax;
  margin: -26vmax 0 0 -26vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 242, 0.22) 0%, rgba(170, 190, 255, 0.12) 38%, transparent 66%);
  filter: blur(14px);
  mix-blend-mode: screen;
  opacity: calc(var(--tch-fx) * 0.9);
  transform: translate3d(var(--tch-px, 50vw), var(--tch-py, 40vh), 0);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
html:not(.dark) .tch-spot {
  mix-blend-mode: normal;
  opacity: calc(var(--tch-fx) * 0.4);
}

.tch-petals {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tch-petals-front {
  position: fixed;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  opacity: calc(var(--tch-fx) * 0.95);
}

.tch-vertical {
  position: absolute;
  right: clamp(16px, 3.2vw, 52px);
  top: 15vh;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: "Yu Mincho", "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: clamp(14px, 1.35vw, 20px);
  line-height: 1;
  letter-spacing: 0.55em;
  color: rgba(255, 255, 255, 0.32);
  text-shadow: 0 0 20px rgba(255, 158, 199, 0.6);
  mix-blend-mode: screen;
  opacity: calc(var(--tch-fx) * 0.95);
  transition: opacity 0.7s ease;
}
html:not(.dark) .tch-vertical {
  color: rgba(54, 44, 86, 0.3);
  text-shadow: 0 0 16px rgba(255, 158, 199, 0.55);
  mix-blend-mode: normal;
}

/* tone guards: keep text readable on bright art in dark mode and vice versa */
html.dark[data-tch-tone="light"] .tch-veil {
  background:
    radial-gradient(120% 78% at 50% 0%, rgba(9, 13, 28, 0.12) 0%, rgba(8, 12, 26, 0.5) 58%, rgba(6, 10, 22, 0.82) 100%),
    linear-gradient(180deg, rgba(8, 12, 26, 0.3), rgba(6, 10, 22, 0.62));
}
html:not(.dark)[data-tch-tone="dark"] .tch-veil {
  background:
    radial-gradient(120% 78% at 50% 0%, rgba(255, 255, 255, 0.32) 0%, rgba(246, 248, 255, 0.62) 58%, rgba(244, 247, 255, 0.9) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(244, 247, 255, 0.78));
}

/* ---------- hero ---------- */
body.tch-home .title {
  position: relative;
}
body.tch-home .main-title {
  background-image: linear-gradient(
    102deg,
    #ffe3f0 0%,
    #ffabd6 20%,
    #cbb6ff 46%,
    #a6ecff 72%,
    #ffe3f0 100%
  );
  background-size: 240% 100%;
  animation: tch-title-flow 16s linear infinite;
  filter: drop-shadow(0 0 26px rgba(255, 158, 199, 0.34));
}
html:not(.dark) body.tch-home .main-title {
  background-image: linear-gradient(102deg, #a3236a 0%, #6d3fd4 38%, #7b5bd6 62%, #0b7f96 100%);
  filter: drop-shadow(0 8px 26px rgba(120, 90, 200, 0.28));
}
body.tch-home .title::before,
body.tch-home .title::after {
  content: "✦";
  position: absolute;
  top: 8%;
  font-size: 0.34em;
  line-height: 1;
  color: var(--tch-pink);
  text-shadow: 0 0 16px var(--tch-pink), 0 0 34px rgba(255, 158, 199, 0.6);
  animation: tch-twinkle 4.2s ease-in-out infinite;
  pointer-events: none;
}
body.tch-home .title::before {
  left: -0.85em;
}
body.tch-home .title::after {
  display: block !important;
  right: -0.85em;
  animation-delay: -2.1s;
}
body.tch-home .header::after {
  order: -1;
  content: "✧ 轻盈 · 私密 · 属于你的图片空间 ✧";
  margin: 0 0 2px;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: var(--tch-pink);
  opacity: 0.72;
  text-shadow: 0 0 14px rgba(255, 158, 199, 0.45);
}
html[lang="en"] body.tch-home .header::after {
  content: "✧ A quiet, private home for your images ✧";
  letter-spacing: 0.18em;
  text-indent: 0.18em;
}
html:not(.dark) body.tch-home .header::after {
  color: #b0356f;
  text-shadow: 0 0 12px rgba(255, 158, 199, 0.35);
}

/* ---------- uploader: iridescent rim + sheen ---------- */
body.tch-home .upload-card {
  position: relative;
  isolation: isolate;
  background-image: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 158, 199, 0.05) 100%
  ) !important;
}
body.tch-home .upload-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.4px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--tch-ring-angle),
    rgba(255, 158, 199, 0.95),
    rgba(184, 166, 255, 0.9) 26%,
    rgba(142, 231, 255, 0.85) 50%,
    rgba(255, 228, 168, 0.8) 72%,
    rgba(255, 158, 199, 0.95) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.72;
  pointer-events: none;
  animation: tch-ring-spin 14s linear infinite;
}
html:not(.dark) body.tch-home .upload-card::before {
  opacity: 0.5;
}
body.tch-home .upload-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(
    112deg,
    transparent 36%,
    rgba(255, 255, 255, 0.16) 47%,
    rgba(255, 255, 255, 0.03) 54%,
    transparent 63%
  );
  transform: translateX(-130%);
  animation: tch-sheen 9.5s cubic-bezier(0.4, 0, 0.2, 1) infinite 1.4s;
  mix-blend-mode: screen;
  pointer-events: none;
}
html:not(.dark) body.tch-home .upload-card::after {
  opacity: 0.55;
  mix-blend-mode: normal;
}

body.tch-home .el-upload-dragger {
  position: relative;
  overflow: hidden;
  min-height: clamp(330px, 40vh, 392px);
  background-color: var(--tch-dropzone) !important;
  background-image: radial-gradient(
    340px circle at var(--tch-mx, 50%) var(--tch-my, 50%),
    rgba(255, 196, 228, 0.22),
    rgba(184, 166, 255, 0.1) 45%,
    transparent 72%
  ) !important;
  border-color: rgba(255, 158, 199, 0.42) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -70px 100px rgba(255, 158, 199, 0.05);
}
html:not(.dark) body.tch-home .el-upload-dragger {
  background-image: radial-gradient(
    340px circle at var(--tch-mx, 50%) var(--tch-my, 50%),
    rgba(255, 175, 214, 0.28),
    rgba(184, 166, 255, 0.12) 45%,
    transparent 72%
  ) !important;
  border-color: rgba(222, 104, 165, 0.5) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -70px 100px rgba(255, 158, 199, 0.12);
}
body.tch-home .el-upload-dragger:hover {
  border-color: rgba(255, 158, 199, 0.62) !important;
  box-shadow:
    inset 0 0 70px rgba(255, 158, 199, 0.1),
    0 0 0 1px rgba(255, 158, 199, 0.16);
}
body.tch-home .el-upload-dragger .el-icon--upload {
  width: 92px;
  height: 92px;
  background: linear-gradient(140deg, #ff9ec7 0%, #b8a6ff 52%, #8ee7ff 108%);
  box-shadow:
    0 20px 50px -14px rgba(255, 158, 199, 0.7),
    0 10px 30px -12px rgba(139, 124, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
body.tch-home .el-upload-dragger .el-icon--upload::after {
  border-color: rgba(255, 158, 199, 0.55);
  box-shadow: 0 0 24px rgba(255, 158, 199, 0.35);
}
body.tch-home .el-upload-dragger:hover .el-icon--upload {
  box-shadow:
    0 28px 64px -14px rgba(255, 158, 199, 0.85),
    0 12px 34px -12px rgba(139, 124, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
body.tch-home .el-upload__text em {
  background: linear-gradient(180deg, rgba(255, 158, 199, 0.2), rgba(255, 158, 199, 0.06));
  border-color: rgba(255, 158, 199, 0.32);
  color: var(--tch-ink) !important;
}

/* ---------- stats dock ---------- */
body.tch-home .upload-list-card {
  box-shadow:
    0 22px 50px -30px rgba(10, 12, 30, 0.6),
    0 0 0 1px rgba(255, 158, 199, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
html:not(.dark) body.tch-home .upload-list-card {
  background: rgba(255, 250, 254, 0.62) !important;
  box-shadow:
    0 18px 44px -28px rgba(120, 90, 160, 0.35),
    0 0 0 1px rgba(255, 158, 199, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
body.tch-home .upload-list-dashboard-title .el-icon {
  color: var(--tch-pink);
}

/* ---------- login: soft outer halo ---------- */
body.tch-login .login-container {
  box-shadow:
    0 40px 110px -40px rgba(8, 10, 26, 0.8),
    0 0 70px -30px rgba(255, 158, 199, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}
body.tch-login .submit {
  background: linear-gradient(120deg, #ff9ec7 0%, #b8a6ff 48%, #8ee7ff 108%) !important;
  box-shadow: 0 18px 44px -16px rgba(255, 158, 199, 0.7) !important;
  color: #2a1030 !important;
}
body.tch-login .submit:hover {
  box-shadow: 0 24px 54px -16px rgba(255, 158, 199, 0.85) !important;
}

/* ---------- theme panel: effects control ---------- */
.tch-fx-block {
  margin: 16px 0 4px;
}
.tch-fx-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tch-ink-mute);
  margin-bottom: 8px;
}
.tch-fx-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.tch-fx-option {
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--tch-border);
  background: var(--tch-chip);
  color: var(--tch-ink-soft);
  font: 500 11px/1 Avenir, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tch-fx-option:hover {
  color: var(--tch-ink);
  border-color: rgba(255, 158, 199, 0.4);
}
.tch-fx-option.is-active {
  color: #2a1030;
  border-color: transparent;
  background: linear-gradient(120deg, #ff9ec7, #b8a6ff 62%, #8ee7ff);
  box-shadow: 0 8px 20px -10px rgba(255, 158, 199, 0.8);
}
html.dark .tch-fx-option.is-active {
  color: #1a0f22;
}
.tch-preset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tch-preset {
  aspect-ratio: 16 / 10;
}
.tch-preset span {
  font-size: 10px !important;
  letter-spacing: 0.02em !important;
}

/* ---------- motion ---------- */
@keyframes tch-rays-breathe {
  0%, 100% {
    opacity: calc(var(--tch-fx) * 0.32);
    transform: rotate(-1.2deg) scale(1.02);
  }
  50% {
    opacity: calc(var(--tch-fx) * 0.55);
    transform: rotate(1.2deg) scale(1.06);
  }
}
@keyframes tch-aura-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: calc(var(--tch-fx) * 0.7);
  }
  50% {
    transform: scale(1.08);
    opacity: calc(var(--tch-fx) * 0.95);
  }
}
@keyframes tch-title-flow {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 220% 50%;
  }
}
@keyframes tch-twinkle {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.85) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) rotate(12deg);
  }
}
@keyframes tch-ring-spin {
  to {
    --tch-ring-angle: 360deg;
  }
}
@keyframes tch-sheen {
  0%, 55% {
    transform: translateX(-130%);
  }
  85%, 100% {
    transform: translateX(130%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tch-rays,
  .tch-aura,
  .tch-spot,
  body.tch-home .title::before,
  body.tch-home .title::after,
  body.tch-home .upload-card::before,
  body.tch-home .upload-card::after,
  body.tch-home .main-title {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .tch-vertical {
    display: none;
  }
  .tch-rays {
    opacity: calc(var(--tch-fx) * 0.3);
  }
  .tch-petals-front {
    display: none;
  }
}

/* ---------- admin login: same glass language as the front door ---------- */
body.tch-admin-login .login-container {
  position: relative;
  width: min(460px, 92vw) !important;
  padding: 46px 42px 40px !important;
  border-radius: 32px !important;
  background: var(--tch-surface-strong) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow:
    0 40px 110px -40px rgba(8, 10, 26, 0.8),
    0 0 70px -30px rgba(255, 158, 199, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  overflow: hidden;
}
body.tch-admin-login .login-container::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  top: -180px;
  right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 158, 199, 0.4), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}
body.tch-admin-login .login-title {
  color: var(--tch-ink) !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: none !important;
}
body.tch-admin-login .input-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--tch-ink-mute) !important;
}
body.tch-admin-login .password-input .el-input__wrapper {
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--tch-chip) !important;
  border: 1px solid var(--tch-border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.tch-admin-login .password-input .el-input__wrapper.is-focus {
  border-color: rgba(255, 158, 199, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(255, 158, 199, 0.18) !important;
}
body.tch-admin-login .password-input .el-input__inner {
  color: var(--tch-ink) !important;
}
body.tch-admin-login .submit {
  width: 100%;
  height: 50px;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(120deg, #ff9ec7 0%, #b8a6ff 48%, #8ee7ff 108%) !important;
  color: #2a1030 !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  box-shadow: 0 18px 44px -16px rgba(255, 158, 199, 0.7) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
body.tch-admin-login .submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 24px 54px -16px rgba(255, 158, 199, 0.85) !important;
}

/* pastel tint so the light card is not a flat white slab */
html:not(.dark) body.tch-home .upload-card {
  background-image: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 214, 236, 0.26) 52%,
    rgba(214, 226, 255, 0.34) 100%
  ) !important;
}

/* small screens: let the hero flow from the top so the title never hides behind the card */
@media (max-width: 640px) {
  body.tch-home .upload-home {
    justify-content: flex-start;
    padding-top: 88px;
    padding-bottom: 36px;
  }
  body.tch-home .header {
    margin-bottom: 10px;
  }
  body.tch-home .title {
    font-size: clamp(1.8rem, 9vw, 2.4rem) !important;
  }
  body.tch-home .upload-card-wrapper {
    margin-top: 4px;
  }
  body.tch-home .el-upload-dragger {
    min-height: 300px;
  }
  html:not(.dark) .tch-vertical {
    color: rgba(54, 44, 86, 0.42);
  }
}

/* ==========================================================================
   Upload list: compact dock when empty, real list once files exist
   - 空状态：一条 74px 的统计条（原来的设计）
   - 有文件：上传区收起、列表展开，缩略图按原尺寸显示
   之前两条规则把列表写死成 74px，导致上传后看不到图。
   ========================================================================== */

/* 空状态才用矮条 */
body.tch-home .upload-list-card:not(.upload-list-busy) .upload-list-dashboard {
  padding: 0 22px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 有文件：卡片长高，列表可滚动 */
body.tch-home .upload-list-card.upload-list-busy {
  width: min(880px, 92vw) !important;
  height: var(--upload-list-busy-height, 35vh) !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto;
  margin-top: 14px !important;
  border-radius: 22px !important;
  align-items: stretch;
  justify-content: flex-start;
  background: var(--tch-surface) !important;
  border: 1px solid var(--tch-border) !important;
}
body.tch-home .upload-list-card.upload-list-busy .el-card__body,
body.tch-home .upload-list-card.upload-list-busy .el-scrollbar {
  width: 100%;
  height: 100%;
}
body.tch-home .upload-list-card.upload-list-busy .upload-list-dashboard {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 20px 8px;
  height: auto;
  flex: 0 0 auto;
  background: linear-gradient(180deg, var(--tch-surface) 62%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.tch-home .upload-list-card.upload-list-busy .upload-list-dashboard-title {
  font-size: 12.5px;
}

/* 有文件时上传区收起，给列表让出高度 */
body.tch-home .upload-card-busy .el-upload-dragger {
  height: var(--upload-card-busy-height, 17vh) !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 14px 24px !important;
  gap: 0;
}
body.tch-home .upload-card-busy .el-upload-dragger .el-icon--upload {
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
}
body.tch-home .upload-card-busy .el-upload-dragger .el-icon--upload::after {
  inset: -6px;
}
body.tch-home .upload-card-busy .el-upload-dragger .upload-plus-icon {
  width: 22px;
  height: 22px;
}
body.tch-home .upload-card-busy .el-upload__text {
  font-size: 13px !important;
}
body.tch-home .upload-card-busy .el-upload__text::after {
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* 缩略图给足尺寸，别让图片缩成一粒 */
body.tch-home .upload-list-card.upload-list-busy .upload-list-item-preview {
  flex: 0 0 clamp(72px, 7vw, 104px);
}
body.tch-home .upload-list-item {
  background: var(--tch-chip) !important;
  border-color: var(--tch-border) !important;
}
html:not(.dark) body.tch-home .upload-list-item {
  background: rgba(255, 255, 255, 0.62) !important;
}

@media (max-width: 640px) {
  body.tch-home .upload-list-card.upload-list-busy {
    height: var(--upload-list-busy-height, 35vh) !important;
  }
  body.tch-home .upload-card-busy .el-upload-dragger {
    height: var(--upload-card-busy-height, 17vh) !important;
    min-height: 0 !important;
  }
}
