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


body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: "Noto Sans JP", sans-serif;
}


.scene {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    overflow: hidden;
}



/* 背景 */

.background {

    position: absolute;
    width: 100%;
    height: 100%;

    background-image:
    url("../assets/bg/starry-night.jpg");

    background-size: cover;
    background-position: center;

    filter: brightness(0.65);

}



/* 鼠标灯光（固定在最上层，跨场景通用） */

.light {

    position: fixed;

    z-index: 9999;

    width: 350px;
    height: 350px;

    border-radius: 50%;

    background:
    radial-gradient(
        circle,
        rgba(255,220,120,0.25),
        transparent 70%
    );

    pointer-events: none;

    transform: translate(-50%,-50%);

    transition: opacity .6s ease;
}


/* 内部场景占位（已弃用，保留兼容） */

.interior-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd65c;
    letter-spacing: 4px;
    font-size: 18px;
    background: #0b0a14;
}


/* ====================================
   STARRY 内部场景（第二阶段 v2）
   整张场景图 + 舞台聚光灯 + SVG 热点
   ==================================== */

.scene-interior {
    background: #050409;
    cursor: none; /* 隐藏原生鼠标，用聚光斑代替 */
}

/* 整张场景图 */
.interior-bg {
    position: absolute;
    inset: 0;
    background-image: url("../assets/backgrounds/starry-interior.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* 无图时兜底渐变，避免空白 */
    background-color: #15101a;
    /* 默认稍微压暗，等聚光灯照亮 */
    filter: brightness(0.35) saturate(0.7);
    transition: filter .4s ease;
}

/* 暗化遮罩：被光斑用 mask 挖洞 */
.interior-dark {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    /* mask 用 radial-gradient 在鼠标位置开窗，JS 动态更新 */
    -webkit-mask: radial-gradient(
        circle 200px at 50% 50%,
        transparent 0%,
        rgba(0,0,0,0.5) 55%,
        #000 100%
    );
            mask: radial-gradient(
        circle 200px at 50% 50%,
        transparent 0%,
        rgba(0,0,0,0.5) 55%,
        #000 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* 固定光源点（舞台顶灯） */
.light-source {
    position: absolute;
    top: 6%;
    left: 50%;
    margin-left: -40px; /* 自身宽度一半，替代 translateX 避免与光锥冲突 */
    width: 80px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        #fff6d8 0%,
        #ffd65c 40%,
        transparent 75%
    );
    box-shadow:
        0 0 30px rgba(255,214,92,0.9),
        0 0 60px rgba(255,200,100,0.6),
        0 0 100px rgba(255,180,80,0.3);
    z-index: 3;
    pointer-events: none;
}

/* 光束 SVG：一根线，粗细随距离变化（近细远粗） */
.light-beam-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 3;
    pointer-events: none;
    mix-blend-mode: screen;
}

#light-beam {
    /* 参照第一版光锥：opacity 0.8 + 柔和模糊 */
    opacity: 0.8;
    filter: blur(1.5px);
    transition: stroke-width .1s ease-out;
}

/* 鼠标光斑（聚光落点） */
.light-spot {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255,245,200,0.4) 0%,
        rgba(255,214,92,0.18) 35%,
        transparent 70%
    );
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 4;
    mix-blend-mode: screen;
}


/* ====================================
   SVG 热点层
   ==================================== */

.hotspots {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.hotspot {
    fill: rgba(255,214,92,0);
    stroke: rgba(255,214,92,0);
    stroke-width: 0.3;
    cursor: pointer;
    transition: all .25s ease;
}

.hotspot:hover {
    fill: rgba(255,214,92,0.18);
    stroke: rgba(255,214,92,0.9);
    stroke-width: 0.5;
    filter: drop-shadow(0 0 4px rgba(255,214,92,0.8));
}

/* 热点提示标签 */
.hotspot-tooltip {
    position: absolute;
    z-index: 6;
    padding: 6px 12px;
    background: rgba(10, 8, 18, 0.9);
    border: 1px solid rgba(255,214,92,0.4);
    border-radius: 6px;
    color: #ffd65c;
    font-size: 13px;
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: none;
    transform: translate(-50%, -140%);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hotspot-tooltip[hidden] {
    display: none;
}


/* ====================================
   区域详情弹层（第三阶段填充内容）
   ==================================== */

.zone-detail {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: rgba(5, 4, 12, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.zone-detail[hidden] {
    display: none;
}

.zone-detail-body {
    width: min(820px, 90%);
    max-height: 80vh;
    overflow-y: auto;
    background: linear-gradient(180deg,
        rgba(30, 26, 48, 0.95),
        rgba(15, 13, 28, 0.95));
    border: 1px solid rgba(255, 214, 92, 0.3);
    border-radius: 18px;
    padding: 36px;
    color: #f0ead6;
    box-shadow: 0 0 80px rgba(255, 214, 92, 0.2);
}

.zone-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 214, 92, 0.4);
    background: rgba(20, 18, 35, 0.8);
    color: #ffd65c;
    font-size: 18px;
    cursor: pointer;
    transition: .3s;
}

.zone-close:hover {
    background: #ffd65c;
    color: #1a1424;
}

/* 弹层内文本（第三阶段会扩展） */
.zone-detail-body h2 {
    color: #ffd65c;
    letter-spacing: 2px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,214,92,0.2);
    padding-bottom: 10px;
}

.zone-detail-body .hint {
    color: #c8c0a8;
    line-height: 1.7;
    font-size: 15px;
}

.zone-detail-body code {
    background: rgba(255,214,92,0.12);
    color: #ffd65c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}



/* STARRY */

.starry {

    position: absolute;

    left:50%;
    top:45%;

    transform:translate(-50%,-50%);

}


.sign {

    color:#ffd65c;

    font-size:42px;

    text-align:center;

    text-shadow:
    0 0 15px #ffd65c;

}


.sign span {

    display:block;

    font-size:18px;

    letter-spacing:5px;

}


.door {

    margin:auto;

    margin-top:20px;

    width:180px;
    height:260px;

    background:
    linear-gradient(
        90deg,
        #30251c,
        #60432a
    );

    border:4px solid #c99b52;

}



/* 虹夏 */

.nijika {

    position:absolute;

    bottom:0;

    left:50%;

    transform:translateX(-50%);

}


.nijika img {

    height:55vh;

}



/* 标题 */

.title {

    position:absolute;

    bottom:8%;

    width:100%;

    text-align:center;

    color:white;

}


.title h1 {

    font-size:42px;

    letter-spacing:8px;

}


.title p {

    margin:15px;

    opacity:0.8;

}


button {

    padding:12px 45px;

    border-radius:30px;

    border:1px solid #ffd65c;

    background:transparent;

    color:#ffd65c;

    font-size:18px;

    cursor:pointer;

    transition:.3s;

}


button:hover {

    background:#ffd65c;

    color:#222;

}
