:root {
    color-scheme: dark;
    --page-start: #0a1027;
    --page-end: #162650;
    --card: rgba(15, 25, 56, 0.92);
    --card-border: rgba(255, 255, 255, 0.1);
    --field: rgba(255, 255, 255, 0.07);
    --field-focus: rgba(255, 255, 255, 0.11);
    --text: #f7f9ff;
    --muted: #9ba8c7;
    --gold: #61e0d1;
    --gold-strong: #98f3e8;
    --teal: #42cbb8;
    --green: #47d7ad;
    --red: #ff8793;
    --shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--page-start);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(74, 113, 213, 0.38), transparent 32rem),
        radial-gradient(circle at 86% 82%, rgba(38, 167, 160, 0.16), transparent 27rem),
        linear-gradient(145deg, var(--page-start), var(--page-end));
}

body.picker-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

[hidden] {
    display: none !important;
}

.page-shell {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    align-items: center;
    justify-content: center;
    grid-template-columns: minmax(0, 590px) minmax(420px, 480px);
    gap: clamp(40px, 6vw, 92px);
    isolation: isolate;
    overflow: hidden;
    padding: max(28px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.ambient {
    position: absolute;
    border: 1px solid rgba(97, 224, 209, 0.13);
    border-radius: 50%;
    pointer-events: none;
}

.ambient-one {
    top: -260px;
    right: -120px;
    width: 560px;
    height: 560px;
    box-shadow: inset 0 0 90px rgba(97, 224, 209, 0.04);
}

.ambient-two {
    bottom: -280px;
    left: -120px;
    width: 620px;
    height: 620px;
    border-color: rgba(71, 215, 173, 0.09);
}

.table-scene {
    position: fixed;
    z-index: -1;
    top: 50%;
    left: -9vw;
    width: min(62vw, 860px);
    height: min(78vh, 720px);
    pointer-events: none;
    transform: translateY(-50%) rotate(-8deg);
}

.table-felt {
    position: absolute;
    inset: 10% 3%;
    border: clamp(14px, 2.1vw, 30px) solid rgba(32, 46, 79, 0.62);
    border-radius: 48%;
    background:
        radial-gradient(ellipse at 50% 48%, rgba(44, 148, 136, 0.23), rgba(15, 64, 78, 0.1) 58%, rgba(7, 14, 34, 0.05) 72%),
        repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 9px);
    box-shadow:
        inset 0 0 0 2px rgba(97, 224, 209, 0.08),
        inset 0 0 90px rgba(5, 11, 28, 0.55),
        0 42px 100px rgba(0, 0, 0, 0.24);
}

.scene-card {
    position: absolute;
    display: flex;
    width: 76px;
    height: 106px;
    flex-direction: column;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 11px;
    color: rgba(247, 249, 255, 0.28);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.2);
    font-family: Georgia, serif;
}

.scene-card b {
    font-size: 22px;
    line-height: 1;
}

.scene-card i {
    margin: auto;
    font-size: 30px;
    font-style: normal;
}

.scene-card-one {
    top: 18%;
    left: 15%;
    transform: rotate(-12deg);
}

.scene-card-two {
    top: 22%;
    left: 24%;
    color: rgba(255, 135, 147, 0.27);
    transform: rotate(5deg);
}

.scene-chip {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 5px dashed rgba(97, 224, 209, 0.24);
    border-radius: 50%;
    background: rgba(97, 224, 209, 0.05);
    box-shadow: inset 0 0 0 4px rgba(97, 224, 209, 0.05), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.scene-chip-one {
    right: 18%;
    bottom: 19%;
}

.scene-chip-two {
    right: 11%;
    bottom: 25%;
    border-color: rgba(66, 203, 184, 0.22);
    transform: scale(0.84);
}

.scene-chip-three {
    right: 22%;
    bottom: 10%;
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.68);
}

.app-intro {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 590px;
    padding: 34px 0;
}

.intro-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: clamp(48px, 8vh, 82px);
}

.intro-brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(49, 195, 178, 0.22);
}

.intro-brand-mark img,
.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-brand-en,
.intro-brand-cn,
.intro-kicker,
.intro-description,
.friend-callout p,
.feature-card p {
    margin: 0;
}

.intro-brand-en {
    color: var(--gold-strong);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.18em;
}

.intro-brand-cn {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.intro-kicker {
    color: var(--teal);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.18em;
}

.app-intro h2 {
    max-width: 560px;
    margin: 15px 0 0;
    font-size: clamp(40px, 4.3vw, 62px);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.055em;
}

.app-intro h2 span {
    color: var(--gold-strong);
}

.intro-description {
    max-width: 510px;
    margin-top: 22px;
    color: #abb6d0;
    font-size: 15px;
    line-height: 1.85;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.game-tags span {
    padding: 7px 12px;
    border: 1px solid rgba(66, 203, 184, 0.2);
    border-radius: 999px;
    color: #bde9e2;
    background: rgba(66, 203, 184, 0.07);
    font-size: 11px;
    font-weight: 700;
}

.feature-grid {
    display: grid;
    margin-top: 34px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.feature-card {
    min-height: 142px;
    padding: 17px 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(19, 31, 67, 0.78), rgba(14, 24, 53, 0.45));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.13);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.feature-index {
    color: rgba(97, 224, 209, 0.62);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.feature-card h3 {
    margin: 22px 0 7px;
    font-size: 14px;
}

.feature-card p {
    color: #8491ad;
    font-size: 11px;
    line-height: 1.65;
}

.friend-callout {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 22px;
    padding: 15px 18px;
    border-left: 2px solid rgba(97, 224, 209, 0.72);
    color: #dfe5f4;
    background: linear-gradient(90deg, rgba(97, 224, 209, 0.07), transparent 82%);
}

.friend-avatars {
    display: flex;
    flex: 0 0 auto;
    padding-left: 8px;
}

.friend-avatars span {
    display: grid;
    width: 31px;
    height: 31px;
    margin-left: -8px;
    place-items: center;
    border: 2px solid #101b3d;
    border-radius: 50%;
    color: #16213d;
    background: var(--gold-strong);
    font-family: Georgia, serif;
    font-size: 12px;
    font-weight: 900;
}

.friend-avatars span:nth-child(2) {
    color: #0c3740;
    background: #68d6c6;
}

.friend-avatars span:nth-child(3) {
    color: #2c203b;
    background: #d5b4e7;
}

.friend-callout strong {
    font-size: 13px;
}

.friend-callout p {
    margin-top: 3px;
    color: #7f8ca8;
    font-size: 11px;
}

.register-card {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    padding: 30px;
    border: 1px solid var(--card-border);
    border-radius: 26px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.register-card::before {
    position: absolute;
    top: 0;
    left: 54px;
    width: 92px;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(49, 195, 178, 0.2);
}

.brand-name,
.brand-subtitle,
.eyebrow,
.hero-copy p,
.card-footer,
.field-help,
.success-panel p {
    margin: 0;
}

.brand-name {
    color: var(--gold-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.hero-copy {
    margin: 34px 0 28px;
}

.eyebrow {
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.19em;
}

h1,
h2 {
    margin: 8px 0 0;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(27px, 7vw, 34px);
    line-height: 1.18;
}

.hero-copy > p:last-child,
.success-panel > p:last-child {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.field-label {
    display: block;
    margin: 18px 0 8px;
    color: #cbd3e8;
    font-size: 13px;
    font-weight: 650;
}

.field-control,
.invite-field {
    display: flex;
    min-height: 54px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: var(--field);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.field-control:focus-within,
.invite-field:focus-within {
    border-color: rgba(97, 224, 209, 0.76);
    background: var(--field-focus);
    box-shadow: 0 0 0 3px rgba(97, 224, 209, 0.1);
}

input {
    min-width: 0;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
}

input::placeholder {
    color: #74809d;
}

.invite-field {
    padding: 0 14px;
    border-color: rgba(97, 224, 209, 0.32);
    background: rgba(97, 224, 209, 0.08);
}

.invite-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 14px rgba(97, 224, 209, 0.72);
}

.invite-field input {
    width: 100%;
    padding: 0 11px;
    color: var(--gold-strong);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invite-status {
    flex: 0 0 auto;
    color: var(--green);
    font-size: 11px;
}

.invite-status[data-state="error"] {
    color: var(--red);
}

.country-trigger {
    display: flex;
    min-width: 112px;
    min-height: 52px;
    align-items: center;
    gap: 7px;
    padding: 0 11px 0 12px;
    border: 0;
    color: var(--text);
    background: transparent;
}

.country-marker,
.country-row-marker {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(97, 224, 209, 0.3);
    border-radius: 7px;
    color: var(--gold-strong);
    background: rgba(97, 224, 209, 0.09);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.country-marker {
    width: 28px;
    height: 22px;
}

.country-chevron {
    width: 7px;
    height: 7px;
    margin: -3px 0 0 1px;
    border-right: 1px solid var(--muted);
    border-bottom: 1px solid var(--muted);
    transform: rotate(45deg);
}

.field-divider {
    width: 1px;
    height: 22px;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.12);
}

.phone-field input,
.code-field input,
.password-field input {
    width: 100%;
    padding: 0 16px;
}

.text-button,
.password-toggle {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
}

.text-button {
    min-width: 108px;
    min-height: 40px;
    margin-right: 6px;
    padding: 0 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gold-strong);
    font-size: 13px;
    font-weight: 700;
}

.text-button:disabled {
    color: #75809a;
}

.password-toggle {
    min-width: 58px;
    min-height: 40px;
    margin-right: 4px;
    color: #aeb9d3;
    font-size: 12px;
}

.field-help {
    margin-top: 7px;
    color: #77839f;
    font-size: 11px;
    line-height: 1.5;
}

.form-message {
    min-height: 22px;
    margin-top: 18px;
    color: var(--red);
    font-size: 13px;
    line-height: 1.55;
}

.form-message[data-tone="success"] {
    color: var(--green);
}

.form-message[data-tone="info"] {
    color: var(--gold-strong);
}

.primary-button {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 15px;
    color: #11192f;
    background: linear-gradient(135deg, var(--gold-strong), #43cdbd);
    box-shadow: 0 14px 32px rgba(67, 205, 189, 0.2);
    font-weight: 850;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button:not(:disabled):active {
    transform: translateY(1px) scale(0.995);
    box-shadow: 0 8px 20px rgba(67, 205, 189, 0.16);
}

.primary-button:disabled {
    opacity: 0.58;
}

.button-arrow {
    font-size: 20px;
    line-height: 1;
}

.success-panel {
    padding: 30px 4px 14px;
    outline: 0;
    text-align: center;
}

.success-icon {
    display: grid;
    width: 68px;
    height: 68px;
    margin: 0 auto 24px;
    place-items: center;
    border: 1px solid rgba(71, 215, 173, 0.48);
    border-radius: 50%;
    color: #0f2430;
    background: linear-gradient(145deg, #72e8c5, var(--green));
    box-shadow: 0 14px 38px rgba(71, 215, 173, 0.2);
    font-size: 30px;
    font-weight: 900;
}

.success-panel h2 {
    font-size: 30px;
}

.install-attribution-note,
.safari-required-message {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.6;
}

.install-attribution-note {
    color: var(--muted);
}

.safari-required-message {
    color: var(--gold-strong);
}

.platform-download-button.is-pending {
    cursor: progress;
    opacity: 0.68;
    pointer-events: none;
}

.success-download-button {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    border-radius: 15px;
    color: #11192f;
    background: linear-gradient(135deg, var(--gold-strong), #43cdbd);
    box-shadow: 0 14px 32px rgba(67, 205, 189, 0.2);
    font-weight: 850;
    text-decoration: none;
}

.success-download-button:active {
    transform: translateY(1px) scale(0.995);
}

.platform-download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.platform-download-button {
    min-width: 0;
    min-height: 64px;
    flex-direction: column;
    gap: 3px;
    margin-top: 0;
    text-align: center;
}

.platform-download-button small {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.72;
}

.platform-download-button.platform-ios {
    color: #e7edf9;
    border: 1px solid rgba(231, 237, 249, 0.22);
    background: rgba(231, 237, 249, 0.08);
    box-shadow: none;
}

.platform-download-button.is-disabled {
    cursor: not-allowed;
    opacity: 0.48;
    pointer-events: none;
}

@media (max-width: 430px) {
    .platform-download-grid {
        grid-template-columns: 1fr;
    }
}

.success-download-fallback {
    margin-top: 20px;
    color: #9da8c1;
    font-size: 13px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
    color: #707d99;
    font-size: 11px;
}

.shield {
    color: #8390ad;
    font-size: 8px;
    transform: rotate(45deg);
}

.country-picker {
    position: fixed;
    z-index: 20;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 0, rgba(74, 113, 213, 0.3), transparent 28rem),
        linear-gradient(160deg, #0b122d, #142449);
}

.country-picker-shell {
    display: flex;
    width: min(100%, 640px);
    height: 100%;
    min-height: 100%;
    margin: 0 auto;
    flex-direction: column;
    padding: max(10px, env(safe-area-inset-top)) 18px max(10px, env(safe-area-inset-bottom));
    background: rgba(11, 18, 45, 0.34);
}

.country-picker-header {
    display: grid;
    min-height: 58px;
    align-items: center;
    grid-template-columns: 48px 1fr 48px;
}

.country-picker-header h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: 0;
    text-align: center;
}

.country-picker-close {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    background: transparent;
}

.country-picker-close span {
    margin-top: -4px;
    font-size: 40px;
    font-weight: 250;
    line-height: 1;
}

.country-picker-close:active {
    background: rgba(255, 255, 255, 0.07);
}

.country-search {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 11px;
    margin: 8px 0 12px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.country-search:focus-within {
    border-color: rgba(97, 224, 209, 0.62);
    box-shadow: 0 0 0 3px rgba(97, 224, 209, 0.09);
}

.country-search-icon {
    position: relative;
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    border: 1.5px solid var(--muted);
    border-radius: 50%;
}

.country-search-icon::after {
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 7px;
    height: 1.5px;
    content: "";
    border-radius: 2px;
    background: var(--muted);
    transform: rotate(45deg);
    transform-origin: left center;
}

.country-search input {
    width: 100%;
    height: 48px;
    font-size: 15px;
}

.country-list {
    min-height: 0;
    overflow: auto;
    flex: 1 1 auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(97, 224, 209, 0.38) transparent;
}

.country-row {
    display: grid;
    width: 100%;
    min-height: 62px;
    align-items: center;
    grid-template-columns: 38px minmax(0, 1fr) auto 26px;
    gap: 11px;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text);
    background: transparent;
    text-align: left;
}

.country-row:hover,
.country-row:focus-visible {
    outline: 0;
    background: rgba(255, 255, 255, 0.055);
}

.country-row[aria-selected="true"] {
    background: rgba(97, 224, 209, 0.08);
}

.country-row-marker {
    width: 34px;
    height: 26px;
}

.country-row-name {
    overflow: hidden;
    font-size: 15px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-row-code {
    color: #c3cce1;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.country-row-check {
    color: transparent;
    font-size: 19px;
    font-weight: 800;
    text-align: right;
}

.country-row[aria-selected="true"] .country-row-check {
    color: var(--gold-strong);
}

.country-empty {
    margin: 56px 0 0;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1180px) {
    .page-shell {
        grid-template-columns: minmax(0, 500px) minmax(420px, 460px);
        gap: 34px;
    }

    .app-intro h2 {
        font-size: 46px;
    }

    .feature-card {
        padding-right: 13px;
        padding-left: 13px;
    }
}

@media (max-width: 1000px) {
    .page-shell {
        align-items: start;
        grid-template-columns: minmax(0, 540px);
        gap: 12px;
    }

    .table-scene {
        left: -34vw;
        width: 115vw;
        opacity: 0.66;
    }

    .app-intro {
        max-width: 540px;
        padding: 16px 6px 22px;
    }

    .intro-brand {
        margin-bottom: 34px;
    }

    .app-intro h2 {
        max-width: 520px;
        font-size: clamp(36px, 7vw, 48px);
    }

    .intro-description {
        max-width: 520px;
    }
}

@media (max-width: 520px) {
    .page-shell {
        align-items: start;
        padding-right: 12px;
        padding-left: 12px;
    }

    .table-scene {
        top: 240px;
        left: -55vw;
        width: 170vw;
        height: 520px;
        opacity: 0.46;
        transform: rotate(-8deg);
    }

    .scene-card {
        transform: scale(0.74) rotate(-12deg);
    }

    .scene-card-two {
        transform: scale(0.74) rotate(5deg);
    }

    .app-intro {
        padding: 4px 8px 14px;
    }

    .intro-brand {
        margin-bottom: 24px;
    }

    .intro-brand-mark {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 13px;
    }

    .app-intro h2 {
        margin-top: 11px;
        font-size: 31px;
        line-height: 1.18;
    }

    .intro-description {
        margin-top: 14px;
        font-size: 13px;
        line-height: 1.7;
    }

    .game-tags {
        margin-top: 18px;
    }

    .feature-grid,
    .friend-callout {
        display: none;
    }

    .register-card {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .hero-copy {
        margin-top: 30px;
        margin-bottom: 24px;
    }

    .country-picker-shell {
        padding-right: 12px;
        padding-left: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
