/* ============================================================
   YGWC · 深空 3D 视觉层
   独立静态资源，不参与 Vite 构建；仅覆盖表现层，不改任何业务逻辑
   ============================================================ */

:root {
    --space-0: #060a12;
    --space-1: #0b1120;
    --space-2: #101a2e;
    --glow: #66c0f4;
    --glow-2: #2d73ff;
    --edge: rgba(125, 175, 235, 0.14);
}

html {
    background: var(--space-0);
    color-scheme: dark;
}

body {
    background: transparent !important;
    position: relative;
    isolation: isolate;
}

::selection {
    background: rgba(102, 192, 244, 0.32);
    color: #fff;
}

/* ---------- 固定深空背景（由 space.js 注入） ---------- */
#ygwc-space {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(1400px 820px at 50% -22%, rgba(45, 115, 255, 0.24), transparent 66%),
        radial-gradient(900px 620px at 88% 8%, rgba(102, 192, 244, 0.13), transparent 70%),
        radial-gradient(760px 520px at 6% 78%, rgba(88, 60, 210, 0.13), transparent 72%),
        linear-gradient(180deg, #070b14 0%, #0a1120 46%, #060a12 100%);
}

#ygwc-starfield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.ygwc-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.4;
    mix-blend-mode: screen;
    animation: ygwc-drift 26s ease-in-out infinite alternate;
}

.ygwc-aurora.a1 {
    width: 52vw; height: 52vw; left: -14vw; top: -18vw;
    background: radial-gradient(circle, #1a6fff, transparent 66%);
}

.ygwc-aurora.a2 {
    width: 42vw; height: 42vw; right: -12vw; top: 6vh;
    background: radial-gradient(circle, #12b8d8, transparent 66%);
    animation-duration: 34s; animation-direction: alternate-reverse;
}

.ygwc-aurora.a3 {
    width: 46vw; height: 46vw; left: 32vw; bottom: -26vw;
    background: radial-gradient(circle, #6a3fd6, transparent 68%);
    animation-duration: 42s; opacity: 0.26;
}

.ygwc-grid {
    position: absolute;
    left: -30%; right: -30%; bottom: -34vh; height: 76vh;
    background-image:
        linear-gradient(rgba(102, 192, 244, 0.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 192, 244, 0.13) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(520px) rotateX(66deg);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 42%, transparent 92%);
    mask-image: linear-gradient(to bottom, transparent, #000 42%, transparent 92%);
    opacity: 0.5;
    animation: ygwc-gridflow 20s linear infinite;
}

.ygwc-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 40%, transparent 42%, rgba(2, 5, 10, 0.66) 100%);
}

@keyframes ygwc-drift {
    from { transform: translate3d(-4%, -3%, 0) scale(1); }
    to   { transform: translate3d(6%, 5%, 0) scale(1.14); }
}

@keyframes ygwc-gridflow {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 64px, 64px 0; }
}

/* ---------- 卡片：玻璃质感 + 光晕 + 悬浮 ---------- */
body .card {
    background: linear-gradient(160deg, rgba(24, 34, 54, 0.76), rgba(12, 19, 33, 0.84));
    border: 1px solid var(--edge);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    position: relative;
    overflow: hidden;
    transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.38s ease, box-shadow 0.38s ease;
}

body .card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(420px 190px at var(--mx, 50%) var(--my, 0%), rgba(102, 192, 244, 0.13), transparent 72%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

body .card:hover {
    border-color: rgba(102, 192, 244, 0.4);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52), 0 0 28px rgba(45, 115, 255, 0.16);
}

body .card:hover::before { opacity: 1; }
body .card:not(.tilt-card):hover { transform: translateY(-3px); }

.tilt-card {
    transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translate3d(0, var(--ty, 0px), 0);
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-card:hover { --ty: -6px; }

/* ---------- 按钮 ---------- */
body .btn-primary {
    background: linear-gradient(110deg, #1a9fff, #2d73ff 52%, #66c0f4);
    background-size: 200% 100%;
    box-shadow: 0 6px 22px rgba(45, 115, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

body .btn-primary::after {
    content: "";
    position: absolute;
    top: 0; left: -130%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.65s ease;
}

body .btn-primary:hover::after { left: 150%; }
body .btn-primary:hover { background-position: 100% 0; }

body .btn-ghost {
    background: rgba(20, 30, 48, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ---------- 渐变标题 ---------- */
.gradient-text { color: #fff; }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .gradient-text {
        background: linear-gradient(100deg, #ffffff 8%, #c7e8ff 38%, #66c0f4 66%, #a9dcff 82%, #ffffff 100%);
        background-size: 220% auto;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        animation: ygwc-shimmer 9s linear infinite;
    }
}

@keyframes ygwc-shimmer {
    to { background-position: 220% center; }
}

/* ---------- 滚动入场 ---------- */
.space-js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.72s ease, transform 0.72s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.space-js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- 首页 Hero 的 3D 层次 ---------- */
.space-hero {
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58), inset 0 0 0 1px rgba(125, 175, 235, 0.1);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.space-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(520px 320px at var(--hx, 70%) var(--hy, 30%), rgba(102, 192, 244, 0.16), transparent 70%);
    opacity: 0.8;
}

.hero-ring {
    position: absolute;
    right: -10%; top: -46%;
    width: 62%; aspect-ratio: 1;
    border: 1px solid rgba(102, 192, 244, 0.22);
    border-radius: 50%;
    box-shadow: inset 0 0 80px rgba(45, 115, 255, 0.16), 0 0 70px rgba(45, 115, 255, 0.12);
    transform: rotateX(64deg) rotateZ(20deg);
    pointer-events: none;
    animation: ygwc-spin 34s linear infinite;
}

.hero-ring::before,
.hero-ring::after {
    content: "";
    position: absolute;
    inset: 14%;
    border: 1px dashed rgba(102, 192, 244, 0.2);
    border-radius: 50%;
}

.hero-ring::after { inset: 30%; border-style: solid; border-color: rgba(166, 216, 255, 0.14); }

.hero-orb {
    position: absolute;
    width: 190px; height: 190px;
    right: 8%; top: 16%;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(160, 225, 255, 0.85), rgba(45, 115, 255, 0.42) 42%, rgba(10, 20, 45, 0.1) 72%);
    box-shadow: 0 0 70px rgba(45, 115, 255, 0.42), inset -18px -22px 44px rgba(0, 0, 0, 0.42);
    filter: saturate(1.1);
    pointer-events: none;
    animation: ygwc-float 9s ease-in-out infinite alternate;
}

@keyframes ygwc-spin { to { transform: rotateX(64deg) rotateZ(380deg); } }

@keyframes ygwc-float {
    from { transform: translate3d(0, -10px, 0) scale(1); }
    to   { transform: translate3d(0, 14px, 0) scale(1.05); }
}

/* ---------- 导航 / 页脚 ---------- */
nav {
    background: rgba(9, 15, 28, 0.72) !important;
    border-bottom-color: rgba(125, 175, 235, 0.14) !important;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transition: box-shadow 0.35s ease, background 0.35s ease;
}

nav.is-scrolled {
    background: rgba(7, 12, 23, 0.9) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

footer {
    background: rgba(8, 13, 24, 0.62) !important;
    border-top-color: rgba(125, 175, 235, 0.12) !important;
}

/* ---------- 细节 ---------- */
body .section-title { letter-spacing: -0.02em; }

body .badge {
    border: 1px solid rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

body .input {
    background: rgba(11, 18, 32, 0.72);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

body .input:focus {
    box-shadow: 0 0 0 3px rgba(45, 115, 255, 0.14);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #070b14; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2a475e, #1a9fff);
    border-radius: 8px;
    border: 2px solid #070b14;
}

/* ---------- 无障碍：尊重减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .space-js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 窄屏收敛，避免装饰遮挡内容 ---------- */
@media (max-width: 767px) {
    .hero-orb { width: 110px; height: 110px; right: 2%; top: 8%; opacity: 0.6; }
    .hero-ring { width: 90%; right: -30%; opacity: 0.6; }
    .ygwc-grid { opacity: 0.3; }
}
