:root {
    --primary: var(--optics-primary, #5b6cff);
    --primary-hover: var(--optics-primary-hover, #7382ff);
    --accent: var(--optics-accent, #8b5cf6);
    --accent-soft: rgba(139, 92, 246, 0.24);
    --cyan: var(--optics-cyan, #6ed6ff);
    --text-main: var(--optics-text-main, #eef4ff);
    --text-muted: var(--optics-text-muted, #b9c6ea);
    --bg-deep: var(--optics-bg-1, #08111f);
    --bg-mid: var(--optics-bg-2, #101a3a);
    --bg-glass: rgba(10, 19, 43, 0.56);
    --border-glow: var(--optics-border, rgba(148, 178, 255, 0.34));
    --shadow-strong: 0 28px 80px rgba(3, 8, 23, 0.52);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top, rgba(74, 118, 255, 0.16), transparent 36%),
        linear-gradient(135deg, #060d1b 0%, #0b1530 36%, #1d1645 70%, #160b33 100%);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.welcome-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    isolation: isolate;
}

.background-layer,
.hero-panel {
    width: 100%;
}

.background-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb,
.light-beam,
.diffraction-ring,
.interference-stripes,
.lab-grid,
.particle-field {
    position: absolute;
}

.gradient-orb {
    border-radius: 999px;
    filter: blur(16px);
    opacity: 0.7;
    animation: orbFloat 16s ease-in-out infinite;
}

.orb-left {
    width: 30vw;
    height: 30vw;
    min-width: 240px;
    min-height: 240px;
    left: -8vw;
    top: 8vh;
    background: radial-gradient(circle, rgba(91, 108, 255, 0.42), rgba(91, 108, 255, 0));
}

.orb-right {
    width: 34vw;
    height: 34vw;
    min-width: 280px;
    min-height: 280px;
    right: -10vw;
    bottom: -4vh;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.42), rgba(139, 92, 246, 0));
    animation-delay: -7s;
}

.light-beam {
    width: 40vw;
    height: 2px;
    background: linear-gradient(90deg, rgba(110, 214, 255, 0), rgba(110, 214, 255, 0.92), rgba(110, 214, 255, 0));
    box-shadow: 0 0 24px rgba(110, 214, 255, 0.5);
    opacity: 0.5;
}

.beam-left {
    top: 22vh;
    left: -4vw;
    transform: rotate(-18deg);
    animation: beamPulse 9s ease-in-out infinite;
}

.beam-right {
    right: -8vw;
    bottom: 24vh;
    transform: rotate(18deg);
    animation: beamPulse 11s ease-in-out infinite reverse;
}

.diffraction-ring {
    border-radius: 50%;
    border: 1px solid rgba(133, 173, 255, 0.18);
    box-shadow:
        0 0 24px rgba(91, 108, 255, 0.24),
        inset 0 0 18px rgba(139, 92, 246, 0.14);
    animation: ringRotate 20s linear infinite;
}

.ring-large {
    width: min(68vw, 760px);
    height: min(68vw, 760px);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.ring-small {
    width: min(42vw, 420px);
    height: min(42vw, 420px);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-color: rgba(110, 214, 255, 0.24);
    animation-duration: 13s;
    animation-direction: reverse;
}

.interference-stripes {
    inset: 20% auto auto 50%;
    width: min(44vw, 460px);
    height: min(44vw, 460px);
    transform: translateX(-50%);
    background:
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0 10px,
            rgba(154, 186, 255, 0.08) 10px 15px,
            rgba(255, 255, 255, 0) 15px 26px
        );
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.4;
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0) 74%);
    animation: stripeShift 14s linear infinite;
}

.lab-grid {
    inset: auto 0 0 0;
    height: 42vh;
    background-image:
        linear-gradient(rgba(146, 171, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(146, 171, 255, 0.12) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.1), transparent);
    transform: perspective(680px) rotateX(72deg) translateY(18vh);
    transform-origin: bottom center;
    opacity: 0.36;
}

.particle-field {
    inset: 0;
}

.particle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(110, 214, 255, 0.58) 48%, rgba(110, 214, 255, 0) 100%);
    box-shadow: 0 0 18px rgba(110, 214, 255, 0.36);
    animation: particleFloat 12s ease-in-out infinite;
}

.p1 { left: 12%; top: 24%; animation-delay: -1s; }
.p2 { left: 20%; top: 68%; animation-delay: -4s; }
.p3 { left: 32%; top: 18%; animation-delay: -7s; }
.p4 { left: 62%; top: 26%; animation-delay: -2s; }
.p5 { left: 72%; top: 70%; animation-delay: -9s; }
.p6 { left: 84%; top: 32%; animation-delay: -5s; }
.p7 { left: 52%; top: 80%; animation-delay: -6s; }
.p8 { left: 90%; top: 58%; animation-delay: -3s; }

.hero-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-card {
    width: min(100%, 780px);
    padding: 42px 36px 34px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(18, 33, 70, 0.78), rgba(8, 17, 33, 0.64)),
        radial-gradient(circle at top, rgba(91, 108, 255, 0.16), transparent 55%);
    border: 1px solid var(--border-glow);
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: cardFade 1s ease-out both;
}

.hero-card::before,
.hero-card::after {
    content: "";
    position: absolute;
    border-radius: inherit;
    inset: 0;
    pointer-events: none;
}

.hero-card::before {
    padding: 1px;
    background: linear-gradient(135deg, rgba(149, 179, 255, 0.38), rgba(255, 255, 255, 0.04), rgba(139, 92, 246, 0.38));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.hero-card::after {
    inset: auto 16% -28px 16%;
    height: 56px;
    background: radial-gradient(circle, rgba(91, 108, 255, 0.32), rgba(91, 108, 255, 0));
    filter: blur(18px);
}

.hero-badge,
.hero-title,
.hero-subtitle,
.feature-tags,
.enter-button,
.hero-footer {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(110, 214, 255, 0.12);
    border: 1px solid rgba(110, 214, 255, 0.24);
    color: #d8f3ff;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.2rem, 4.8vw, 4.4rem);
    line-height: 1.1;
    letter-spacing: 0.04em;
    color: #f5f9ff;
    text-shadow: 0 0 18px rgba(110, 214, 255, 0.18);
    animation: titleRise 1.05s ease-out both;
}

.hero-subtitle {
    margin: 18px auto 0;
    max-width: 640px;
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    line-height: 1.8;
    color: var(--text-muted);
    animation: titleRise 1.15s ease-out both;
}

.feature-tags {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.feature-tag {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(181, 198, 255, 0.14);
    color: #eaf0ff;
    font-size: 0.98rem;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.enter-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    min-height: 60px;
    padding: 16px 34px;
    margin-top: 34px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 1px solid rgba(210, 220, 255, 0.26);
    box-shadow:
        0 18px 34px rgba(63, 84, 255, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    overflow: hidden;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        filter 0.28s ease,
        background 0.28s ease;
    touch-action: manipulation;
    animation: cardFade 1.25s ease-out both;
}

.button-glow {
    position: absolute;
    inset: -10%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    transform: translateX(-130%);
    transition: transform 0.55s ease;
}

.button-text {
    position: relative;
    z-index: 1;
    font-size: 1.16rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.enter-button:hover,
.enter-button:focus-visible {
    transform: translateY(-4px);
    background: linear-gradient(135deg, var(--primary-hover), #9c6bff);
    box-shadow:
        0 24px 42px rgba(69, 93, 255, 0.42),
        0 0 28px rgba(132, 144, 255, 0.35);
    filter: saturate(1.08);
}

.enter-button:hover .button-glow,
.enter-button:focus-visible .button-glow {
    transform: translateX(130%);
}

.enter-button:focus-visible {
    outline: 2px solid rgba(210, 222, 255, 0.88);
    outline-offset: 4px;
}

.hero-footer {
    margin: 24px 0 0;
    font-size: 0.92rem;
    letter-spacing: 0.12em;
    color: rgba(212, 225, 255, 0.7);
}

@keyframes orbFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, -18px, 0) scale(1.06); }
}

@keyframes beamPulse {
    0%, 100% { opacity: 0.26; }
    50% { opacity: 0.62; }
}

@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.02); }
    to { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

@keyframes stripeShift {
    from { transform: translateX(-50%) rotate(0deg) scale(1); }
    50% { transform: translateX(-50%) rotate(2deg) scale(1.03); }
    to { transform: translateX(-50%) rotate(0deg) scale(1); }
}

@keyframes particleFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.35; }
    50% { transform: translate3d(0, -16px, 0) scale(1.28); opacity: 0.95; }
}

@keyframes cardFade {
    from { opacity: 0; transform: translateY(22px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes titleRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
    .welcome-page {
        padding: 18px;
    }

    .hero-card {
        padding: 34px 22px 28px;
        border-radius: 24px;
    }

    .feature-tags {
        gap: 10px;
    }

    .feature-tag {
        font-size: 0.92rem;
        padding: 9px 14px;
    }

    .enter-button {
        width: min(100%, 320px);
        min-width: 0;
    }

    .lab-grid {
        height: 34vh;
    }
}

@media (max-width: 520px) {
    .welcome-page {
        padding: 14px;
    }

    .hero-card {
        padding: 28px 18px 24px;
        border-radius: 22px;
    }

    .hero-badge {
        font-size: 0.8rem;
        letter-spacing: 0.05em;
        margin-bottom: 14px;
    }

    .hero-subtitle {
        line-height: 1.7;
    }

    .feature-tags {
        margin-top: 22px;
    }

    .feature-tag {
        width: 100%;
        padding: 12px 14px;
    }

    .enter-button {
        min-height: 58px;
        margin-top: 28px;
        border-radius: 16px;
    }

    .button-text {
        font-size: 1.08rem;
    }

    .hero-footer {
        font-size: 0.84rem;
        letter-spacing: 0.08em;
    }

    .ring-large {
        width: 88vw;
        height: 88vw;
    }

    .ring-small {
        width: 60vw;
        height: 60vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
