/* style.css */
/* ==========================================
   1. 全局深空背景
========================================== */
html, body {
    margin: 0; padding: 0;
    background-color: #010206; /* 极其深邃的午夜蓝黑 */
    font-family: 'Outfit', 'PingFang SC', sans-serif;
    color: #e2e8f0;
    overflow: hidden;
    width: 100%; height: 100%;
    overscroll-behavior-y: none;
}

#universe-canvas {
    position: fixed; z-index: 1;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    cursor: grab;
}
#universe-canvas:active { cursor: grabbing; }

.glow-overlay {
    position: fixed; z-index: 2;
    top: 0; left: 0; right: 0; bottom: 0;
    /* 给屏幕中央增加一种深空紫色的微弱光晕 */
    background-image: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.06) 0%, rgba(0,0,0,0) 75%);
    pointer-events: none; 
}

#labels-container {
    position: fixed; z-index: 5;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
}

/* 更科幻的 HUD 文字设计 */
.constellation-label {
    position: absolute;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.1s ease;
    text-shadow: 0 0 15px rgba(0, 246, 255, 1), 0 0 30px rgba(139, 92, 246, 0.8);
    padding-bottom: 0px;
    text-transform: uppercase;
}

.main-wrapper {
    position: relative; z-index: 10;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding-top: 10vh; min-height: 100vh; box-sizing: border-box; pointer-events: none; 
}

.container { text-align: center; width: 88%; max-width: 800px; padding-bottom: 40px; pointer-events: auto; }
h1 { margin: 0 0 10px 0; line-height: 0; display: flex; justify-content: center; width: 100%; }
.portal-logo { width: 170px; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 4px 15px rgba(0,0,0,0.8)); }

p.subtitle {
    color: #94a3b8; margin-bottom: 50px; font-size: 0.85rem;
    letter-spacing: 6px; text-transform: uppercase; font-weight: 300;
    text-shadow: 0 2px 5px rgba(0,0,0,0.9);
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; justify-content: center; }

.card {
    background: rgba(10, 15, 25, 0.45); 
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08); border-top: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 20px; padding: 26px 10px;
    text-decoration: none; color: white;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    aspect-ratio: 1 / 1.1; overflow: hidden;
    will-change: transform, box-shadow;
}

.card:active { transform: scale(0.96); }

@media (hover: hover) {
    .card:hover {
        transform: translateY(-8px); background: rgba(20, 30, 50, 0.7);
        border-color: rgba(0, 246, 255, 0.5); 
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 246, 255, 0.25);
    }
    .card:hover .icon { transform: scale(1.1); }
}

.icon { 
    font-size: 36px; margin-bottom: 12px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.card h3 { margin: 0 0 6px 0; font-size: 1.05rem; font-weight: 500; color: #ffffff; letter-spacing: 0.5px; }
.card p { margin: 0; font-size: 0.75rem; color: #cbd5e1; font-weight: 300; line-height: 1.4; max-width: 90%; }

@media (min-width: 768px) {
    .main-wrapper { justify-content: center; padding-top: 0; }
    .portal-logo { width: 190px; } 
    p.subtitle { font-size: 0.95rem; margin-bottom: 60px; }
    .grid { gap: 26px; grid-template-columns: repeat(4, 1fr); max-width: 950px; }
    .card { padding: 35px 20px; aspect-ratio: auto; min-height: 170px; }
    .icon { font-size: 42px; margin-bottom: 15px; }
    .card h3 { font-size: 1.2rem; }
    .card p { font-size: 0.85rem; }
}