/*
 * RenpyThief 官网公共样式：颜色变量、基础排版、导航、按钮、页脚、视频背景。
 * 各页面自己的样式写在页面内联 <style> 里。
 * 不依赖远程的 output.css（那是编好的 Tailwind，新类不生效）。
 */

:root {
    color-scheme: dark;
    --bg: #07080a;
    --surface: #0d0e11;
    --surface-2: #15161a;
    --key-top: #17181c;
    --key-bot: #0e0f12;
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .12);
    --fg: #f4f4f6;
    --fg-2: rgba(244, 244, 246, .66);
    --fg-3: rgba(244, 244, 246, .52);
    --accent: #a78bff;
    --accent-rgb: 143, 92, 255;
    --btn: #ededef;
    --btn-fg: #0b0b0d;
    --gutter-l: max(16px, env(safe-area-inset-left, 0px));
    --gutter-r: max(16px, env(safe-area-inset-right, 0px));
    --font: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
    --grain: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 16px/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--mono); }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 96px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container {
    width: 100%;
    max-width: 1152px;
    margin: 0 auto;
    padding-left: var(--gutter-l);
    padding-right: var(--gutter-r);
}
.container-narrow { max-width: 832px; }

/* ---------- 文字 ---------- */
.two-tone {
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.two-tone span { display: block; }
.two-tone .dim { color: var(--fg-3); }
.sec { padding-block: 128px; background: var(--bg); }
.sec-text { max-width: 36em; margin-top: 16px; color: var(--fg-2); }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .06em; color: var(--accent); }
.page-title {
    margin-top: 24px;
    font-size: clamp(36px, 5.6vw, 64px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
    text-wrap: balance;
    text-shadow: 0 2px 30px rgba(0, 0, 0, .5);
}
.page-lead {
    max-width: 36em;
    margin-top: 20px;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
    color: rgba(255, 255, 255, .8);
    text-shadow: 0 1px 16px rgba(0, 0, 0, .6);
}
.mono-note { font: 12px/1.6 var(--mono); color: var(--fg-3); }

/* 标题和导语：中文默认任意两字之间都能断行，手机上会把「我们」「好用」拆到两行。
   改成优先在标点、空格处换行，一行实在放不下才拆字 */
.two-tone, .page-title, .page-lead {
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.sec-text, .page-lead { text-wrap: pretty; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 9px;
    background: var(--btn);
    color: var(--btn-fg);
    font: 600 14px/1 var(--font);
    white-space: nowrap;
    box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, .18), 0 0 0 1px rgba(255, 255, 255, .16), 0 8px 24px rgba(0, 0, 0, .45);
    transition: background .2s, box-shadow .2s, transform .2s;
}
.btn:hover {
    background: #fff;
    box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, .3), 0 0 28px rgba(167, 139, 255, .6);
    transform: translateY(-1px);
}
.btn svg, .btn-ghost svg { width: 14px; height: 14px; flex: none; }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 16px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px var(--line-2);
    font: 500 14px/1 var(--font);
    white-space: nowrap;
    transition: background .2s, box-shadow .2s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(255, 255, 255, .22); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .07);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition: background .2s, border-color .2s;
}
a.pill:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.pill-plain { padding: 5px 14px; }
.pill-tag { padding: 1px 8px; border-radius: 999px; background: #fff; color: #000; font-size: 12px; font-weight: 600; }
.pill-arrow { color: var(--fg-2); transition: transform .2s; }
.pill:hover .pill-arrow { transform: translateX(3px); }

/* 面板：卡片的统一底子 */
.panel {
    min-width: 0;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
/* 压在视频上的面板：半透明加磨砂 */
.panel-glass {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(13, 14, 17, .62);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 60px rgba(0, 0, 0, .35);
}

/* ---------- 背景视频 ---------- */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center top;
    filter: saturate(1.08) contrast(1.04);
    pointer-events: none;
}

/* 视频上的压暗、颗粒、暗角三层，放在有视频透出的区块里 */
.video-zone { position: relative; overflow: hidden; }
.hero-layer { position: absolute; inset: 0; pointer-events: none; }
.hero-shade { background: rgba(5, 6, 9, .5); }
.hero-grain { background-image: var(--grain); opacity: .16; mix-blend-mode: overlay; }
.hero-fade {
    background:
        radial-gradient(ellipse 110% 85% at 50% 38%, transparent 52%, rgba(7, 8, 10, .82) 100%),
        linear-gradient(to bottom, rgba(7, 8, 10, .4), transparent 22%, transparent 62%, var(--bg));
}
.hero-inner { position: relative; z-index: 1; }

/* 首屏内容的入场动画 */
.rise > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.rise > :nth-child(2) { animation-delay: .08s; }
.rise > :nth-child(3) { animation-delay: .16s; }
.rise > :nth-child(4) { animation-delay: .24s; }
.rise > :nth-child(5) { animation-delay: .32s; }
.rise > :nth-child(n+6) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* 没有视频的页面：顶部一团紫蓝光 */
.glow-hero {
    position: relative;
    overflow: hidden;
    padding: 168px var(--gutter-r) 72px var(--gutter-l);
    text-align: center;
}
.glow-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 620px;
    pointer-events: none;
    background:
        radial-gradient(ellipse 46% 60% at 50% -8%, rgba(var(--accent-rgb), .26), transparent 72%),
        radial-gradient(ellipse 30% 42% at 38% -4%, rgba(27, 134, 184, .2), transparent 70%);
}
.glow-hero::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 620px;
    pointer-events: none;
    background-image: var(--grain);
    opacity: .14;
    mix-blend-mode: overlay;
    -webkit-mask-image: linear-gradient(#000, transparent);
    mask-image: linear-gradient(#000, transparent);
}
.glow-hero > * { position: relative; z-index: 1; }

/* ---------- 导航 ---------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gutter-r) 0 var(--gutter-l);
    pointer-events: none;
}
.nav, .nav-panel { pointer-events: auto; }
.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    height: 60px;
    margin: 0 auto;
    padding: 0 10px 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(12, 13, 16, .62);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 32px rgba(0, 0, 0, .25);
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav-brand img { width: 24px; height: 24px; }
.nav-links { display: flex; flex: 1; justify-content: center; gap: 2px; }
.nav-links a {
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--fg-2);
    white-space: nowrap;
    transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, .05); }
.nav-links a[aria-current="page"], .nav-panel a[aria-current="page"] { color: var(--fg); background: rgba(255, 255, 255, .07); }
.nav-menu {
    display: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
}
.nav-menu svg { width: 18px; height: 18px; }
.nav-panel {
    max-width: 1200px;
    margin: 8px auto 0;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(12, 13, 16, .92);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 20px 48px rgba(0, 0, 0, .45);
}
.nav-panel a { display: block; padding: 12px 14px; border-radius: 10px; color: var(--fg-2); }
.nav-panel a:hover { color: var(--fg); background: rgba(255, 255, 255, .05); }
@media (max-width: 959px) {
    .nav-links { display: none; }
    .nav-menu { display: grid; }
    .nav .btn { margin-left: auto; }
}

/* ---------- 页脚 ---------- */
.site-foot { position: relative; background: var(--bg); }
.foot-glow {
    position: relative;
    height: 120px;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 36% 100% at 50% 100%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 36% 100% at 50% 100%, #000 35%, transparent 100%);
}
.foot-glow i {
    position: absolute;
    bottom: -150px;
    width: 54px;
    height: 320px;
    transform: rotate(-45deg);
    background: linear-gradient(to bottom, transparent 10%, #1b86b8 30%, #5a3cf5 45%, #8f5cff 58%, #efe9ff 70%, transparent 82%);
    filter: blur(6px);
    opacity: .85;
}
.foot-glow i:nth-child(1) { left: 36%; opacity: .5; }
.foot-glow i:nth-child(2) { left: 43%; }
.foot-glow i:nth-child(3) { left: 50%; bottom: -130px; }
.foot-glow i:nth-child(4) { left: 57%; }
.foot-glow i:nth-child(5) { left: 64%; opacity: .5; }
.foot-main { border-top: 1px solid var(--line); }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 56px 48px; }
.foot-brand p { margin-top: 12px; font-size: 14px; color: var(--fg-3); }
.foot-cols h2 { margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.foot-cols ul { display: grid; gap: 10px; font-size: 14px; }
.foot-cols ul a { color: var(--fg-2); transition: color .15s; }
.foot-cols ul a:hover { color: var(--fg); }
.foot-bottom { padding-block: 24px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }
@media (max-width: 719px) {
    .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 16px; }
    .foot-brand { grid-column: 1 / -1; }
}

/* 背景视频固定在最底层；系统缩放 125%、150% 时，区块交界会留一条亚像素缝把视频透出来。外扩 1px 同色描边盖住它 */
.solid { background: var(--bg); box-shadow: 0 0 0 1px var(--bg); }
.sec, .site-foot { box-shadow: 0 0 0 1px var(--bg); }

@media (max-width: 767px) {
    .sec { padding-block: 96px; }
}

/* 触屏：小链接和小按钮的点击范围放大到 36px 以上，外观不变 */
@media (pointer: coarse) {
    .nav-brand { padding-block: 10px; }
    a.pill, .copy-btn { min-height: 36px; }
    .copy-btn { padding-inline: 12px; }
    .foot-cols ul { gap: 2px; }
    .foot-cols ul a { display: inline-block; padding-block: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .rise > * { animation: none; }
}
