/* ===== 星空页面 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #010104; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", SimHei, Arial, sans-serif;
    color: #dfe8ff;
    -webkit-tap-highlight-color: transparent;
}
#starryCanvas { display: block; position: fixed; inset: 0; width: 100%; height: 100%; cursor: grab; }

/* 顶部 UI */
.starry-ui {
    position: fixed; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px;
    pointer-events: none;
}
.starry-back {
    pointer-events: auto;
    color: #cfe2ff; font-size: 14px; text-decoration: none;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
    padding: 6px 14px; border-radius: 20px; backdrop-filter: blur(4px);
    transition: all .2s;
}
.starry-back:hover { color: #fff; background: rgba(255,255,255,.14); text-decoration: none; }
.starry-title { font-size: 18px; font-weight: 700; letter-spacing: 2px; color: #eaf1ff; text-shadow: 0 0 12px rgba(120,170,255,.6); }

/* 操作提示 */
.starry-hint {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 10;
    font-size: 12px; color: rgba(207,226,255,.7);
    background: rgba(10,16,32,.5); border: 1px solid rgba(255,255,255,.12);
    padding: 6px 16px; border-radius: 20px; white-space: nowrap;
    transition: opacity 1s ease; pointer-events: none;
}

/* 悬停标题 */
.starry-tip {
    position: fixed; z-index: 20; display: none; max-width: 360px;
    font-size: 13px; line-height: 1.5; color: #fff;
    background: rgba(12,20,40,.92); border: 1px solid rgba(140,180,255,.45);
    border-radius: 8px; padding: 8px 12px; pointer-events: none;
    box-shadow: 0 6px 24px rgba(0,0,0,.5);
}

/* 星系图例 */
.starry-legend {
    position: fixed; right: 16px; top: 60px; z-index: 10;
    display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
    pointer-events: none;
}
.starry-legend-item { font-size: 12px; color: rgba(207,226,255,.85); display: inline-flex; align-items: center; gap: 6px; }
.starry-legend-item i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }

@media (max-width: 768px) {
    .starry-title { font-size: 15px; }
    .starry-hint { font-size: 11px; bottom: 16px; padding: 5px 12px; }
    .starry-legend { top: 54px; right: 12px; }
}

/* 左下角状态 */
.starry-hud {
    position: fixed; left: 16px; bottom: 16px; z-index: 10;
    font-size: 11px; color: rgba(180,205,255,.55); pointer-events: none;
}

/* 环境音/全屏按钮 */
.starry-actions { margin-left: auto; display: flex; gap: 8px; }
.starry-audio {
    pointer-events: auto;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
    color: #dfe8ff; font-size: 16px; line-height: 1; cursor: pointer; backdrop-filter: blur(4px);
    transition: background .2s;
}
.starry-audio:hover { background: rgba(255,255,255,.16); }

/* 信息卡 */
.starry-card {
    position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
    display: none; z-index: 30; width: min(460px, calc(100vw - 40px));
    background: rgba(10,16,32,.94); border: 1px solid rgba(140,180,255,.4);
    border-radius: 12px; padding: 16px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.6);
    color: #eaf1ff; backdrop-filter: blur(6px);
}
.starry-card .sc-title { font-size: 16px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; }
.starry-card .sc-desc { font-size: 13px; color: rgba(207,226,255,.8); line-height: 1.7; margin-bottom: 12px; }
.starry-card .sc-actions { display: flex; align-items: center; gap: 12px; }
.starry-card .sc-open { color: #7fb2ff; font-size: 14px; text-decoration: none; }
.starry-card .sc-open:hover { color: #fff; text-decoration: underline; }
.starry-card .sc-close { margin-left: auto; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #cfd9ee; font-size: 13px; padding: 5px 14px; border-radius: 16px; cursor: pointer; }
.starry-card .sc-close:hover { background: rgba(255,255,255,.16); color: #fff; }

@media (max-width: 768px) {
    .starry-card { bottom: 72px; }
}

/* 搜索 + 导览 */
.starry-tools {
    position: fixed; left: 16px; top: 58px; z-index: 12;
    display: flex; gap: 8px; align-items: center;
}
.starry-search {
    width: 150px; height: 34px; padding: 0 12px; border-radius: 17px;
    background: rgba(10,16,32,.6); border: 1px solid rgba(140,180,255,.3);
    color: #eaf1ff; font-size: 13px; outline: none; backdrop-filter: blur(4px);
}
.starry-search::placeholder { color: rgba(180,205,255,.5); }
.starry-search:focus { border-color: rgba(140,180,255,.7); }
.starry-btn {
    height: 34px; padding: 0 14px; border-radius: 17px; cursor: pointer;
    background: rgba(10,16,32,.6); border: 1px solid rgba(140,180,255,.3);
    color: #cfe2ff; font-size: 13px; backdrop-filter: blur(4px);
}
.starry-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.starry-btn.on { background: rgba(120,170,255,.5); color: #fff; border-color: rgba(140,180,255,.8); }

/* 小地图雷达 */
.starry-minimap {
    position: fixed; right: 16px; bottom: 16px; z-index: 12;
    width: 132px; height: 132px; border-radius: 50%; cursor: crosshair;
    background: rgba(8,12,24,.5); border: 1px solid rgba(140,180,255,.28);
    backdrop-filter: blur(4px);
}
.starry-card .sc-share { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #cfd9ee; font-size: 13px; padding: 5px 14px; border-radius: 16px; cursor: pointer; }
.starry-card .sc-share:hover { background: rgba(255,255,255,.16); color: #fff; }

@media (max-width: 768px) {
    .starry-tools { top: 54px; left: 12px; }
    .starry-search { width: 110px; }
    .starry-minimap { width: 96px; height: 96px; right: 12px; bottom: 12px; }
}
