@import url('bcv-ui/theme.css');

:root {
    color-scheme: dark;
    font-family: var(--bcv-font);
    color: var(--bcv-text);
    background: var(--bcv-bg);
    --gold: var(--bcv-gold);
    --muted: var(--bcv-muted);
    --edge: var(--bcv-line);
    --inset: clamp(22px, 5vw, 86px);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; color: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }

.topbar { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: max(24px, env(safe-area-inset-top)) var(--inset) 12px; }
.brand, .links, .language { display: inline-flex; align-items: center; gap: 10px; }
.brand { white-space: nowrap; }
.brand-lockup { display: grid; gap: 3px; }
.brand-name { font-size: 16px; font-weight: 700; line-height: 1.1; letter-spacing: .10em; }
.brand-name > span { color: #e0e5eb; font-size: 12px; font-weight: 500; }
.brand-terms { color: var(--gold); font-size: 11px; font-weight: 500; line-height: 1.25; }
.brand-ring { border: 1px solid #f7ca8c; border-radius: 50%; width: 23px; height: 23px; box-shadow: inset 0 0 8px #f7ca8c55, 0 0 14px #f7ca8c40; }
.links { gap: clamp(12px, 2.2vw, 34px); font-size: 14px; }
.links a:hover, .back:hover { color: var(--gold); }
.register { padding: 8px 13px; border: 1px solid #f7ca8c80; border-radius: 6px; background: #0b1625af; color: var(--gold); line-height: 1.25; text-align: center; }
.register:hover { background: #0b1625; border-color: var(--gold); }
.language { border: 1px solid var(--edge); border-radius: 999px; background: #0a1624b8; padding-inline: 11px 7px; gap: 4px; }
.language select { background: transparent; border: 0; min-height: 38px; max-width: 148px; cursor: pointer; }
.language option { background: #101e2b; }

.screen { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 100svh; overflow: clip; }
.screen::after { position: absolute; inset: 0; z-index: -1; content: ''; pointer-events: none; }
.start-art, .world-image { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.start-art { background: #0b1925 url('bcv-ui/worlds-gateway.webp') center / cover no-repeat; }
.start::after { background: linear-gradient(90deg, #07121bde 0%, #07121b6e 42%, transparent 78%), linear-gradient(0deg, #07121b91, transparent 48%, #07121b42); }
.start-copy, .world-copy { width: min(100%, 765px); margin-inline: var(--inset) auto; padding: 116px 0; }
h1 { margin: 0; color: #fff8ea; font: 400 clamp(54px, 9.1vw, 148px)/.92 'Instrument Serif', 'Songti SC', 'Noto Serif CJK SC', Georgia, serif;
    letter-spacing: -.035em; text-wrap: balance; }
.start-copy p:not(.brand-slogan), .world-copy p:not(.brand-slogan) { color: var(--muted); font-size: clamp(16px, 1.6vw, 21px); line-height: 1.55; margin: 25px 0 32px; max-width: 36ch; text-wrap: balance; }
.brand-slogan { color: var(--gold); font-size: clamp(14px, 1.4vw, 18px); font-weight: 600; letter-spacing: .035em; margin: 0 0 14px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; border: 1px solid transparent;
    border-radius: 7px; padding: 11px 19px; font-size: 15px; font-weight: 600; transition: background .2s, color .2s, border-color .2s; }
.primary { color: #21170e; background: var(--gold); border-color: var(--gold); }
.primary:hover { background: #ffdfaf; }
.primary.is-waiting, .primary.is-waiting:hover { color: var(--muted); background: #0b1625b8; border: 1px dashed var(--edge); cursor: default; }      /* 还没开放的产品：等待开放 */
.primary.is-waiting .arrow { display: none; }
.secondary { background: #0b1625b8; border-color: var(--edge); }
.secondary:hover { border-color: #f7ca8c90; }
.arrow { display: inline-block; }
:dir(rtl) .arrow { transform: scaleX(-1); }

.choose::after { background: linear-gradient(90deg, #08121c 20%, #08121cbb 42%, transparent 79%), linear-gradient(0deg, #06111c 2%, transparent 42%, #07121b65); }
.world-image { inset-inline-start: auto; inline-size: 75%; object-fit: cover; object-position: right center; opacity: .94;
    mask-image: linear-gradient(to right, transparent, black 23%); }
.world-image:not([src]) { visibility: hidden; }
.world-copy { padding-bottom: 215px; padding-top: 130px; }
.world-copy h1 { font-size: clamp(54px, 8vw, 116px); }
.back { display: inline-flex; gap: 8px; margin-bottom: 24px; color: #d3c8b6; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.worlds { position: absolute; inset: auto var(--inset) max(34px, env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; max-width: 1020px; }
.destinations { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; padding: 6px 4px 10px; }
.destination { display: flex; flex: 1 0 clamp(116px, 13vw, 174px); flex-direction: column; min-width: 0; min-height: 91px; gap: 7px;
    border: 1px solid var(--edge); padding: 5px; border-radius: 8px; background: #0d1827cc; color: #dae0e5; font-size: 13px; }
.destination:hover, .destination[aria-current="true"] { border-color: var(--gold); color: #fff0d9; }
.destination[aria-current="true"] { background: #352b24; }
.destination img { width: 100%; height: 54px; object-fit: cover; object-position: center 28%; border-radius: 4px; }
.destination span { padding-inline: 4px; overflow-wrap: anywhere; }
.step { min-width: 44px; min-height: 44px; border: 1px solid var(--edge); border-radius: 50%; background: #101c29ca; }
.step:hover { border-color: var(--gold); }
.animate-in { animation: enter .45s both; }
@keyframes enter { from { opacity: .35; } to { opacity: 1; } }

dialog { width: min(920px, calc(100vw - 26px)); max-height: 92svh; border: 1px solid var(--edge); border-radius: 12px; background: #0d1825; padding: 14px; color: inherit; }
dialog::backdrop { background: #040913e0; }
.demo-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 10px; }
.demo-head h2 { margin: 0; font-size: 19px; }
.demo-head button { min-width: 42px; min-height: 42px; padding: 5px; font-size: 22px; }
dialog video { width: 100%; max-height: 75svh; background: #03080e; display: block; }
.direct { position: absolute; inset: auto var(--inset) 12px; }

html[lang^="zh"] h1, html[lang^="ja"] h1, html[lang^="ko"] h1, :lang(ar) h1, :lang(hi) h1, :lang(th) h1 {
    font-size: clamp(43px, 7.2vw, 107px); line-height: 1.14; letter-spacing: -.035em;
}
:dir(rtl) .start::after { background: linear-gradient(270deg, #07121bfa, #07121b91 42%, transparent 90%); }
:dir(rtl) .start-art { transform: scaleX(-1); }
:dir(rtl) .choose::after { background: linear-gradient(270deg, #08121c 20%, #08121cbb 42%, transparent 79%), linear-gradient(0deg, #06111c 2%, transparent 42%, #07121b65); }
:dir(rtl) .world-image { mask-image: linear-gradient(to left, transparent, black 23%); }

@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; padding-top: max(15px, env(safe-area-inset-top)); }
    .links { flex-wrap: wrap; gap: 8px 11px; min-inline-size: 0; font-size: 13px; }
    .language select { max-width: 110px; }
    .brand-name { font-size: 14px; }
    .screen { align-items: flex-end; }
    .start-art { background-position: 80% 45%; }
    .start::after, :dir(rtl) .start::after { background: linear-gradient(0deg, #07121bf5 7%, #07121bc7 31%, transparent 68%, #07121b90); }
    .start-copy, .world-copy { margin-inline: var(--inset); padding-bottom: max(64px, calc(env(safe-area-inset-bottom) + 20px)); }
    .start-copy p:not(.brand-slogan), .world-copy p:not(.brand-slogan) { margin: 15px 0 20px; }
    .brand-slogan { margin-bottom: 9px; }
    .choose { display: grid; grid-template-rows: 1fr auto; }
    .choose::after, :dir(rtl) .choose::after { background: linear-gradient(0deg, #07121bf7 0%, #07121bba 51%, #07121b36 80%, #07121bb0); }
    .world-copy { align-self: end; padding-top: 230px; padding-bottom: 12px; width: auto; }
    .world-image, :dir(rtl) .world-image { inset-inline: 0; inline-size: 100%; block-size: 77%; object-position: 69% 30%; mask-image: linear-gradient(black 64%, transparent); }
    .back { margin-bottom: 15px; }
    .worlds { position: static; min-width: 0; margin: 0 var(--inset) max(13px, env(safe-area-inset-bottom)); gap: 5px; }
    .destinations { gap: 6px; }
    .destination { flex-basis: 100px; min-height: 74px; font-size: 12px; }
    .destination img { height: 42px; }
    .step { min-width: 39px; min-height: 39px; }
}

@media (max-height: 660px) and (min-width: 641px) {
    .world-copy { padding-bottom: 145px; padding-top: 95px; }
    .worlds { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
