@font-face {
    font-family: 'Noto Sans SC';
    src: url('assets/vendor/fonts/noto-sans-sc-400.woff2') format('woff2');
    font-weight: 300 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans SC';
    src: url('assets/vendor/fonts/noto-sans-sc-600.woff2') format('woff2');
    font-weight: 500 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans SC';
    src: url('assets/vendor/fonts/noto-sans-sc-800.woff2') format('woff2');
    font-weight: 700 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('assets/vendor/fonts/jetbrains-mono-400.woff2') format('woff2');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('assets/vendor/fonts/jetbrains-mono-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #111111;
    --container-bg: #050505;
    --brand-emerald: #00ffcc;
    --brand-emerald-dim: rgba(0, 255, 204, 0.2);
    --card-bg: rgba(10, 14, 12, 0.6);
    --card-border: rgba(0, 255, 204, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --font-data: 'JetBrains Mono', monospace;
    --font-zh: 'Noto Sans SC', sans-serif;
    --modal-fit-scale: 1;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-zh);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    /* 大幅降低遮罩透明度，让 8K 深空光云背景图清晰可见 */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%), 
        url('bg.png');
    background-image:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%),
        image-set(
            url('bg.webp') type('image/webp'),
            url('bg.png') type('image/png')
        );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.return-login-btn {
    position: fixed;
    top: 28px;
    right: 34px;
    z-index: 32;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 14px 0 12px;
    border: 1px solid rgba(223, 179, 107, 0.42);
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(16, 18, 18, 0.72), rgba(7, 9, 10, 0.86));
    color: rgba(245, 220, 172, 0.9);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22), inset 0 0 18px rgba(223, 179, 107, 0.06);
    font-family: var(--font-zh);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-decoration: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.return-login-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 205, 126, 0.72);
    color: #ffe3a4;
    background: linear-gradient(135deg, rgba(33, 28, 18, 0.82), rgba(8, 10, 11, 0.9));
}

.return-login-btn:active {
    transform: translateY(0);
}

.return-login-btn svg {
    flex: 0 0 auto;
}

/* 左上角标题 */
.header-text {
    position: absolute;
    top: 50px;
    left: 60px;
    z-index: 10;
}

.header-text h1 {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.header-text p {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* ====================
   CARD CONTAINER
   ==================== */
.card-container {
    position: absolute;
    bottom: 12%; 
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 20;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    /* 加入3D透视引擎，保证通行碑能随鼠标呈现惊艳的三维偏转 */
    perspective: 1200px;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-container.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: none; /* Let clicks pass through the container's empty space */
}
.card-container.active .elite-pass {
    pointer-events: auto; /* Enable clicking only on the card itself */
}

/* ====================
   ELITE STATUS PASS UI
   ==================== */
.elite-pass {
    position: relative;
    width: 440px;
    height: 280px;
    border-radius: 8px; /* Slightly smoother for glass aesthetics */
    padding: 35px 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden; /* 防止扫描光效溢出边界 */
    
    /* 核心玻璃质感：加倍模糊 + 增强底层饱和度透射 */
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    
    /* 极致清透的物理折射基础 */
    background: rgba(20, 20, 25, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* 取消针对 transform 的延迟平滑，实现指尖级别的极速3D跟随。保留色彩渐变 */
    transition: opacity 0.5s ease, background 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease, width 0.4s ease, height 0.4s ease;
    will-change: transform;
    cursor: pointer; /* 提示可以点击放大把玩 */
}

/* Examine Mode Overlay */
.examine-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
body.examine-active .examine-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Examine Mode Typography & Glow */
.examine-welcome-text {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, 20px);
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
    pointer-events: none;
    width: 100%;
}
body.examine-active .examine-welcome-text {
    opacity: 1;
    transform: translate(-50%, 0);
}

.examine-welcome-sub {
    font-size: 14px;
    letter-spacing: 6px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
    font-family: var(--font-zh);
}

.examine-welcome-title {
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: 4px;
    font-weight: 300;
    font-family: var(--font-data);
}

/* Base glow */
.examine-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(100vw, 900px);
    height: min(100vw, 900px);
    border-radius: 50%;
    filter: blur(80px);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1s ease;
    mix-blend-mode: color-dodge;
    pointer-events: none;
    z-index: 1;
}

@keyframes slow-pulse {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.85); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* Tier specific styles */
.examine-overlay.examine-card-blackgold .examine-bg-glow {
    background: radial-gradient(circle, rgba(223, 179, 107, 0.6) 0%, rgba(183, 139, 67, 0.2) 40%, transparent 75%);
    opacity: 1;
    animation: slow-pulse 4s infinite alternate ease-in-out;
}
.examine-overlay.examine-card-blackgold .examine-welcome-title {
    color: #dfb36b;
    text-shadow: 0 0 40px rgba(223, 179, 107, 0.8), 0 0 10px rgba(255, 255, 255, 0.5);
}

.examine-overlay.examine-card-platinum .examine-bg-glow {
    background: radial-gradient(circle, rgba(201, 209, 219, 0.6) 0%, rgba(151, 169, 189, 0.2) 40%, transparent 75%);
    opacity: 1;
    animation: slow-pulse 4s infinite alternate ease-in-out;
}
.examine-overlay.examine-card-platinum .examine-welcome-title {
    color: #c9d1db;
    text-shadow: 0 0 40px rgba(201, 209, 219, 0.8), 0 0 10px rgba(255, 255, 255, 0.5);
}

.examine-overlay.examine-card-gold .examine-bg-glow {
    background: radial-gradient(circle, rgba(212, 155, 60, 0.6) 0%, rgba(172, 115, 20, 0.2) 40%, transparent 75%);
    opacity: 1;
    animation: slow-pulse 4s infinite alternate ease-in-out;
}
.examine-overlay.examine-card-gold .examine-welcome-title {
    color: #d49b3c;
    text-shadow: 0 0 40px rgba(212, 155, 60, 0.8), 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Elevate the parent container's stacking context AND make it full screen */
.card-container.examine-mode {
    z-index: 1001;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    opacity: 1 !important;
    pointer-events: none;
    transform: none !important; /* override translateX/Y */
    align-items: center;
    justify-content: center;
}

/* Examine Mode Card */
.elite-pass.examine-mode {
    position: relative; /* Let flexbox handle centering */
    top: auto;
    left: auto;
    z-index: 1001;
    margin: 0 !important;
    cursor: grab;
    pointer-events: auto !important; 
    box-shadow: 0 80px 150px rgba(0, 0, 0, 0.9), 0 20px 50px rgba(0, 0, 0, 0.5);
}
.elite-pass.examine-mode:active {
    cursor: grabbing;
}
.examine-close-btn:hover {
    color: #dfb36b !important;
}

.pass-glare {
    position: absolute;
    top: 0; left: -150%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    transform: skewX(-30deg);
    animation: glare-sweep 6s infinite;
    z-index: 10;
    pointer-events: none;
}
@keyframes glare-sweep {
    0% { left: -150%; }
    15% { left: 200%; }
    100% { left: 200%; }
}

.pass-watermark {
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 240px;
    height: 240px;
    opacity: 0.08; /* Extremely subtle */
    z-index: 1;
    pointer-events: none;
}
.watermark-svg { width: 100%; height: 100%; }

/* --- TIER COLORS --- */

/* --- TIER COLORS (GLASSMORPHIC) --- */

/* BLACK GOLD - Obsidian monolithic space & pure gold */
.card-blackgold {
    background: linear-gradient(135deg, rgba(20, 15, 5, 0.7) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.85) 100%), url('assets/blackgold_bg.png') center/cover no-repeat;
    background: linear-gradient(135deg, rgba(20, 15, 5, 0.7) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.85) 100%), image-set(url('assets/blackgold_bg.webp') type('image/webp'), url('assets/blackgold_bg.png') type('image/png')) center/cover no-repeat;
    border: 1.5px solid rgba(223, 179, 107, 0.6);
    border-top-color: rgba(255, 230, 160, 0.9);
    border-left-color: rgba(223, 179, 107, 0.8);
    box-shadow: inset 0 0 80px rgba(223, 179, 107, 0.15), 0 30px 80px rgba(0,0,0,0.8), 0 0 40px rgba(223, 179, 107, 0.3);
    color: #dfb36b;
}
/* 顶级烫金动画效果 */
.card-blackgold .pass-rank, .card-blackgold .id-value {
    background: linear-gradient(110deg, #dfb36b 0%, #fff2c8 25%, #dfb36b 50%, #b88645 75%, #dfb36b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: foil-shine 3s linear infinite;
    filter: drop-shadow(0 4px 15px rgba(223, 179, 107, 0.4));
}
.card-blackgold .pass-watermark { color: #dfb36b; }
.card-blackgold .pass-signature, .card-blackgold .id-prefix { color: rgba(223, 179, 107, 0.8); font-weight: bold; }
.card-blackgold .sub-node { 
    border: 1px solid rgba(223, 179, 107, 0.6); 
    background: rgba(223, 179, 107, 0.15);
    color: #ffe0a3;
    box-shadow: 0 0 10px rgba(223, 179, 107, 0.2);
}

/* PLATINUM - Deep metallic silver & cold titanium */
.card-platinum {
    background: linear-gradient(135deg, rgba(10, 15, 25, 0.6) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.8) 100%), url('assets/platinum_bg.png') center/cover no-repeat;
    background: linear-gradient(135deg, rgba(10, 15, 25, 0.6) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.8) 100%), image-set(url('assets/platinum_bg.webp') type('image/webp'), url('assets/platinum_bg.png') type('image/png')) center/cover no-repeat;
    border: 1px solid rgba(201, 209, 219, 0.4);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-left-color: rgba(201, 209, 219, 0.6);
    box-shadow: inset 0 0 60px rgba(180, 190, 205, 0.12), 0 30px 80px rgba(0,0,0,0.7), 0 0 20px rgba(180, 190, 205, 0.15);
    color: #c9d1db;
}
/* 次级白金闪光效果，稍微柔和 */
.card-platinum .pass-rank, .card-platinum .id-value {
    background: linear-gradient(110deg, #c9d1db 0%, #ffffff 25%, #88c0d0 50%, #c9d1db 75%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: foil-shine 5s linear infinite reverse;
    filter: drop-shadow(0 4px 10px rgba(201, 209, 219, 0.3));
}
.card-platinum .pass-watermark { color: #c9d1db; }
.card-platinum .pass-signature, .card-platinum .id-prefix { color: rgba(201, 209, 219, 0.7); }
.card-platinum .sub-node { 
    border: 1px solid rgba(201, 209, 219, 0.5); 
    background: rgba(201, 209, 219, 0.1);
    color: #e2e8f0;
}

/* GOLD - Bright amber and luxurious frosted gold */
.card-gold {
    background: linear-gradient(135deg, rgba(30, 15, 0, 0.6) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.8) 100%), url('assets/gold_bg.png') center/cover no-repeat;
    background: linear-gradient(135deg, rgba(30, 15, 0, 0.6) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.8) 100%), image-set(url('assets/gold_bg.webp') type('image/webp'), url('assets/gold_bg.png') type('image/png')) center/cover no-repeat;
    border: 1px solid rgba(212, 155, 60, 0.3);
    border-top-color: rgba(212, 155, 60, 0.5);
    border-left-color: rgba(212, 155, 60, 0.3);
    box-shadow: inset 0 0 40px rgba(212, 155, 60, 0.05), 0 30px 80px rgba(0,0,0,0.6);
    color: #d49b3c;
}
/* 普通金卡哑光金属质感，无动态流光动画，体现等级差异 */
.card-gold .pass-rank, .card-gold .id-value {
    background: linear-gradient(110deg, #d49b3c 0%, #ffdf91 50%, #b57c2a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 5px rgba(212, 155, 60, 0.2));
}
.card-gold .pass-watermark { color: #d49b3c; }
.card-gold .pass-signature, .card-gold .id-prefix { color: rgba(212, 155, 60, 0.6); }
.card-gold .sub-node { 
    border: 1px solid rgba(212, 155, 60, 0.3); 
    background: rgba(212, 155, 60, 0.05);
    color: #e0ac53;
}

@keyframes foil-shine {
    to { background-position: 200% center; }
}

/* Common Layout Details */
.pass-header, .pass-body, .pass-footer { 
    z-index: 5; 
    position: relative; 
}

.pass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.pass-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    letter-spacing: 4px;
    font-weight: 700;
    font-family: var(--font-data);
}
.pass-rank {
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 600;
    font-family: var(--font-data);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    backdrop-filter: blur(5px);
}

.pass-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 15px;
}
.pass-id-wrap {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.id-prefix {
    font-size: 14px;
    letter-spacing: 2px;
    font-family: var(--font-data);
}
.id-value {
    font-size: 52px; /* Giant identity number */
    font-weight: 200;
    letter-spacing: 6px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.4);
}
.name-value {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 3px;
    margin-top: -5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.font-mono {
    font-family: var(--font-data);
}

.pass-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.pass-subjects {
    display: flex;
    gap: 8px;
}
.sub-node {
    font-size: 12px;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 2px;
    white-space: nowrap;
}
.pass-signature {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 2px;
}

/* ====================
   SEARCH HUB UI
   ==================== */
.search-container {
    position: absolute;
    right: 50px;
    bottom: 50px;
    display: flex;
    align-items: center;
    background: rgba(10, 12, 18, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 4px;
    padding: 2px 5px;
    z-index: 30;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.search-container:focus-within {
    border-color: rgba(223, 179, 107, 0.6);
    box-shadow: 0 0 25px rgba(223, 179, 107, 0.15), 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(10, 12, 18, 0.8);
}
#search-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-zh);
    font-size: 13px;
    padding: 12px 16px;
    width: 220px;
    outline: none;
    letter-spacing: 1px;
    transition: color 0.3s;
}
#search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
#search-input.error {
    animation: shake-err 0.4s;
    color: #ff4444;
}
#search-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}
#search-btn:hover {
    color: #dfb36b;
}

@keyframes shake-err {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ====================
   MEMBER STATS UI
   ==================== */
.member-stats {
    margin-top: 30px;
    display: inline-flex;
    flex-direction: column;
    background: linear-gradient(90deg, rgba(223, 179, 107, 0.1) 0%, transparent 100%);
    border-left: 2px solid rgba(223, 179, 107, 0.6);
    padding: 8px 20px;
    animation: fade-in 1.5s ease-out;
}
.stat-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(223, 179, 107, 0.7);
    font-family: var(--font-data);
}
.stat-value {
    font-size: 32px;
    font-weight: 300;
    color: #dfb36b;
    letter-spacing: 2px;
    font-family: var(--font-data);
}
@keyframes fade-in {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ====================
   PREMIUM CTA BUTTON
   ==================== */
.cta-container {
    position: relative;
    margin-top: 15px; /* Shrink margin to tuck it neatly below */
    z-index: 50;
    display: flex; /* Use regular flex to push it to a new line beneath inline-flex */
    width: max-content; /* Force container to wrap tightly to prevent pulse overflow */
    justify-content: flex-start;
    align-items: center;
    perspective: 1000px;
}

.btn-cta {
    position: relative;
    padding: 8px 20px; /* Reduced padding for a smaller, tighter button */
    background: linear-gradient(135deg, rgba(223, 179, 107, 0.12) 0%, rgba(8, 10, 14, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(223, 179, 107, 0.8);
    border-left: 1px solid rgba(223, 179, 107, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 4px;
    color: #dfb36b;
    font-family: var(--font-zh);
    font-size: 11px; /* Smaller text size */
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px; /* Tighter icon gap */
    box-shadow: 0 10px 20px rgba(0,0,0,0.6), inset 0 0 10px rgba(223, 179, 107, 0.08); /* Reduced shadow spread */
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}

.btn-cta:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), inset 0 0 35px rgba(223, 179, 107, 0.2);
    border-color: rgba(223, 179, 107, 0.9);
    border-right: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.cta-glare {
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-30deg);
    animation: cta-sweep 4s infinite;
}

@keyframes cta-sweep {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.cta-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border: 1.5px solid rgba(223, 179, 107, 0.5);
    border-radius: 4px;
    animation: pulse-ring 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.15, 1.4); opacity: 0; }
}

/* ====================
   MODAL DIALOG UI
   ==================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 5, 8, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal-content {
    background:
        radial-gradient(circle at 18% 0%, rgba(223, 179, 107, 0.12), transparent 30%),
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.05), transparent 24%),
        linear-gradient(145deg, rgba(18, 22, 28, 0.98), rgba(7, 9, 13, 0.98));
    border: 1px solid rgba(223, 179, 107, 0.18);
    border-top: 1px solid rgba(223, 179, 107, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 40px 80px rgba(0,0,0,0.9),
        inset 0 0 45px rgba(223, 179, 107, 0.06);
    border-radius: 8px;
    width: min(720px, calc(100vw - 24px));
    max-width: none;
    padding: clamp(22px, 3.2vh, 34px) clamp(24px, 4.2vw, 44px);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    overscroll-behavior: none;
    touch-action: manipulation;
    transform: translateY(40px) scale(calc(var(--modal-fit-scale, 1) * 0.95));
    transform-origin: center center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-zh);
}
.modal-overlay.active .modal-content {
    transform: translateY(0) scale(var(--modal-fit-scale, 1));
}
.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(255,255,255,0.04), transparent 18%),
        radial-gradient(circle at 50% 0%, rgba(223, 179, 107, 0.08), transparent 45%);
    pointer-events: none;
    z-index: 0;
}
.modal-content > * {
    position: relative;
    z-index: 1;
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    font-family: sans-serif;
    transition: color 0.3s, transform 0.3s;
}
.modal-close:hover {
    color: #dfb36b;
    transform: rotate(90deg);
}
.modal-header {
    padding-bottom: 16px;
    margin-bottom: 18px;
}
.modal-header h3 {
    color: #dfb36b;
    font-size: clamp(18px, 2.3vw, 22px);
    font-weight: 500;
    letter-spacing: 2.8px;
    margin-bottom: 8px;
}
.modal-header p {
    color: rgba(255, 255, 255, 0.28);
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 3.2px;
}
.modal-header::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 16px;
    background: linear-gradient(90deg, rgba(223, 179, 107, 0.55), rgba(255,255,255,0.05), transparent);
}
.modal-body p {
    color: rgba(255,255,255,0.55);
    font-size: 12.5px;
    line-height: 1.58;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.modal-body .highlight-text {
    color: #f6f0e2;
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 2px;
    line-height: 1.7;
}

.benefits-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 12px;
    padding: 14px;
    margin-top: 6px;
    border: 1px solid rgba(223, 179, 107, 0.15);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
        rgba(255,255,255,0.015);
}
.benefit-hero {
    padding: 14px 14px 16px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(223, 179, 107, 0.09), rgba(223, 179, 107, 0.02) 55%, rgba(255,255,255,0.02));
    border: 1px solid rgba(223, 179, 107, 0.16);
}
.benefit-label {
    display: inline-flex;
    align-items: center;
    color: #dfb36b;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.82;
}
.benefit-hero strong {
    display: block;
    color: #fff;
    font-size: 16px;
    line-height: 1.32;
    margin-bottom: 8px;
    letter-spacing: 0.4px;
}
.benefit-hero p {
    margin: 0;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    line-height: 1.66;
}
.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.benefit-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    min-height: 0;
    padding: 12px 12px 12px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}
.benefit-index {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(223, 179, 107, 0.1);
    border: 1px solid rgba(223, 179, 107, 0.22);
    color: #dfb36b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    flex-shrink: 0;
}
.benefit-item strong {
    display: block;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 3px;
}
.benefit-item p {
    margin: 0;
    color: rgba(255,255,255,0.58);
    font-size: 11.5px;
    line-height: 1.5;
}

/* Tier List Styling */
.tier-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tier-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}
.tier-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}
.tier-blackgold {
    border-left: 3px solid #dfb36b;
    background: linear-gradient(90deg, rgba(223, 179, 107, 0.08), transparent);
}
.tier-platinum {
    border-left: 3px solid #c9d1db;
    background: linear-gradient(90deg, rgba(201, 209, 219, 0.08), transparent);
}
.tier-gold {
    border-left: 3px solid #d49b3c;
    background: linear-gradient(90deg, rgba(212, 155, 60, 0.05), transparent);
}
.tier-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: 1px;
}
.tier-blackgold .tier-title { color: #dfb36b; }
.tier-platinum .tier-title { color: #c9d1db; }
.tier-gold .tier-title { color: #d49b3c; }

.tier-title span {
    font-size: 12px;
    font-weight: normal;
    opacity: 0.8;
}
.tier-desc {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.42;
}
.text-bright { color: #ffffff; }
.text-gold { color: #dfb36b; font-weight: bold; }
.text-plat { color: #c9d1db; font-weight: bold; }
.wechat-box {
    margin-top: 14px;
    background:
        linear-gradient(135deg, rgba(223, 179, 107, 0.08), rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.72)),
        rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(223, 179, 107, 0.24);
    border-radius: 8px;
    padding: 15px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.3s, border-color 0.3s, transform 0.2s ease;
}
.wechat-box:hover {
    background:
        linear-gradient(135deg, rgba(223, 179, 107, 0.12), rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.72)),
        rgba(0, 0, 0, 0.62);
    border-color: rgba(223, 179, 107, 0.5);
}
.wechat-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    letter-spacing: 1.2px;
}
.wechat-number {
    color: #dfb36b;
    font-family: var(--font-data);
    font-size: clamp(26px, 4vw, 32px);
    font-weight: bold;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(223, 179, 107, 0.4);
}
.wechat-hint {
    color: rgba(255, 255, 255, 0.56);
    font-size: 11.5px;
    line-height: 1.5;
}

.wechat-box {
    cursor: pointer;
}
.wechat-box:active {
    transform: scale(0.98);
}
.wechat-number-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}
.copy-icon {
    color: rgba(223, 179, 107, 0.4);
    transition: color 0.3s;
    display: flex;
    align-items: center;
}
.wechat-box:hover .copy-icon {
    color: #dfb36b;
}
.wechat-hint.success {
    color: #4CAF50;
    font-weight: bold;
    animation: flash-green 0.3s;
}
@keyframes flash-green {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ====================
   TOUCH + RESPONSIVE STABILITY
   ==================== */
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--bg-color);
}

body {
    position: fixed;
    inset: 0;
    height: var(--app-height, 100vh);
    min-height: 100vh;
    min-height: 100svh;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%),
        url('bg.png');
    background-image:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%),
        image-set(
            url('bg.webp') type('image/webp'),
            url('bg.png') type('image/png')
        );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
    touch-action: none;
}

.main-container {
    height: var(--app-height, 100vh);
    min-height: var(--app-height, 100vh);
}

@supports (height: 100dvh) {
    body,
    .main-container {
        height: var(--app-height, 100dvh);
    }
}

*,
*::before,
*::after {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.main-container,
#particle-canvas {
    touch-action: none;
}

#particle-canvas {
    display: block;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}

body,
button,
.wechat-box,
.modal-close {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

button,
.wechat-box,
.modal-close,
input {
    touch-action: manipulation;
}

button:focus,
input:focus,
.wechat-box:focus,
.modal-close:focus {
    outline: none;
}

button:focus-visible,
input:focus-visible,
.wechat-box:focus-visible,
.modal-close:focus-visible {
    outline: 1px solid rgba(223, 179, 107, 0.7);
    outline-offset: 3px;
}

input {
    -webkit-user-select: text;
    user-select: text;
}

.header-text {
    top: clamp(24px, 5vh, 50px);
    left: clamp(22px, 5vw, 60px);
    max-width: min(420px, calc(100vw - 44px));
}

.header-text h1 {
    font-size: clamp(26px, 3vw, 32px);
    line-height: 1.18;
}

.card-container {
    bottom: clamp(92px, 12vh, 12%);
    padding: 0 20px;
}

.elite-pass {
    width: min(440px, calc(100vw - 40px));
    height: auto;
    min-height: 0;
    aspect-ratio: 11 / 7;
    padding: clamp(22px, 4vw, 35px) clamp(22px, 5vw, 40px);
}

.id-value {
    font-size: clamp(36px, 5.4vw, 52px);
}

.search-container {
    right: clamp(18px, 4vw, 50px);
    bottom: clamp(18px, 5vh, 50px);
}

.modal-content {
    width: min(680px, calc(100vw - 24px));
    max-height: none;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
}

@supports (height: 100dvh) {
    .modal-content {
        max-height: none;
    }
}

@media (hover: none), (pointer: coarse) {
    .btn-cta:hover {
        transform: none;
        color: #dfb36b;
    }

    #search-btn:hover,
    .modal-close:hover,
    .wechat-box:hover .copy-icon {
        color: inherit;
    }
}

@media (min-width: 641px) and (max-width: 1180px) {
    .header-text {
        top: 42px;
        left: 44px;
    }

    .elite-pass {
        width: min(420px, calc(100vw - 80px));
    }

    .search-container {
        right: 34px;
        bottom: 34px;
    }
}

@media (max-width: 640px) {
    .return-login-btn {
        top: 14px;
        right: 14px;
        min-height: 32px;
        padding: 0 10px;
        gap: 5px;
        font-size: 12px;
    }

    .header-text {
        top: 24px;
        left: 22px;
        right: 22px;
    }

    .header-text h1 {
        font-size: clamp(24px, 8vw, 30px);
        letter-spacing: 1px;
        max-width: 10em;
    }

    .header-text p {
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    .member-stats {
        margin-top: 16px;
        padding: 7px 15px;
    }

    .stat-label {
        font-size: 9px;
    }

    .stat-value {
        font-size: 26px;
    }

    .cta-container {
        max-width: 100%;
        margin-top: 12px;
    }

    .btn-cta {
        max-width: 100%;
        padding: 8px 14px;
        font-size: 10.5px;
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .card-container {
        bottom: 96px;
        padding: 0 14px;
    }

    .elite-pass {
        width: min(360px, calc(100vw - 28px));
        aspect-ratio: 1.55 / 1;
        padding: 22px 22px 18px;
    }

    .pass-logo {
        font-size: 12px;
        letter-spacing: 2.4px;
    }

    .pass-rank {
        padding: 3px 7px;
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .id-prefix {
        font-size: 12px;
    }

    .id-value {
        font-size: clamp(34px, 12vw, 46px);
        letter-spacing: 3px;
    }

    .name-value {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .pass-footer {
        gap: 10px;
        padding-top: 12px;
    }

    .pass-subjects {
        flex-wrap: wrap;
        gap: 5px;
    }

    .sub-node {
        padding: 2px 7px;
        font-size: 10px;
        letter-spacing: 0;
    }

    .pass-signature {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .search-container {
        left: 14px;
        right: 14px;
        bottom: 16px;
        width: auto;
    }

    #search-input {
        flex: 1;
        width: auto;
        min-width: 0;
        padding: 12px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .modal-content {
        width: calc(100vw - 24px);
        padding: 24px 18px 18px;
    }

    .modal-header h3 {
        font-size: 17px;
        letter-spacing: 2px;
    }

    .modal-body p {
        font-size: 12px;
        line-height: 1.6;
    }

    .benefits-panel {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 10px;
        margin-top: 8px;
    }

    .benefit-hero {
        padding: 12px;
    }

    .benefit-hero strong {
        font-size: 15px;
    }

    .benefit-item {
        padding: 11px 10px;
    }

    .wechat-box {
        margin-top: 10px;
        padding: 12px 14px;
    }

    .wechat-number {
        font-size: clamp(24px, 8vw, 30px);
        letter-spacing: 2px;
    }
}

@media (max-width: 520px) {
    .return-login-label {
        display: none;
    }

    .return-login-btn {
        top: 12px;
        right: 12px;
        width: 42px;
        min-height: 36px;
        padding: 0;
    }

    .return-login-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .header-text {
        top: 18px;
        left: 24px;
    }

    .header-text h1 {
        font-size: 22px;
        max-width: 12em;
    }

    .header-text p {
        font-size: 11px;
    }

    .member-stats {
        margin-top: 10px;
        padding: 6px 12px;
    }

    .stat-value {
        font-size: 22px;
    }

    .cta-container {
        margin-top: 10px;
    }

    .btn-cta {
        padding: 7px 12px;
        font-size: 10px;
    }

    .card-container {
        left: 56%;
        bottom: 18px;
        width: 44%;
        padding: 0 18px;
    }

    .elite-pass {
        width: min(340px, 100%);
        aspect-ratio: 1.65 / 1;
        padding: 18px 20px;
    }

    .search-container {
        left: 24px;
        right: auto;
        bottom: 18px;
        width: min(240px, 34vw);
    }
}
