/* ==========================================================================
   V2Ray Mac客户端 · base.css
   1 设计令牌 / 2 reset / 3 排版 / 4 版心与节奏 / 5 按钮 / 6 头部 / 7 页脚
   8 通用卡片 / 9 淡入动效 / 10 响应式与窄屏防溢出
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root{
  /* 画布与面板 */
  --bg:#FFFFFF;
  --bg-panel:#F3FBF9;
  --bg-panel-2:#E2F7F1;
  --border:#E2EAE8;
  --hair:rgba(226,234,232,.9);

  /* 强调色 */
  --accent:#E93A1C;
  --accent-dark:#B3270F;
  --on-accent:#FFFFFF;

  /* 文字 */
  --text:#0D2B29;
  --text-muted:#5B6E6C;

  /* 语义色 */
  --success:#0F9D74;
  --warn:#D99000;
  --error:#B3261E;

  /* 薄荷青 */
  --mint:#9CEEDF;
  --mint-soft:#DCF7F1;
  --mint-line:#C2F1E7;

  /* 玻璃与暖带 */
  --glass:rgba(255,255,255,.70);
  --glass-line:rgba(255,255,255,.92);
  --warm:rgba(233,58,28,.26);
  --warm-mid:rgba(233,58,28,.09);
  --warm-none:rgba(233,58,28,0);
  --dot-ring:rgba(15,157,116,.16);

  /* 代码着色 */
  --code-bg:#F3FBF9;
  --code-ink:#0D2B29;
  --code-str:#0B7A5A;
  --code-num:#B3270F;
  --code-com:#5B6E6C;

  /* 渐变 */
  --grad-h1:linear-gradient(94deg,#0F9D74 0%,#14B08F 42%,#0D2B29 100%);
  --grad-stage:linear-gradient(135deg,#9CEEDF 0%,#C2F1E7 46%,#DCF7F1 100%);
  --grad-panel:linear-gradient(160deg,#F3FBF9 0%,#E2F7F1 100%);
  --grad-warm-edge:linear-gradient(to top,var(--warm) 0%,var(--warm-mid) 9%,var(--warm-none) 27%);
  --grad-rule:linear-gradient(to right,var(--border) 0 8px,transparent 8px 14px);

  /* 投影 */
  --sh-stage:0 48px 96px -38px rgba(13,43,41,.28),0 16px 36px -24px rgba(13,43,41,.16);
  --sh-sheet:0 36px 68px -30px rgba(13,43,41,.32),0 12px 24px -16px rgba(13,43,41,.16);
  --sh-sheet-back:0 26px 52px -28px rgba(13,43,41,.22);
  --sh-float:0 20px 36px -18px rgba(13,43,41,.22),0 4px 10px -6px rgba(13,43,41,.12);
  --sh-cta:0 16px 30px -14px rgba(233,58,28,.46);
  --sh-cta-hi:0 22px 42px -16px rgba(233,58,28,.54);
  --sh-ghost:0 10px 22px -14px rgba(13,43,41,.20);
  --sh-card:0 24px 48px -30px rgba(13,43,41,.24);

  /* 圆角 */
  --r-stage:32px;
  --r-panel:28px;
  --r-sheet:24px;
  --r-card:20px;
  --r-float:18px;
  --r-chip:12px;
  --r-pill:999px;

  /* 字体 */
  --font-display:Inter,'Noto Sans SC','Noto Sans JP','Noto Sans KR',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-body:Inter,'Noto Sans SC','Noto Sans JP','Noto Sans KR',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  /* 版心与节奏 */
  --wrap:1280px;
  --gutter:32px;
  --header-h:62px;
  --section-y:88px;
  --ease:cubic-bezier(.4,0,.2,1);
}

/* ---------- 2. reset ---------- */
*,*::before,*::after{box-sizing:border-box;}
html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
  overflow-x:clip;
}
html.nav-open{overflow:hidden;}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:clip;
}
img{display:block;max-width:100%;height:auto;}
svg{display:block;}
a{color:inherit;text-decoration:none;}
ul,ol{margin:0;padding:0;list-style:none;}
p,dl,dd,dt,figure,blockquote{margin:0;}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;}
a:focus-visible,button:focus-visible,summary:focus-visible,[tabindex]:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
  border-radius:6px;
}
.sr-only{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

/* ---------- 3. 排版 ---------- */
h1,h2,h3,h4{
  margin:0;
  font-family:var(--font-display);
  font-weight:800;
  line-height:1.16;
  letter-spacing:-.028em;
  color:var(--text);
  text-wrap:balance;
}
h1{font-size:clamp(34px,3.35vw,48px);line-height:1.1;letter-spacing:-.032em;}
h2{font-size:clamp(23px,2.1vw,32px);}
h3{font-size:clamp(18px,1.4vw,21px);letter-spacing:-.02em;}
h4{font-size:16.5px;letter-spacing:-.012em;}
strong,b{font-weight:700;color:var(--text);}
.nb{white-space:nowrap;}

.lede{
  font-size:17px;
  line-height:1.72;
  color:var(--text-muted);
  letter-spacing:-.004em;
}
.lede strong{color:var(--text);font-weight:600;}

.eyebrow{
  display:inline-block;
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.16em;
  color:var(--text-muted);
  text-transform:uppercase;
}

code{
  font-family:var(--font-mono);
  overflow-wrap:anywhere;
  word-break:break-word;
}
:not(pre) > code{
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:8px;
  padding:1px 6px;
  font-size:.88em;
  color:var(--code-ink);
}
pre{
  max-width:100%;
  margin:0;
  padding:18px 20px;
  background:var(--code-bg);
  border:1px solid var(--border);
 -radius:var(--r-sheet);
  border-radius:var(--r-sheet);
  color:var(--code-ink);
  font-family:var(--font-mono);
  font-size:13px;
  line-height:1.75;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
pre code{
  background:none;
  border:0;
  padding:0;
  font-size:inherit;
  color:inherit;
  white-space:pre;
  overflow-wrap:normal;
}
.tok-key{color:var(--code-ink);font-weight:700;}
.tok-str{color:var(--code-str);}
.tok-num{color:var(--code-num);}
.tok-com{color:var(--code-com);}

.link-more{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:14.5px;
  font-weight:600;
  color:var(--accent-dark);
}
.link-more svg{width:15px;height:15px;flex-shrink:0;}
.link-more:hover{color:var(--text);}

/* ---------- 4. 版心与节奏 ---------- */
.wrap{
  width:100%;
  max-width:calc(var(--wrap) + var(--gutter) * 2);
  margin-inline:auto;
  padding-inline:var(--gutter);
}
.section{padding-top:var(--section-y);padding-bottom:var(--section-y);}
.section--tight{padding-top:calc(var(--section-y) * .6);padding-bottom:calc(var(--section-y) * .6);}
.section-head{max-width:760px;}
.section-head .eyebrow{margin-bottom:12px;}
.section-head p{margin-top:14px;font-size:16.5px;color:var(--text-muted);}
.section-head--center{margin-inline:auto;text-align:center;}

.grid{display:grid;gap:24px;min-width:0;}
.grid > *{min-width:0;}
.grid--2{grid-template-columns:repeat(2,minmax(0,1fr));}
.grid--3{grid-template-columns:repeat(3,minmax(0,1fr));}
.grid--4{grid-template-columns:repeat(4,minmax(0,1fr));}

/* 装饰容器：绝对定位光晕/水印一律关在这一层里，防止伸出视口 */
.deco-host{position:relative;overflow-x:clip;}

/* 微倾斜只允许作用在短内容上；长内容容器在窄屏一律回正 */
.tilt{transform:rotate(var(--tilt,0deg));}

/* ---------- 5. 按钮 ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  height:50px;
  padding-inline:26px;
  border-radius:var(--r-pill);
  font-family:var(--font-display);
  font-size:15.5px;
  font-weight:600;
  letter-spacing:-.008em;
  white-space:nowrap;
  transition:transform .18s var(--ease),box-shadow .18s var(--ease),
             background-color .18s var(--ease),border-color .18s var(--ease),color .18s var(--ease);
}
.btn svg{width:17px;height:17px;flex-shrink:0;}
.btn--primary{
  background:var(--accent);
  color:var(--on-accent);
  box-shadow:var(--sh-cta);
}
.btn--primary:hover{background:var(--accent-dark);box-shadow:var(--sh-cta-hi);transform:translateY(-1px);}
.btn--ghost{
  background:var(--bg);
  color:var(--text);
  border:1px solid var(--border);
  box-shadow:var(--sh-ghost);
}
.btn--ghost:hover{border-color:var(--text);transform:translateY(-1px);}
.btn--quiet{
  background:var(--bg-panel);
  color:var(--text);
  border:1px solid var(--border);
}
.btn--quiet:hover{border-color:var(--text);background:var(--bg);}
.btn--sm{height:40px;padding-inline:18px;font-size:14px;border-radius:var(--r-pill);}
.btn[aria-disabled="true"],.btn:disabled{
  background:var(--bg-panel);
  color:var(--text-muted);
  border:1px solid var(--border);
  box-shadow:none;
  cursor:not-allowed;
  transform:none;
}

/* ---------- 6. 头部 ---------- */
.site-header{
  position:relative;
  z-index:60;
  background:var(--bg);
}
.header-inner{
  position:relative;
  z-index:2;
  max-width:min(100%,calc(var(--wrap) + var(--gutter) * 2));
  margin-inline:auto;
  padding-inline:var(--gutter);
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand{display:inline-flex;align-items:center;gap:10px;flex:0 1 auto;min-width:0;}
.brand-mark{width:34px;height:34px;flex-shrink:0;}
.brand-name{
  font-family:var(--font-display);
  font-weight:800;
  font-size:17px;
  letter-spacing:-.02<|place_holder_mm_span_0442|>;
  color:var(--text);
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.nav{display:flex;align-items:center;min-width:0;}
.nav-list{
  display:flex;
  align-items:center;
  gap:2px;
  list-style:none;
  margin:0;
  padding:0;
}
.nav-list a{
  position:relative;
  display:inline-flex;
  align-items:center;
  height:var(--header-h);
  padding-inline:15px;
  font-size:14.5px;
  font-weight:500;
  color:var(--text-muted);
  letter-spacing:-.005em;
  white-space:nowrap;
  transition:color .18s var(--ease);
}
.nav-list a::after{
  content:"";
  position:absolute;
  left:15px;
  right:15px;
  bottom:14px;
  height:2px;
  border-radius:2px;
  background:var(--accent);
  transform:scaleX(0);
  transform-origin:50% 50%;
  transition:transform .24s var(--ease);
}
.nav-list a:hover{color:var(--text);}
.nav-list a:hover::after{transform:scaleX(.5);}
.nav-list a[data-active]{color:var(--text);font-weight:600;}
.nav-list a[data-active]::after{transform:scaleX(1);}

.header-tools{display:flex;align-items:center;gap:10px;flex:0 0 auto;}
.lang-wrap{position:relative;}
.lang{
  display:inline-flex;
  align-items:center;
  gap:7px;
  height:34px;
  padding-inline:13px;
  border:1px solid var(--border);
  border-radius:var(--r-pill);
  background:var(--bg-panel);
  color:var(--text);
  font-size:13px;
  font-weight:500;
  white-space:nowrap;
  transition:border-color .18s var(--ease),background-color .18s var(--ease);
}
.lang:hover{border-color:var(--text);background:var(--bg);}
.lang .ico{width:14px;height:14px;flex-shrink:0;color:var(--text-muted);}
.lang .chev{width:12px;height:12px;flex-shrink:0;color:var(--text-muted);}
.lang__short{display:none;}
.lang-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:70;
  min-width:190px;
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:2px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--r-float);
  box-shadow:var(--sh-float);
}
.lang-menu[hidden]{display:none;}
.lang-menu a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:10px 12px;
  border-radius:var(--r-chip);
  font-size:14px;
  font-weight:500;
  color:var(--text);
}
.lang-menu a:hover{background:var(--bg-panel);}
.lang-menu a[aria-current="true"]{color:var(--accent-dark);font-weight:600;}

.burger{
  display:none;
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--bg-panel);
  color:var(--text);
}
.burger:hover{border-color:var(--text);background:var(--bg);}
.burger-bars{
  position:relative;
  display:block;
  width:18px;
  height:2px;
  border-radius:2px;
  background:var(--text);
}
.burger-bars::before,.burger-bars::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  border-radius:2px;
  background:var(--text);
  transition:transform .2s var(--ease);
}
.burger-bars::before{top:-6px;}
.burger-bars::after{top:6px;}
html.nav-open .burger-bars{background:transparent;}
html.nav-open .burger-bars::before{transform:translateY(6px) rotate(45deg);}
html.nav-open .burger-bars::after{transform:translateY(-6px) rotate(-45deg);}

.drawer{
  position:fixed;
  inset:0;
  z-index:55;
  padding:calc(var(--header-h) + 18px) var(--gutter) 40px;
  background:var(--bg);
  color:var(--text);
  overflow-y:auto;
  overscroll-behavior:contain;
  max-height:100dvh;
  -webkit-overflow-scrolling:touch;
}
.drawer[hidden]{display:none;}
.drawer-list{display:flex;flex-direction:column;gap:0;}
.drawer-list a{
  display:flex;
  align-items:center;
  min-height:48px;
  padding:13px 4px;
  font-size:16px;
  font-weight:600;
  color:var(--text);
  border-bottom:1px solid var(--border);
}
.drawer-list a[data-active]{color:var(--accent-dark);}
.drawer-title{
  margin-top:28px;
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.14em;
  color:var(--text-muted);
}

/* ---------- 7. 页脚 ---------- */
.site-footer{
  margin-top:96px;
  background:var(--bg-panel);
  border-top:1px solid var(--border);
  color:var(--text);
}
.footer-inner{
  max-width:min(100%,calc(var(--wrap) + var(--gutter) * 2));
  margin-inline:auto;
  padding:56px var(--gutter) 32px;
}
.footer-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.9fr);
  gap:44px;
}
.footer-brand{display:flex;align-items:center;gap:10px;flex:0 0 auto;}
.footer-brand__name{
  font-family:var(--font-display);
  font-weight:800;
  font-size:17px;
  letter-spacing:-.02em;
  color:var(--text);
}
.footer-brand__desc{
  margin-top:14px;
  max-width:38ch;
  font-size:14.5px;
  color:var(--text-muted);
}
.footer-cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:28px;
  min-width:0;
}
.footer-col{min-width:0;}
.footer-col__title{
  font-family:var(--font-mono);
  font-size:11.5px;
  font-weight:400;
  letter-spacing:.14em;
  color:var(--text-muted);
}
.footer-col ul{margin-top:14px;display:flex;flex-direction:column;gap:9px;}
.footer-col a{font-size:14.5px;color:var(--text);overflow-wrap:anywhere;}
.footer-col a:hover{color:var(--accent-dark);}
.footer-bottom Holidayed{
  margin-top:44px;
  padding-top:20px;
  border-top:1px solid var(--border);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px 24px;
  font-size:13.5px;
  color:var(--text-muted);
}
.footer-legal{display:flex;flex-wrap:wrap;gap:18px;}
.footer-legal a{color:var(--text-muted);}
.footer-legal a:hover{color:var(--text);}

/* ---------- 8. 通用卡片 ---------- */
.card{
  min-width:0;
  padding:24px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--r-card);
  box-shadow:var(--sh-ghost);
  color:var(--text);
}
.card--panel{
  background:var(--grad-panel);
  border-radius:var(--r-panel);
  box-shadow:var(--sh-stage);
}
.card--flat{background:var(--bg-panel);box-shadow:none;}
.card__title{
  font-family:var(--font-display);
  font-size:18px;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--text);
}
.card__desc{margin-top:8px;font-size:14.8px;color:var(--text-muted);}

/* ---------- 9. 淡入动效 ---------- */
.reveal{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .6s var(--ease),transform .6s var(--ease);
}
.reveal.shown{opacity:1;transform:none;}

/* ---------- 10. 响应式与窄屏防溢出 ---------- */
@media (max-width:1180px){
  .nav-list a{padding-inline:11px;font-size:14px;}
  .nav-list a::after{left:11px;right:11px;}
}

@media (max-width:1080px){
  .nav{display:none;}
  .burger{display:inline-flex;}
  .header-tools{margin-left:auto;}
}

@media (min-width:1081px){
  .drawer{display:none;}
}

@media (max-width:1024px){
  .grid--3,.grid--4{grid-template-columns:repeat(2,minmax(0,1fr));}
  .footer-top{grid-template-columns:minmax(0,1fr);gap:32px;}
}

@media (max-width:768px){
  :root{
    --gutter:20px;
    --section-y:64px;
    --header-h:60px;
  }
  h1{font-size:clamp(24px,5.6vw,30px);letter-spacing:-.028em;}
  h2{font-size:clamp(21px,4.4vw,26px);}
  .lede{font-size:15.5px;}
  .grid--2,.grid--3,.grid--4{grid-template-columns:minmax(0,1fr);}
  .footer-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;}
  .site-footer{margin-top:64px;}
}

@media (max-width:640px){
  .tilt{transform:none;}
  :not(pre) > code{font-size:.85em;}
}

@media (max-width:560px){
  :root{--gutter:16px;}
  .header-inner{gap:12px;}
  .brand-name{font-size:14px;}
  .lang__full{display:none;}
  .lang__short{display:inline;}
  .burger{width:44px;height:44px;}
  .btn{height:46px;padding-inline:20px;font-size:14.5px;}
  .footer-cols{grid-template-columns:minmax(0,1fr);}
  .footer-bottom{justify-content:flex-start;}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{
    transition:none !important;
    animation:none !important;
  }
  .reveal{opacity:1;transform:none;}
}