*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; background: #050508; }

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #050508;
    color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==================== BACKGROUND IMAGE ==================== */
.bg-image {
    position: fixed;
    top: -2%; left: -2%;
    width: 104%; height: 104%;
    z-index: 1;
    background: url('../assets/images/background.png') center center / cover no-repeat;
    opacity: 0.85;
    will-change: transform;
    transition: transform 0.1s ease-out, clip-path 0.1s ease-out;
}

.bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5,5,8,0.1) 0%, rgba(5,5,8,0.02) 40%, rgba(5,5,8,0.25) 80%, rgba(5,5,8,0.55) 100%);
}

/* ==================== SMOKE / FOG EFFECT ==================== */
.smoke-layer {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.smoke {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    will-change: transform, opacity;
}

.smoke-1 {
    width: 80vw; height: 40vw;
    top: 5%; left: -20%;
    background: radial-gradient(ellipse, rgba(180, 180, 200, 0.2) 0%, transparent 70%);
    animation: smokeDrift1 20s ease-in-out infinite;
}

.smoke-2 {
    width: 70vw; height: 35vw;
    top: 40%; right: -20%;
    background: radial-gradient(ellipse, rgba(200, 180, 210, 0.18) 0%, transparent 70%);
    animation: smokeDrift2 25s ease-in-out infinite;
}

.smoke-3 {
    width: 90vw; height: 30vw;
    bottom: 5%; left: -10%;
    background: radial-gradient(ellipse, rgba(160, 170, 190, 0.22) 0%, transparent 70%);
    animation: smokeDrift3 18s ease-in-out infinite;
}

.smoke-4 {
    width: 60vw; height: 45vw;
    top: 50%; left: 25%;
    background: radial-gradient(ellipse, rgba(190, 170, 200, 0.15) 0%, transparent 70%);
    animation: smokeDrift4 22s ease-in-out infinite;
}

.smoke-5 {
    width: 75vw; height: 25vw;
    top: 20%; right: -25%;
    background: radial-gradient(ellipse, rgba(200, 190, 220, 0.12) 0%, transparent 70%);
    animation: smokeDrift5 28s ease-in-out infinite;
}

.smoke-6 {
    width: 50vw; height: 50vw;
    top: 70%; left: 40%;
    background: radial-gradient(ellipse, rgba(170, 180, 200, 0.16) 0%, transparent 70%);
    animation: smokeDrift6 24s ease-in-out infinite;
}

@keyframes smokeDrift1 {
    0%, 100% { transform: translate(0, 0); opacity: 0.55; }
    25% { transform: translate(10vw, -4vh); opacity: 0.9; }
    50% { transform: translate(18vw, 3vh); opacity: 0.45; }
    75% { transform: translate(6vw, -2vh); opacity: 1; }
}

@keyframes smokeDrift2 {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    30% { transform: translate(-12vw, 6vh); opacity: 0.85; }
    60% { transform: translate(-6vw, -3vh); opacity: 0.55; }
    80% { transform: translate(-15vw, 4vh); opacity: 0.95; }
}

@keyframes smokeDrift3 {
    0%, 100% { transform: translate(0, 0); opacity: 0.6; }
    40% { transform: translate(8vw, -5vh); opacity: 0.4; }
    70% { transform: translate(-4vw, 3vh); opacity: 1; }
}

@keyframes smokeDrift4 {
    0%, 100% { transform: translate(0, 0); opacity: 0.4; }
    35% { transform: translate(-10vw, 7vh); opacity: 0.8; }
    65% { transform: translate(5vw, -4vh); opacity: 0.5; }
    85% { transform: translate(-7vw, 3vh); opacity: 0.9; }
}

@keyframes smokeDrift5 {
    0%, 100% { transform: translate(0, 0); opacity: 0.35; }
    33% { transform: translate(-8vw, -4vh); opacity: 0.75; }
    66% { transform: translate(-14vw, 5vh); opacity: 0.5; }
    85% { transform: translate(-3vw, 2vh); opacity: 0.9; }
}

@keyframes smokeDrift6 {
    0%, 100% { transform: translate(0, 0); opacity: 0.45; }
    30% { transform: translate(6vw, -5vh); opacity: 0.8; }
    55% { transform: translate(-4vw, 3vh); opacity: 0.55; }
    80% { transform: translate(8vw, 2vh); opacity: 0.9; }
}

#particle-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 4; pointer-events: none;
    opacity: 0.6;
}

.scanlines-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 6;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.012) 2px,
        rgba(255, 255, 255, 0.012) 4px
    );
}

/* ==================== VERTICAL LIGHT STREAKS ==================== */
.light-streaks {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

.light-streak {
    position: absolute;
    top: -10%;
    width: 0.5px;
    height: 120%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 0, 128, 0.35) 15%,
        rgba(255, 0, 128, 0.15) 45%,
        rgba(255, 0, 128, 0.05) 75%,
        transparent 100%
    );
    opacity: 0;
    filter: blur(0.5px);
    animation: streakDrift 12s ease-in-out infinite;
}

@keyframes streakDrift {
    0%, 100% { opacity: 0; transform: translateX(0); }
    8% { opacity: 0.6; transform: translateX(1px); }
    16% { opacity: 1; transform: translateX(-1px); }
    30% { opacity: 0.85; transform: translateX(2px); }
    45% { opacity: 0.2; transform: translateX(-2px); }
    60% { opacity: 0; transform: translateX(0); }
    75% { opacity: 0.4; transform: translateX(-1px); }
    88% { opacity: 0.9; transform: translateX(1.5px); }
}

/* ==================== BACKGROUND ATMOSPHERE EFFECTS ==================== */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 2;
}

.bg-glow-1 {
    top: -15%; left: -10%;
    width: 45vw; height: 45vw;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.06) 0%, transparent 70%);
    animation: glowPulse1 20s ease-in-out infinite;
}

.bg-glow-2 {
    bottom: -10%; right: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.04) 0%, transparent 70%);
    animation: glowPulse2 25s ease-in-out infinite;
}

.bg-glow-3 {
    top: 40%; left: 30%;
    width: 30vw; height: 30vw;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.03) 0%, transparent 70%);
    animation: glowPulse3 18s ease-in-out infinite;
}

@keyframes glowPulse1 {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes glowPulse2 {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes glowPulse3 {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

/* ==================== BACKGROUND BREATHING OVERLAY ==================== */
.bg-breathe {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 60% at 50% 50%,
        transparent 0%,
        rgba(5, 5, 8, 0.15) 100%
    );
    animation: bgBreathe 10s ease-in-out infinite;
}

@keyframes bgBreathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ==================== SCROLL COMPRESS TRANSITION ==================== */
.bg-compress-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 7;
    pointer-events: none;
    background: linear-gradient(180deg,
        transparent 0%,
        transparent 50%,
        rgba(5, 5, 8, 0.95) 100%
    );
    opacity: 0;
    transition: opacity 0.05s ease-out;
}

.page-wrapper { position: relative; z-index: 8; }

/* ==================== HERO POSTER ==================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 clamp(24px, 6vw, 100px) clamp(24px, 6vw, 50px);
    position: relative;
}

.hero-title-block {
    margin-bottom: 2vw;
}

.title-line {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    color: #fff;
    line-height: 0.84;
    white-space: nowrap;
    letter-spacing: -0.02em;
    font-size: clamp(5rem, 14vw, 14rem);
    text-shadow: 0 0 40px rgba(5,5,8,0.6);
}

.line-2 {
    margin-left: clamp(2rem, 6vw, 8rem);
    font-size: clamp(4.2rem, 12vw, 12rem);
    opacity: 0.92;
}

.line-3 {
    margin-left: clamp(4rem, 12vw, 16rem);
    font-size: clamp(3.4rem, 10vw, 10rem);
    opacity: 0.78;
}

.title-line .char.ampersand {
    color: #ff0080;
}

.hero-accent {
    width: 1px;
    height: clamp(3rem, 8vw, 6rem);
    background: linear-gradient(to bottom, transparent, rgba(255, 0, 128, 0.25), transparent);
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.hero-accent::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 0, 128, 0.35);
    margin-top: -3px;
    margin-left: -2.5px;
}

.hero-narrative {
    font-size: clamp(0.62rem, 0.8vw, 0.72rem);
    color: rgba(255, 255, 255, 0.18);
    letter-spacing: 0.12em;
    margin-top: clamp(0.8rem, 2vw, 1.5rem);
    line-height: 1.5;
    min-height: 1.2em;
}

.hero-narrative.typing::after {
    content: '|';
    color: rgba(255, 0, 128, 0.6);
    animation: cursorBlink 0.5s step-end infinite;
    margin-left: 2px;
}

/* ==================== TERMINAL RING ==================== */
.accent-ring {
    position: fixed;
    top: 10%; right: -10vw;
    width: 42vw; height: 42vw;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.018);
    z-index: 5;
    pointer-events: none;
    transition: border-color 1.2s ease, box-shadow 1.2s ease, opacity 0.8s ease;
}

.accent-ring::after {
    content: '';
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.012);
    transition: border-color 1s ease;
}

.ring-active.accent-ring {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 60px rgba(255, 0, 128, 0.04), inset 0 0 60px rgba(255, 0, 128, 0.02);
    animation: ringBreathe 5s ease-in-out infinite;
}

.ring-active.accent-ring::after {
    border-color: rgba(255, 255, 255, 0.06);
    animation: ringBreatheInner 5.5s ease-in-out infinite;
}

@keyframes ringBreathe {
    0%, 100% { box-shadow: 0 0 60px rgba(255, 0, 128, 0.04), inset 0 0 60px rgba(255, 0, 128, 0.02); }
    50% { box-shadow: 0 0 90px rgba(255, 0, 128, 0.07), inset 0 0 80px rgba(255, 0, 128, 0.04); }
}

@keyframes ringBreatheInner {
    0%, 100% { border-color: rgba(255, 255, 255, 0.06); }
    50% { border-color: rgba(255, 255, 255, 0.09); }
}

/* Ring flash on channel switch */
.accent-ring.ring-flash {
    box-shadow: 0 0 100px rgba(255, 0, 128, 0.1), inset 0 0 80px rgba(255, 0, 128, 0.06) !important;
    transition: box-shadow 0.1s ease-out;
}

/* Ring scan arcs — two counter-rotating layers */
.ring-scan {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: rgba(255, 0, 128, 0.18);
    border-right-color: rgba(255, 0, 128, 0.05);
    opacity: 0;
    transition: opacity 1.2s ease;
    animation: ringScan 12s linear infinite;
    animation-play-state: paused;
}

.ring-scan-cw {
    animation-name: ringScanCW;
    animation-duration: 18s;
    inset: -4px;
    border-width: 2px;
    border-top-color: rgba(255, 0, 128, 0.1);
    border-left-color: rgba(255, 0, 128, 0.03);
    border-right-color: transparent;
}

.ring-active .ring-scan {
    opacity: 1;
    animation-play-state: running;
}

@keyframes ringScan {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ringScanCW {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Ring indicator dots — slow orbital drift */
.ring-dots {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    transition: transform 1.2s ease;
}

.ring-active .ring-dots {
    animation: ringOrbit 40s linear infinite;
}

@keyframes ringOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ring-dot {
    position: absolute;
    left: 50%; top: 50%;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.ring-dot:nth-child(1) { transform: rotate(205deg) translateY(-21vw); }
.ring-dot:nth-child(2) { transform: rotate(238deg) translateY(-21vw); }
.ring-dot:nth-child(3) { transform: rotate(271deg) translateY(-21vw); }
.ring-dot:nth-child(4) { transform: rotate(304deg) translateY(-21vw); }
.ring-dot:nth-child(5) { transform: rotate(337deg) translateY(-21vw); }

/* Active dot — subdued station pulse */
.ring-dot.active {
    background: #ff0080;
    box-shadow: 0 0 6px rgba(255, 0, 128, 0.5), 0 0 18px rgba(255, 0, 128, 0.2), 0 0 35px rgba(255, 0, 128, 0.08);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 0, 128, 0.5), 0 0 18px rgba(255, 0, 128, 0.2), 0 0 35px rgba(255, 0, 128, 0.08); }
    50% { box-shadow: 0 0 10px rgba(255, 0, 128, 0.7), 0 0 28px rgba(255, 0, 128, 0.3), 0 0 50px rgba(255, 0, 128, 0.14); }
}

/* Radial needle from active dot toward center */
.ring-dot::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 1px; height: 5vw;
    background: linear-gradient(to bottom, rgba(255, 0, 128, 0.3), rgba(255, 0, 128, 0.01));
    transform-origin: center top;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.ring-dot.active::after {
    opacity: 1;
}

/* Ring-to-card connection bridge — ultra-thin diagonal hint */
.accent-ring::before {
    content: '';
    position: fixed;
    bottom: clamp(5rem, 8vw, 7rem);
    left: clamp(150px, 28vw, 280px);
    width: 1px;
    height: clamp(60px, 14vh, 160px);
    background: linear-gradient(180deg,
        rgba(255, 0, 128, 0.06) 0%,
        rgba(255, 0, 128, 0.015) 60%,
        transparent 100%
    );
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.ring-active.accent-ring::before {
    opacity: 1;
}

/* ==================== PORTALS — Terminal Channel Selector ==================== */
.portals-section {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 0 clamp(24px, 6vw, 100px);
    position: relative;
}

.portals-row {
    width: 100%;
}

.portals-line {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 1.8rem);
    padding: clamp(2rem, 4vw, 3.5rem) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    width: 100%;
    position: relative;
}

.portals-label {
    font-size: clamp(0.58rem, 0.75vw, 0.68rem);
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    min-width: 4em;
    text-shadow: 0 1px 8px rgba(5,5,8,0.5);
}

.portals-list {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2rem);
    flex: 1;
}

.portal {
    font-size: clamp(0.85rem, 1.15vw, 1.15rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.12);
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.5s ease, opacity 0.5s ease;
    position: relative;
    background: none; border: none; outline: none;
    font-family: inherit;
    padding: 4px 0;
    text-shadow: none;
}

.portal::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--pl-color, #ff0080);
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portal.channel-active {
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 8px rgba(5,5,8,0.4);
    pointer-events: auto;
}

.portal.channel-active::after {
    width: 100%;
}

.portal .portal-desc {
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 6px;
    font-size: clamp(0.48rem, 0.55vw, 0.54rem);
    color: var(--pl-color, #ff0080);
    letter-spacing: 0.15em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.portal.channel-active .portal-desc {
    opacity: 0.75;
}

.portal[data-type="guest"]     { --pl-color: #8e99a3; }
.portal[data-type="family"]    { --pl-color: #ff4d4d; }
.portal[data-type="recruiter"] { --pl-color: #00e5ff; }
.portal[data-type="fan"]       { --pl-color: #fb7299; }
.portal[data-type="admin"]     { --pl-color: #69f0ae; }

/* ==================== IDENTITY HEADING ==================== */
.identity-heading {
    position: absolute;
    bottom: clamp(23rem, 62vh, 42rem);
    left: clamp(24px, 6vw, 100px);
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.portals-section.visible .identity-heading {
    opacity: 1;
}

.identity-cn {
    display: block;
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: clamp(0.3rem, 0.8vh, 0.6rem);
    text-shadow: 0 1px 8px rgba(5,5,8,0.5);
}

.identity-en {
    display: block;
    font-size: clamp(1.1rem, 1.3vw, 1.24rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.18);
    letter-spacing: 0.08em;
}

.identity-cn.typing::after,
.identity-en.typing::after {
    content: '|';
    color: rgba(255, 0, 128, 0.6);
    animation: cursorBlink 0.5s step-end infinite;
    margin-left: 2px;
}

/* ==================== CHANNEL CARD — Industrial Terminal Plate ==================== */
.channel-card-wrap {
    position: absolute;
    bottom: clamp(5rem, 8vw, 7rem);
    left: clamp(24px, 6vw, 100px);
    width: clamp(460px, 70vw, 900px);
    height: clamp(300px, 46vh, 540px);
    z-index: 2;
    opacity: 0;
    transform: none;
    perspective: 1200px;
    transition: opacity 0.8s ease 0.1s;
}

.portals-section.visible .channel-card-wrap {
    opacity: 1;
}

.channel-card-inner {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.channel-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: clamp(2.5rem, 4vh, 4rem) clamp(2.5rem, 3.5vw, 4.5rem);
    background: rgba(14, 14, 20, 0.9);
    overflow: hidden;
}

/* Corner brackets — larger, more legible */
.channel-card-face::before,
.channel-card-face::after {
    content: '';
    position: absolute;
    width: clamp(24px, 3.5vw, 36px);
    height: clamp(24px, 3.5vw, 36px);
    pointer-events: none;
    transition: border-color 0.5s ease, opacity 0.5s ease, box-shadow 0.5s ease;
}

.channel-card-face::before {
    top: 0; left: 0;
    border-top: 1.5px solid rgba(255, 255, 255, 0.1);
    border-left: 1.5px solid rgba(255, 255, 255, 0.1);
}

.channel-card-face::after {
    bottom: 0; right: 0;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.08);
    border-right: 1.5px solid rgba(255, 255, 255, 0.08);
}

/* Flowing gray lines — subtle animated background texture */
.card-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 20px,
        rgba(255, 255, 255, 0.012) 20px,
        rgba(255, 255, 255, 0.012) 21px
    );
}

.card-lines::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 60px,
        rgba(255, 255, 255, 0.008) 60px,
        rgba(255, 255, 255, 0.008) 61px
    );
}

.card-lines::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 200%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.015) 30%,
        rgba(255, 255, 255, 0.015) 35%,
        transparent 65%
    );
    animation: linesDrift 20s linear infinite;
}

@keyframes linesDrift {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}

.card-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.card-glow::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, rgba(255, 0, 128, 0.25), transparent 40%, transparent 70%, rgba(255, 255, 255, 0.03));
    opacity: 0.6;
}

.card-glow::after {
    content: '';
    position: absolute;
    right: 0; top: 20%;
    width: 1px; height: 30%;
    background: linear-gradient(180deg, transparent, rgba(255, 0, 128, 0.12), transparent);
    opacity: 0.4;
}

.card-active .card-glow,
.card-beam-flash .card-glow {
    opacity: 1;
}

/* SELECT & ACCESS badge — right edge */
.card-badge {
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.52rem, 0.6vw, 0.58rem);
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: 0.2em;
    line-height: 1.7;
    padding: clamp(8px, 1.5vh, 14px) clamp(6px, 1vw, 10px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.5s ease, border-color 0.5s ease;
    pointer-events: none;
}

.card-active .card-badge {
    color: rgba(255, 255, 255, 0.25);
    border-right-color: rgba(255, 0, 128, 0.2);
}

.card-beam-flash .card-badge {
    color: rgba(255, 0, 128, 0.45);
    border-right-color: rgba(255, 0, 128, 0.4);
}

.card-index {
    font-family: 'Courier New', monospace;
    font-size: clamp(0.62rem, 0.75vw, 0.7rem);
    color: rgba(255, 255, 255, 0.14);
    letter-spacing: 0.28em;
    margin-bottom: clamp(0.6rem, 1.5vh, 1rem);
    text-shadow: 0 1px 4px rgba(5,5,8,0.4);
    transition: color 0.5s ease;
    position: relative;
    z-index: 1;
}

.card-chname {
    font-family: 'Inter', 'PingFang SC', sans-serif;
    font-size: clamp(4rem, 8vw, 7.5rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.04);
    letter-spacing: 0.03em;
    line-height: 1;
    transition: color 0.7s ease, text-shadow 0.7s ease;
    text-shadow: none;
    margin-bottom: clamp(0.5rem, 1vh, 1rem);
    position: relative;
    z-index: 1;
}

.card-divider {
    width: clamp(80px, 10vw, 150px);
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 0, 128, 0.15), transparent);
    margin-bottom: clamp(0.8rem, 2vh, 1.5rem);
    transition: background 0.5s ease;
    position: relative;
    z-index: 1;
}

.card-chdesc {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.68rem, 0.85vw, 0.8rem);
    color: rgba(255, 255, 255, 0.12);
    letter-spacing: 0.35em;
    text-align: left;
    line-height: 1.5;
    font-weight: 300;
    transition: color 0.5s ease;
    position: relative;
    z-index: 1;
}

/* Card active state — terminal plate energizes */
.channel-card-wrap.card-active .card-chname {
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 0 100px rgba(255, 0, 128, 0.12), 0 0 200px rgba(255, 0, 128, 0.04);
}

.channel-card-wrap.card-active .card-index {
    color: rgba(255, 0, 128, 0.5);
}

.channel-card-wrap.card-active .card-chdesc {
    color: rgba(255, 255, 255, 0.42);
}

.channel-card-wrap.card-active .card-divider {
    background: linear-gradient(90deg, rgba(255, 0, 128, 0.5), transparent);
}

/* Active edges — corner brackets glow */
.channel-card-wrap.card-active .channel-card-face::before {
    border-top-color: rgba(255, 255, 255, 0.22);
    border-left-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 12px rgba(255, 0, 128, 0.08);
}

.channel-card-wrap.card-active .channel-card-face::after {
    border-bottom-color: rgba(255, 0, 128, 0.25);
    border-right-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 12px rgba(255, 0, 128, 0.06);
}

/* Beam sweep — ring energizes the terminal plate with magenta flash */
.channel-card-wrap.card-beam-flash {
    animation: terminalEnergize 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes terminalEnergize {
    0% {
        box-shadow: 0 0 0 0 transparent;
    }
    15% {
        box-shadow: 6px 0 50px rgba(255, 0, 128, 0.22), 14px 0 100px rgba(255, 0, 128, 0.1);
    }
    50% {
        box-shadow: 3px 0 30px rgba(255, 0, 128, 0.12), 8px 0 60px rgba(255, 0, 128, 0.05);
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

.channel-card-wrap.card-beam-flash .channel-card-face::before {
    border-top-color: rgba(255, 0, 128, 0.3);
    border-left-color: rgba(255, 0, 128, 0.3);
}

.channel-card-wrap.card-beam-flash .channel-card-face::after {
    border-bottom-color: rgba(255, 0, 128, 0.4);
    border-right-color: rgba(255, 0, 128, 0.2);
}

.channel-card-wrap.card-beam-flash .card-lines {
    opacity: 0.45;
}

.channel-card-wrap.card-beam-flash .card-lines::after {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 0, 128, 0.03) 30%,
        rgba(255, 0, 128, 0.03) 35%,
        transparent 65%
    );
}

/* Card back face */
.channel-card-back {
    transform: rotateY(180deg);
    background: rgba(14, 14, 20, 0.94);
}

.card-back-pattern {
    width: 70%; height: 60%;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(255, 255, 255, 0.012) 8px, rgba(255, 255, 255, 0.012) 9px);
    opacity: 0.4;
}

/* ==================== CHAT PANEL ==================== */
.chat-panel {
    position: fixed;
    right: 11vw;
    top: calc(10vh + 21vw + 14vh);
    transform: translate(50%, -50%);
    width: clamp(180px, 20vw, 300px);
    height: clamp(100px, 14vh, 180px);
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Courier', 'Courier New', 'Consolas', monospace;
    font-size: clamp(0.55rem, 0.65vw, 0.62rem);
    line-height: 1.5;
    scrollbar-width: none;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.chat-panel::-webkit-scrollbar { display: none; }

.chat-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.chat-line {
    padding: 2px 0;
    animation: chatFadeIn 0.15s ease;
}

@keyframes chatFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.chat-line.examiner {
    color: rgba(255, 255, 255, 0.25);
    text-align: right;
    padding-right: 6px;
}

.chat-line.answer {
    color: rgba(255, 0, 128, 0.55);
    text-align: right;
    padding-right: 14px;
}

.chat-line.typing .chat-cursor {
    display: inline-block;
    width: 1px; height: 1em;
    background: rgba(255, 0, 128, 0.7);
    margin-left: 1px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.45s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
/* ==================== FOOTER ==================== */
.site-footer {
    padding: clamp(2rem, 4vw, 3.5rem) clamp(24px, 6vw, 100px) clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 8px;
}

.footer-link {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    text-decoration: none;
    outline: none;
    font-family: inherit;
    border: none;
}

.footer-link:hover {
    color: #ff0080;
}

.footer-legal {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.62rem;
    line-height: 1.4;
    text-align: right;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color 0.25s;
}

.footer-legal a:hover { color: #ff0080; }

.footer-legal img {
    display: inline-block;
    vertical-align: middle;
    width: 10px; height: 10px;
    margin-right: 1px;
}

/* ==================== MODAL ==================== */
.neon-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.neon-modal.active { display: flex; }

.neon-modal-content {
    background: #0a0a12;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    padding: 40px 36px 36px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.neon-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px; line-height: 1;
    outline: none; font-family: inherit;
}

.neon-modal-close:hover { color: #fff; }

.neon-modal-title {
    font-size: 1.25rem; font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    text-align: left;
    letter-spacing: 0.02em;
}

.neon-modal-desc {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    text-align: left;
    margin-bottom: 26px;
}

.neon-input-group { margin-bottom: 12px; }

.neon-input-label {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.neon-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.neon-input:focus {
    border-color: #ff0080;
    background: rgba(255, 0, 128, 0.03);
}

.neon-input::placeholder { color: rgba(255, 255, 255, 0.2); }

.neon-submit {
    width: 100%;
    padding: 11px;
    background: #ff0080;
    border: none;
    border-radius: 0;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    letter-spacing: 0.06em;
    margin-top: 6px;
    font-family: inherit;
    outline: none;
}

.neon-submit:hover { background: #cc0066; }

.neon-error { color: #ff4d4d; font-size: 0.78rem; text-align: left; margin-top: 10px; display: none; }
.neon-success { color: #69f0ae; font-size: 0.78rem; text-align: left; margin-top: 10px; display: none; }

.social-message {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.4;
    margin: 4px 0 20px;
    word-break: break-all;
}

.social-ok-btn {
    display: block;
    padding: 9px 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    outline: none;
}

.social-ok-btn:hover { border-color: #ff0080; color: #fff; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .title-line { font-size: clamp(3.5rem, 11vw, 10rem); }
    .line-2 { font-size: clamp(3rem, 9.5vw, 8rem); margin-left: clamp(1.2rem, 4vw, 4rem); }
    .line-3 { font-size: clamp(2.4rem, 8vw, 6rem); margin-left: clamp(2.4rem, 8vw, 8rem); }

    .portals-line { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .site-footer { flex-direction: column; align-items: flex-start; }
    .footer-legal { text-align: left; }
    .accent-ring { opacity: 0.4; right: -20vw; width: 50vw; height: 50vw; }
    .channel-card-wrap { width: clamp(260px, 55vw, 440px); height: clamp(180px, 28vh, 300px); bottom: clamp(3rem, 6vw, 5rem); }
    .card-chname { font-size: clamp(1.6rem, 4vw, 3rem); }
    .accent-ring::before { display: none; }
}

@media (max-width: 480px) {
    .hero-section { justify-content: flex-end; padding-bottom: 30px; }
    .portals-list { gap: 0.8rem; }
    .portal { font-size: 0.8rem; }
    .neon-modal-content { padding: 28px 20px 24px; }
    .accent-ring { display: none; }
    .channel-card-wrap { display: none; }
    .chat-panel { display: none; }
}
