:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #f5f7f2;
  background: #090b10;
  --red: #ff4655;
  --red-dark: #bd2635;
  --panel: #11141b;
  --panel-2: #171b23;
  --muted: #8d929e;
  --line: rgba(255,255,255,.1);
  --green: #6ee7a8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: #090b10; }
button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.noise { position: fixed; inset: 0; opacity: .055; pointer-events: none; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.home-page { background: radial-gradient(circle at 75% 8%, rgba(255,70,85,.13), transparent 30%), #090b10; }
.home-shell, .config-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .18em; font-size: 12px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 34px; color: white; letter-spacing: -.05em; font-size: 15px; background: var(--red); clip-path: polygon(8% 0,100% 0,92% 100%,0 100%); }
.server-state { color: #a6abb6; font-size: 12px; letter-spacing: .08em; }
.server-state i { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.auth-area { display: flex; align-items: center; }
.login-form { display: flex; align-items: center; gap: 8px; }
.login-form label { margin-right: 4px; color: #8e949f; font-size: 11px; letter-spacing: .08em; }
.login-form input { width: 150px; padding: 9px 11px; border: 1px solid var(--line); outline: 0; color: white; background: #12151b; }
.login-form input:focus { border-color: var(--red); }
.login-form button, .login-status button { padding: 9px 13px; border: 1px solid var(--red); color: white; background: var(--red-dark); cursor: pointer; }
.login-form button:disabled { opacity: .55; cursor: wait; }
.login-status { display: flex; align-items: center; gap: 13px; color: #b9bec7; font-size: 12px; }
.login-status i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.login-status strong { color: white; font-size: 13px; }
.login-status button { padding: 7px 11px; border-color: var(--line); color: #a8adb7; background: transparent; }
.hero { padding: 86px 0 64px; max-width: 820px; }
.eyebrow { margin: 0 0 23px; color: var(--red); font-size: 12px; letter-spacing: .22em; font-weight: 800; }
.hero h1 { margin: 0; font-size: clamp(48px, 7vw, 86px); line-height: .99; letter-spacing: -.055em; }
.hero h1 span { color: #7d828d; }
.hero-copy { max-width: 590px; margin: 30px 0 0; color: #a8adb7; font-size: 17px; line-height: 1.8; }
.tool-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; padding-bottom: 86px; }
.tool-card { position: relative; min-height: 360px; overflow: hidden; padding: 28px; border: 1px solid var(--line); background: var(--panel); transition: transform .25s, border-color .25s; }
a.tool-card:hover { transform: translateY(-5px); border-color: rgba(255,70,85,.6); }
.featured { display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, rgba(255,70,85,.11), transparent 45%), #12151b; }
.featured::after { content: ""; position: absolute; width: 360px; height: 360px; right: -130px; top: -170px; border: 1px solid rgba(255,70,85,.23); transform: rotate(45deg); }
.card-topline { display: flex; align-items: center; justify-content: space-between; z-index: 1; }
.game-chip { color: #d7d9de; font-size: 11px; letter-spacing: .14em; font-weight: 750; }
.game-chip i { display: inline-block; width: 18px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--red); }
.arrow { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.15); font-size: 20px; }
.crosshair { position: absolute; right: 18%; top: 50%; width: 106px; height: 106px; transform: translateY(-50%); border: 1px solid rgba(255,70,85,.45); border-radius: 50%; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: var(--red); }
.crosshair::before { left: 50%; top: -17px; width: 1px; height: 140px; }
.crosshair::after { left: -17px; top: 50%; width: 140px; height: 1px; }
.crosshair span { position: absolute; inset: 33px; border: 1px solid var(--red); transform: rotate(45deg); }
.card-copy { position: relative; z-index: 1; max-width: 480px; }
.card-copy p { margin: 0 0 13px; color: var(--red); font-size: 10px; letter-spacing: .18em; font-weight: 800; }
.card-copy h2 { margin: 0 0 13px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.035em; }
.card-copy > span { color: #8d929e; line-height: 1.6; }
.placeholder { display: flex; flex-direction: column; justify-content: space-between; opacity: .55; background-image: repeating-linear-gradient(135deg, transparent 0, transparent 18px, rgba(255,255,255,.018) 18px, rgba(255,255,255,.018) 19px); }
.plus { align-self: flex-end; color: #747985; font-size: 42px; font-weight: 200; }
footer { display: flex; justify-content: space-between; padding: 25px max(20px, calc((100vw - 1180px)/2)); border-top: 1px solid var(--line); color: #606570; font-size: 10px; letter-spacing: .15em; }

/* Configurator */
.config-page { background: radial-gradient(circle at 90% 0, rgba(255,70,85,.09), transparent 27%), #090b10; }
.config-header { position: sticky; top: 0; z-index: 8; background: rgba(9,11,16,.88); backdrop-filter: blur(18px); }
.back-link { color: #aaaeba; font-size: 13px; }
.back-link:hover { color: white; }
.config-account { display: flex; align-items: center; gap: 17px; }
.identity-badge { padding: 7px 11px; border: 1px solid var(--line); color: #969ca7; font-size: 11px; letter-spacing: .05em; }
.identity-badge.logged-in { border-color: rgba(110,231,168,.3); color: var(--green); background: rgba(110,231,168,.06); }
.config-intro { padding: 58px 0 36px; }
.config-intro h1 { margin: 8px 0 14px; font-size: clamp(38px, 6vw, 66px); letter-spacing: -.05em; }
.config-intro > p:last-child { max-width: 700px; color: var(--muted); line-height: 1.7; }
.save-state { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: #7f8590; }
.save-state.saving i { background: #f8bd57; box-shadow: 0 0 9px #f8bd57; }
.save-state.saved i { background: var(--green); box-shadow: 0 0 9px var(--green); }
.tabs { display: flex; gap: 7px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.tab { padding: 15px 21px; border: 0; border-bottom: 2px solid transparent; color: #808691; background: transparent; cursor: pointer; }
.tab.active { color: white; border-color: var(--red); }
.panel { display: none; }
.panel.active { display: block; }
.section-bar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 28px 0 18px; }
.section-bar h2 { margin: 0 0 6px; font-size: 22px; }
.section-bar p { margin: 0; color: var(--muted); font-size: 13px; }
.search { width: min(300px, 100%); padding: 11px 14px; border: 1px solid var(--line); outline: 0; color: white; background: #11141b; }
.search:focus { border-color: var(--red); }
.binding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.binding-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding: 13px 14px 13px 17px; border: 1px solid var(--line); background: var(--panel); }
.binding-item.hidden { display: none; }
.binding-name { min-width: 0; }
.binding-name strong { display: block; margin-bottom: 4px; font-size: 14px; }
.binding-name small { display: block; overflow: hidden; color: #686e79; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.key-button { flex: 0 0 auto; min-width: 78px; max-width: 120px; padding: 10px 11px; border: 1px solid rgba(255,255,255,.14); color: #f4f4f5; background: #1c2029; cursor: pointer; text-transform: uppercase; }
.key-button:hover { border-color: var(--red); }
.key-button.listening { color: white; border-color: var(--red); background: var(--red-dark); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .7; } }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.setting-item { padding: 20px; border: 1px solid var(--line); background: var(--panel); }
.setting-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setting-title strong { font-size: 14px; }
.setting-title small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.5; }
.setting-item select, .setting-item input[type="number"] { min-width: 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 0; outline: 0; color: white; background: #1c2029; }
.toggle { position: relative; width: 48px; height: 26px; flex: 0 0 auto; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; cursor: pointer; background: #303540; transition: .2s; }
.toggle span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 4px; top: 4px; background: white; transition: .2s; }
.toggle input:checked + span { background: var(--red); }
.toggle input:checked + span::after { transform: translateX(22px); }
.deploy-box { margin: 45px 0 80px; padding: 26px; border: 1px solid rgba(255,70,85,.28); background: linear-gradient(115deg, rgba(255,70,85,.09), transparent 48%), var(--panel); }
.deploy-box h2 { margin: 0 0 7px; }
.deploy-box > p { margin: 0 0 22px; color: var(--muted); line-height: 1.65; }
.deploy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deploy-button { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 17px 20px; border: 1px solid rgba(255,255,255,.12); color: white; background: #20242d; cursor: pointer; text-align: left; transition: .2s; }
.deploy-button:hover { border-color: var(--red); background: #29232b; }
.deploy-button.secondary { background: #171a21; }
.deploy-button.secondary:hover { background: #22262f; }
.deploy-button strong { display: block; margin-bottom: 4px; }
.deploy-button small { color: #858b96; }
.deploy-button > span:last-child { color: var(--red); font-size: 22px; }
.kit-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 18px; padding: 24px; border: 1px solid rgba(110,231,168,.22); background: linear-gradient(115deg, rgba(110,231,168,.07), transparent 55%), #12161b; }
.kit-card h3 { margin: 7px 0 8px; font-size: 19px; }
.kit-card p { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.kit-label { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.kit-button { flex: 0 0 auto; min-width: 235px; padding: 16px 18px; border: 1px solid rgba(110,231,168,.45); color: #effff6; background: rgba(40,111,78,.26); cursor: pointer; text-align: left; }
.kit-button:hover { border-color: var(--green); background: rgba(40,111,78,.4); }
.kit-button span { display: block; margin-top: 5px; color: var(--green); font-size: 9px; letter-spacing: .14em; }
.message { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(390px, calc(100vw - 48px)); padding: 15px 18px; border-left: 3px solid var(--green); color: #eff5f1; background: #20252c; box-shadow: 0 16px 50px rgba(0,0,0,.4); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s; }
.message.show { transform: translateY(0); opacity: 1; }
.message.error { border-color: var(--red); }
.loading { padding: 50px; color: var(--muted); text-align: center; border: 1px solid var(--line); }
@media (max-width: 800px) {
  .tool-grid, .deploy-actions { grid-template-columns: 1fr; }
  .binding-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: 1fr; }
  .crosshair { right: 12%; opacity: .55; }
  .kit-card { align-items: stretch; flex-direction: column; }
  .kit-button { width: 100%; }
}
@media (max-width: 540px) {
  .home-shell, .config-shell { width: min(100% - 24px, 1180px); }
  .site-header { height: 72px; }
  .server-state { display: none; }
  .login-form label { display: none; }
  .login-form input { width: 122px; }
  .login-status > span { max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .config-account { gap: 8px; }
  .identity-badge { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding: 58px 0 42px; }
  .hero h1 { font-size: 44px; }
  .tool-card { min-height: 320px; padding: 22px; }
  .binding-grid { grid-template-columns: 1fr; }
  .section-bar { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .config-intro { padding-top: 40px; }
  .setting-title { align-items: flex-start; }
  .setting-item select { min-width: 120px; }
  footer { gap: 20px; flex-direction: column; }
}
