
/* =========================================================
   ZeroDistance 盘 · 毛玻璃主题 v3
   ========================================================= */
:root{
  --zd-accent:#2dd4bf;
  --zd-accent-deep:#0d9488;
  --zd-glass:rgba(255,255,255,.055);
  --zd-glass-strong:rgba(255,255,255,.09);
  --zd-line:rgba(255,255,255,.10);
  --zd-blur:blur(22px) saturate(160%);
  --zd-radius:16px;

  --background:transparent;
  --surfacePrimary:rgba(255,255,255,.055);
  --surfaceSecondary:rgba(255,255,255,.085);
  --divider:rgba(255,255,255,.08);
  --borderPrimary:rgba(255,255,255,.10);
  --borderSecondary:rgba(255,255,255,.16);
  --textPrimary:rgba(232,238,242,.72);
  --textSecondary:rgba(240,246,250,.95);
  --hover:rgba(255,255,255,.07);
  --item-selected:rgba(45,212,191,.20);
  --action:#e8eef2;
  --dividerPrimary:rgba(255,255,255,.35);
  --dividerSecondary:rgba(255,255,255,.7);
}

body,#app,input,button,textarea,select,.action,.item{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB",
              "Microsoft YaHei","Noto Sans SC",system-ui,sans-serif !important;
  -webkit-font-smoothing:antialiased;
  letter-spacing:.01em;
}

/* ---------- 背景：极光渐变 ---------- */
html{
  background:
    radial-gradient(1100px 720px at 8% -8%,  rgba(45,212,191,.20), transparent 62%),
    radial-gradient(900px 640px at 96% 6%,   rgba(56,132,255,.16), transparent 60%),
    radial-gradient(900px 700px at 60% 108%, rgba(250,190,120,.10), transparent 62%),
    linear-gradient(160deg,#0b1116 0%,#0d1419 45%,#0a0f13 100%);
  background-attachment:fixed;
  min-height:100%;
}
body{background:transparent !important;color:var(--textSecondary);}

/* ---------- 玻璃面板 ---------- */
header,.breadcrumbs,nav,.card,.dialog,.share__container{
  background:var(--zd-glass) !important;
  backdrop-filter:var(--zd-blur);
  -webkit-backdrop-filter:var(--zd-blur);
  border:1px solid var(--zd-line) !important;
  box-shadow:0 18px 50px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06);
}
header{
  position:sticky !important; top:0 !important; z-index:900;
  border-radius:0 0 var(--zd-radius) var(--zd-radius) !important;
  border-width:0 0 1px 0 !important;
}
header img{height:2.1em;filter:drop-shadow(0 4px 14px rgba(45,212,191,.35));}

nav{
  top:4.3em !important;
  border-radius:var(--zd-radius) !important;
  margin:0 .5em .8em .5em;
  padding:.5em .35em;
  height:calc(100vh - 5.6em) !important;
  border-width:1px !important;
}
.breadcrumbs{
  border-radius:var(--zd-radius) !important;
  margin:.7em .9em 0 .9em;
  border-width:1px !important;
}

/* ---------- 按钮 ---------- */
.action,.button,button{
  border-radius:11px !important;
  border:1px solid transparent;
  transition:background .18s ease,transform .12s ease;
}
.action:hover,.button:hover,button:hover{
  background:var(--zd-glass-strong) !important;
  border-color:var(--zd-line);
}
.action:active,.button:active,button:active{transform:scale(.97);}

/* ---------- 列表 ---------- */
.item{
  border-top:1px solid rgba(255,255,255,.055) !important;
  transition:background .16s ease;
}
.item:hover{background:var(--zd-glass-strong) !important;}
.item.selected{background:var(--item-selected) !important;}
#listing,.listing{background:transparent !important;}

/* ---------- 输入框 ---------- */
input,textarea,select{
  background:rgba(255,255,255,.05) !important;
  border:1px solid var(--zd-line) !important;
  border-radius:12px !important;
  color:#eef4f7 !important;
  padding:.62em .8em !important;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
input:focus,textarea:focus,select:focus{
  outline:none !important;
  border-color:rgba(45,212,191,.55) !important;
  box-shadow:0 0 0 3px rgba(45,212,191,.14) !important;
  background:rgba(255,255,255,.07) !important;
}
input::placeholder{color:rgba(232,238,242,.38) !important;}

/* ---------- 登录卡片 ---------- */
#login{align-items:center;}
#login .card,.card{border-radius:22px !important;padding:1.4em !important;}
#login .card{
  max-width:380px;width:100%;
  box-shadow:0 30px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.09);
}

/* ---------- 进度条 ---------- */
progress{height:6px;border-radius:99px;overflow:hidden;}
progress::-webkit-progress-bar{background:rgba(255,255,255,.08);border-radius:99px;}
progress::-webkit-progress-value{
  background:linear-gradient(90deg,var(--zd-accent-deep),var(--zd-accent));
  border-radius:99px;
}

/* =========================================================
   品牌标题：嵌在顶栏 logo 右边
   ========================================================= */
#zd-title{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-right:auto;
  padding:0 6px 0 2px;
  min-width:0;
  overflow:hidden;
  user-select:none;
}
#zd-title b{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size:16px;
  font-weight:600;
  letter-spacing:.08em;
  color:rgba(244,249,252,.95);
  white-space:nowrap;
  text-shadow:0 2px 18px rgba(45,212,191,.30);
}
#zd-title i{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",system-ui,sans-serif;
  font-style:normal;
  font-size:11px;
  letter-spacing:.20em;
  color:rgba(232,238,242,.42);
  white-space:nowrap;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar{width:9px;height:9px;}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.13);border-radius:99px;}
::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.22);}
::-webkit-scrollbar-track{background:transparent;}

/* ---------- 登录页品牌 ---------- */
#login form img{
  height:54px;width:54px;margin-bottom:16px;
  filter:drop-shadow(0 10px 30px rgba(45,212,191,.45));
}
#login form h1{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB",
              "Microsoft YaHei","Noto Sans SC","Noto Sans CJK SC","Source Han Sans SC",sans-serif !important;
  font-size:25px !important;
  font-weight:600 !important;
  letter-spacing:.06em;
  line-height:1.45;
  white-space:nowrap;
  margin:.1em 0 1.1em !important;
  color:rgba(246,250,253,.97) !important;
  text-shadow:0 4px 26px rgba(45,212,191,.30);
}
#login form{width:100%;max-width:360px;}

/* 顶栏品牌也用 CJK 优先字体 */
#zd-title b,#zd-title i{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB",
              "Microsoft YaHei","Noto Sans SC","Noto Sans CJK SC",sans-serif !important;
}

/* =========================================================
   平板 / 窄屏适配
   ========================================================= */
nav{height:calc(100dvh - 5.6em) !important;}
header{overflow:hidden;}

#zd-title b{max-width:38vw;overflow:hidden;text-overflow:ellipsis;}
#zd-title i{flex-shrink:1;overflow:hidden;text-overflow:ellipsis;}

@media (max-width:1100px){
  #zd-title i{display:none;}                 /* 窄屏只留品牌名 */
  #zd-title b{max-width:50vw;}
}
@media (max-width:860px){
  #zd-title{max-width:44vw;}
  #zd-title b{font-size:15px;letter-spacing:.04em;}
}
@media (max-width:640px){
  #zd-title b{font-size:14px;max-width:40vw;}
}

/* 设置页 / 卡片：防止撑破 */
.card,.card *{max-width:100%;}
.card{overflow-wrap:break-word;}

/* 标签页（个人设置/分享管理…）在小屏可横向滑动 */
@media (max-width:900px){
  .settings nav, .tabs{overflow-x:auto;-webkit-overflow-scrolling:touch;}
}

/* =========================================================
   设置页标签栏：小屏可滑动 + 玻璃质感
   ========================================================= */
main div.wrapper:has(> ul){
  background:var(--zd-glass) !important;
  backdrop-filter:var(--zd-blur);
  -webkit-backdrop-filter:var(--zd-blur);
  border:1px solid var(--zd-line) !important;
  border-top:none !important;
  border-radius:0 0 var(--zd-radius) var(--zd-radius);
  margin:0 .7em;
  overflow:hidden;
}
main div.wrapper:has(> ul) > ul{
  display:flex;
  align-items:stretch;
  gap:2px;
  margin:0;
  padding:0 .3em;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  white-space:nowrap;
}
main div.wrapper:has(> ul) > ul::-webkit-scrollbar{height:0;display:none;}
main div.wrapper:has(> ul) > ul > li{
  flex:0 0 auto;
  white-space:nowrap;
}
main div.wrapper:has(> ul) > ul > li > a{
  white-space:nowrap;
  border-radius:10px 10px 0 0;
  transition:background .16s ease;
}
main div.wrapper:has(> ul) > ul > li > a:hover{
  background:rgba(255,255,255,.06);
}

/* 小屏下标签文字略小 */
@media (max-width:640px){
  main div.wrapper:has(> ul) > ul > li > a{font-size:.92em;padding-left:.5em;padding-right:.5em;}
}

/* 设置卡片与区块标题的呼吸感 */
main .card .card-title,main .card h2{letter-spacing:.02em;}

/* =========================================================
   头像式图标
   ========================================================= */
header img{
  height:2.25em !important;
  width:2.25em !important;
  border-radius:50% !important;
  object-fit:cover;
  filter:none !important;
  box-shadow:0 6px 20px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.10);
}
#login form img{
  height:76px !important;
  width:76px !important;
  border-radius:50% !important;
  object-fit:cover;
  filter:none !important;
  box-shadow:0 14px 44px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.12);
  margin-bottom:18px;
}

/* =========================================================
   顶栏不再裁切：让搜索框可收缩，右侧按钮始终完整
   ========================================================= */
header{
  overflow:visible !important;
  flex-wrap:nowrap;
}
header img{flex:0 0 auto;}

#zd-title{
  flex:0 1 auto !important;
  min-width:0;
  max-width:40%;
}
#zd-title b{min-width:0;overflow:hidden;text-overflow:ellipsis;}
#zd-title i{min-width:0;overflow:hidden;text-overflow:ellipsis;}

/* 搜索框从固定 400px 改为可收缩 */
#search{
  flex:0 1 400px !important;
  min-width:96px !important;
  max-width:400px;
}
#search #input{min-width:0;width:100%;}
#search #input input{min-width:0;width:100%;}

/* 右侧动作按钮永不压缩 */
#dropdown{flex:0 0 auto;}
header > .action, header > button, header .action{flex:0 0 auto;}

/* 空间紧张时优先隐藏副标题 */
@media (max-width:1250px){
  #zd-title i{display:none !important;}
  #zd-title{max-width:26%;}
}

/* ---------- 顶栏空间分配微调 ---------- */
@media (max-width:1250px){
  #zd-title i{display:none !important;}
  #zd-title{max-width:44% !important;}
  #zd-title b{font-size:15px;letter-spacing:.03em;}
  #search{min-width:88px !important;}
}
@media (max-width:980px){
  #zd-title{max-width:42% !important;}
  #zd-title b{font-size:14px;letter-spacing:.02em;}
  #search{min-width:72px !important;}
}
@media (max-width:820px){
  #zd-title{max-width:46% !important;}
  #zd-title b{font-size:13.5px;}
}

/* ---------- 缩小搜索框占位，把空间让给标题 ---------- */
#zd-title b{flex:0 0 auto;}
#zd-title i{flex:0 1 auto;}

@media (max-width:1250px){
  #search{flex:0 1 260px !important;max-width:260px !important;}
}
@media (max-width:1050px){
  #search{flex:0 1 190px !important;max-width:190px !important;}
}
@media (max-width:900px){
  #search{flex:0 1 140px !important;max-width:140px !important;}
}
