* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #2e3c56;
    background: #f5fcff;
}

body {
    overflow-x: hidden;
}

.gate-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 14%, rgba(179, 235, 255, .55), transparent 34%),
        radial-gradient(circle at 84% 18%, rgba(255, 218, 238, .55), transparent 36%),
        linear-gradient(135deg, #effaff 0%, #ffffff 54%, #fff7fb 100%);
}

.gate-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(95, 180, 226, .052) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 138, 188, .046) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 78%);
}

.gate-scene {
    position: relative;
    z-index: 5;
    width: min(760px, 100%);
    min-height: 440px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 20px;
    align-items: center;
    padding: 22px;
    border-radius: 38px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(250, 254, 255, .62)),
        radial-gradient(circle at 0 0, rgba(190, 239, 255, .38), transparent 36%),
        radial-gradient(circle at 100% 100%, rgba(255, 220, 240, .42), transparent 38%);
    border: 1px solid rgba(255, 255, 255, .96);
    box-shadow:
        0 30px 90px rgba(103, 168, 214, .22),
        inset 0 1px 0 rgba(255, 255, 255, .94);
    backdrop-filter: blur(22px);
    overflow: hidden;
}

.gate-board,
.gate-ticket {
    position: relative;
    z-index: 3;
}

.gate-board {
    padding: 30px 26px;
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(250, 254, 255, .66));
    border: 1px solid rgba(255, 255, 255, .94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .94);
}

.gate-board-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.gate-board-top span {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    color: #4aa8cf;
    background: linear-gradient(90deg, rgba(178, 235, 255, .72), rgba(255, 224, 241, .72));
    border: 1px solid rgba(141, 213, 244, .34);
    font-size: 13px;
    font-weight: 1000;
}

.gate-board-top em {
    color: #98a4b7;
    font-size: 11px;
    font-style: normal;
    font-weight: 1000;
    letter-spacing: .16em;
}

.gate-board h1 {
    margin: 30px 0 0;
    font-size: 36px;
    line-height: 1.18;
    letter-spacing: .02em;
    background: linear-gradient(90deg, #42b7df 0%, #6b8ee9 48%, #e98abc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gate-board p {
    margin: 14px 0 0;
    color: #7e8ca4;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.7;
}

.gate-track {
    position: relative;
    height: 52px;
    margin-top: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(255, 255, 255, .86);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92);
}

.gate-track::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 50%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #b7efff 0%, #ffffff 50%, #ffd5eb 100%);
    transform: translateY(-50%);
}

.gate-track i {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(180, 236, 255, .34);
    animation: stationMove 2s linear infinite;
}

.gate-track i:nth-child(1) {
    left: 18%;
}

.gate-track i:nth-child(2) {
    left: 48%;
    animation-delay: .18s;
}

.gate-track i:nth-child(3) {
    left: 78%;
    animation-delay: .36s;
}

#gateBtn {
    width: 100%;
    height: 50px;
    margin-top: 24px;
    border: 0;
    border-radius: 999px;
    color: #30405d;
    background: linear-gradient(135deg, #b5efff 0%, #ffffff 52%, #ffd6eb 100%);
    box-shadow:
        0 12px 28px rgba(122, 202, 236, .18),
        inset 0 1px 0 rgba(255, 255, 255, .92);
    font-size: 15px;
    font-weight: 1000;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

#gateBtn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 34px rgba(122, 202, 236, .22),
        inset 0 1px 0 rgba(255, 255, 255, .92);
}

.gate-ticket {
    min-height: 300px;
    padding: 24px;
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(249, 254, 255, .70)),
        radial-gradient(circle at 0 0, rgba(183, 238, 255, .45), transparent 36%),
        radial-gradient(circle at 100% 100%, rgba(255, 214, 238, .50), transparent 40%);
    border: 1px solid rgba(255, 255, 255, .96);
    box-shadow:
        0 18px 48px rgba(112, 181, 224, .16),
        inset 0 1px 0 rgba(255, 255, 255, .94);
    transform: rotate(2deg);
    animation: ticketFloat 3.2s ease-in-out infinite;
}

.gate-ticket::before,
.gate-ticket::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f7fcff;
    transform: translateY(-50%);
}

.gate-ticket::before {
    left: -14px;
}

.gate-ticket::after {
    right: -14px;
}

.ticket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.ticket-head span {
    color: #4aa8cf;
    font-size: 15px;
    font-weight: 1000;
}

.ticket-head strong {
    color: #9aa6b8;
    font-size: 11px;
    letter-spacing: .16em;
}

.ticket-route {
    display: grid;
    grid-template-columns: 1fr 42px 1fr;
    align-items: center;
    gap: 12px;
    margin-top: 38px;
}

.ticket-route div {
    min-width: 0;
}

.ticket-route span {
    display: block;
    color: #a0aabb;
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .12em;
}

.ticket-route strong {
    display: block;
    margin-top: 7px;
    color: #34435f;
    font-size: 24px;
    font-weight: 1000;
}

.ticket-route i {
    position: relative;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #b7efff, #ffd5eb);
}

.ticket-route i::after {
    content: "";
    position: absolute;
    right: -2px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #e98abc;
    border-right: 2px solid #e98abc;
    transform: translateY(-50%) rotate(45deg);
}

.ticket-domain {
    margin-top: 32px;
    padding: 14px 15px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(255, 255, 255, .88);
    color: #465672;
    font-size: 13px;
    font-weight: 1000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-code {
    display: flex;
    gap: 7px;
    margin-top: 28px;
}

.ticket-code b {
    height: 42px;
    flex: 1;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(77, 179, 220, .36), rgba(255, 214, 238, .42));
}

.ticket-code b:nth-child(2),
.ticket-code b:nth-child(4) {
    flex: .55;
}

.gate-light {
    position: absolute;
    z-index: 2;
    width: 160px;
    height: 160px;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .9), transparent 68%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.gate-door {
    position: absolute;
    z-index: 1;
    width: 170px;
    height: 120%;
    top: -10%;
    background: linear-gradient(180deg, rgba(186, 238, 255, .22), rgba(255, 222, 240, .18));
    border: 1px solid rgba(255, 255, 255, .36);
    transform: skewX(-12deg);
    opacity: .55;
}

.gate-door-left {
    left: -74px;
}

.gate-door-right {
    right: -74px;
}

.bg-ball {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    pointer-events: none;
}

.bg-ball-a {
    width: 320px;
    height: 320px;
    left: 6%;
    bottom: 8%;
    background: radial-gradient(circle, rgba(170, 232, 255, .34), transparent 68%);
    animation: ballFloatA 9s ease-in-out infinite;
}

.bg-ball-b {
    width: 360px;
    height: 360px;
    right: 4%;
    top: 10%;
    background: radial-gradient(circle, rgba(255, 211, 236, .36), transparent 68%);
    animation: ballFloatB 10s ease-in-out infinite;
}

.bg-ball-c {
    width: 220px;
    height: 220px;
    left: 44%;
    bottom: 5%;
    background: radial-gradient(circle, rgba(255, 255, 255, .82), transparent 70%);
}

.stat-frame {
    position: absolute;
    width: 1px;
    height: 1px;
    left: -9999px;
    top: -9999px;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

@keyframes stationMove {
    0%,
    100% {
        transform: translateY(0) scale(.85);
        opacity: .55;
    }

    50% {
        transform: translateY(-7px) scale(1);
        opacity: 1;
    }
}

@keyframes ticketFloat {
    0%,
    100% {
        transform: translateY(0) rotate(2deg);
    }

    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

@keyframes ballFloatA {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(22px, -18px, 0);
    }
}

@keyframes ballFloatB {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(-20px, 18px, 0);
    }
}

@media (max-width: 720px) {
    .gate-page {
        padding: 16px;
    }

    .gate-scene {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 12px;
        border-radius: 32px;
    }

    .gate-board {
        padding: 26px 20px;
        border-radius: 26px;
    }

    .gate-board-top {
        align-items: flex-start;
    }

    .gate-board-top em {
        display: none;
    }

    .gate-board h1 {
        margin-top: 26px;
        font-size: 31px;
    }

    .gate-ticket {
        min-height: auto;
        padding: 22px 20px;
        border-radius: 26px;
        transform: rotate(-1deg);
    }

    .ticket-route strong {
        font-size: 22px;
    }

    .ticket-code {
        margin-top: 22px;
    }
}

@media (max-width: 390px) {
    .gate-board h1 {
        font-size: 28px;
    }

    .gate-board p {
        font-size: 13px;
    }

    .ticket-route {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ticket-route i {
        width: 68px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}