
/* ============================================================
   云开 · 个人主页 v2  —— 可探索像素书房
   ============================================================ */
.page-room-v2 .site-shell { max-width: 1240px; }

/* ---------- Header ---------- */
.v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 4px 14px;
    flex-wrap: wrap;
}
.v2-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 700;
    color: #ffe3a6;
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(0,0,0,.55);
    letter-spacing: .5px;
}
.v2-brand-mark { color: #ffb347; font-size: 1.05rem; }
.v2-brand-sep { margin: 0 5px; color: #ffb347; }
.v2-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 12px;
    background: rgba(10, 14, 28, .55);
    border: 1px solid rgba(255, 200, 120, .16);
    backdrop-filter: blur(6px);
}
.v2-nav a {
    padding: 7px 18px;
    border-radius: 8px;
    color: #d8c7a4;
    text-decoration: none;
    font-size: .92rem;
    transition: background .18s, color .18s;
}
.v2-nav a:hover { color: #fff2d4; background: rgba(255, 190, 100, .12); }
.v2-nav a.is-active {
    color: #1a1206;
    background: linear-gradient(180deg, #ffd98a, #e9a83e);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(233,168,62,.35);
}
.v2-status {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--font-pixel);
    font-size: .72rem;
    color: #9fe0b0;
    text-shadow: 0 1px 4px #000;
}
.v2-status i {
    width: 8px; height: 8px; border-radius: 50%;
    background: #5fe08a;
    box-shadow: 0 0 10px #5fe08a;
    animation: v2-pulse-dot 2s ease-in-out infinite;
}

/* ---------- Scene ---------- */
.v2-stage { padding: 2px 0 18px; }
.v2-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 200, 120, .22);
    box-shadow: 0 20px 60px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.4);
    background: #120d08;
}
.v2-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    display: block;
}
.v2-scene::after {
    content: "";
    position: absolute; inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.32) 100%);
}

/* ---------- NPC ---------- */
.v2-npc {
    position: absolute;
    width: 8.5%;
    min-width: 46px;
    transform: translate(-50%, -100%);
    z-index: 6;
    cursor: pointer;
    filter: drop-shadow(0 8px 10px rgba(0,0,0,.55));
    animation: v2-bob 3.2s ease-in-out infinite;
}
.v2-npc-sprite img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.v2-npc-bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 210px;
    padding: 8px 12px;
    background: rgba(255, 248, 231, .97);
    color: #3a2510;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,.4);
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    font-size: .78rem;
    line-height: 1.45;
}
.v2-npc-bubble.is-show { opacity: 1; }
.v2-bubble-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    color: #a55b12;
    margin-bottom: 2px;
}
.v2-bubble-arrow {
    position: absolute;
    left: 50%; top: 100%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: rgba(255, 248, 231, .97);
}

/* ---------- Hotspots ---------- */
.v2-hot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 8;
    width: 40px; height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}
.v2-hot-ring {
    position: absolute; inset: 2px;
    border-radius: 50%;
    border: 2px solid #ffd98a;
    box-shadow: 0 0 14px rgba(255,190,90,.75), inset 0 0 8px rgba(255,190,90,.35);
    animation: v2-ping 2.4s ease-out infinite;
}
.v2-hot-dot {
    position: absolute; inset: 13px;
    border-radius: 50%;
    background: #fff3c4;
    box-shadow: 0 0 14px 4px rgba(255,205,110,.9);
}
.v2-hot-label {
    position: absolute;
    left: 50%; top: calc(100% + 4px);
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 7px;
    background: rgba(12,16,30,.82);
    border: 1px solid rgba(255,200,120,.3);
    color: #ffe7b6;
    font-family: var(--font-display);
    font-size: .8rem;
    text-shadow: 0 1px 3px #000;
    opacity: 0;
    transition: opacity .18s, transform .18s;
    pointer-events: none;
}
.v2-hot-label em {
    font-style: normal;
    color: #ffb347;
    margin-left: 5px;
    font-size: .72rem;
}
.v2-hot:hover .v2-hot-label,
.v2-hot:focus-visible .v2-hot-label { opacity: 1; transform: translateX(-50%) translateY(2px); }
.v2-hot:hover .v2-hot-dot,
.v2-hot:focus-visible .v2-hot-dot { background: #fff; box-shadow: 0 0 18px 6px rgba(255,215,130,1); }
.v2-hot:focus-visible { outline: 2px dashed #ffd98a; outline-offset: 4px; border-radius: 50%; }

/* ---------- Dialog ---------- */
.v2-dialog {
    position: absolute;
    left: 50%; bottom: 4%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    gap: 14px;
    width: min(680px, 92%);
    padding: 14px;
    background: linear-gradient(180deg, rgba(28,20,12,.97), rgba(18,13,9,.98));
    border: 2px solid #c98a3c;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,220,160,.12);
    color: #f5e6c8;
}
.v2-dialog[hidden] { display: none; }
.v2-dialog-portrait {
    flex: 0 0 84px;
    align-self: flex-end;
    border-radius: 8px;
    border: 1px solid rgba(255,200,120,.28);
    background: rgba(255,180,80,.08);
    overflow: hidden;
}
.v2-dialog-portrait img { width: 100%; display: block; image-rendering: pixelated; }
.v2-dialog-main { flex: 1; min-width: 0; }
.v2-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.v2-dialog-name { font-family: var(--font-display); font-weight: 700; color: #ffd98a; font-size: 1rem; }
.v2-dialog-close {
    border: 0; background: transparent; color: #d8b98a;
    font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 4px;
}
.v2-dialog-close:hover { color: #fff; }
.v2-dialog-text { margin: 0 0 12px; font-size: .9rem; line-height: 1.7; }
.v2-dialog-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-dialog-choices button {
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid rgba(255,200,120,.35);
    background: rgba(255,190,90,.1);
    color: #ffe7b6;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.v2-dialog-choices button:hover { background: rgba(255,190,90,.25); transform: translateY(-1px); }

/* ---------- Games menu ---------- */
.v2-games {
    position: absolute;
    left: 9%; top: 68%;
    transform: translate(-50%, 0);
    z-index: 30;
    width: min(260px, 80%);
    padding: 12px;
    background: linear-gradient(180deg, rgba(10,30,28,.97), rgba(8,20,20,.98));
    border: 2px solid #4fd0b0;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(0,0,0,.6), 0 0 24px rgba(79,208,176,.2);
    color: #d8fff2;
}
.v2-games[hidden] { display: none; }
.v2-games-head {
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--font-display); font-weight: 700; color: #7ff0cf;
    margin-bottom: 10px; font-size: .95rem;
}
.v2-games-head button {
    border: 0; background: transparent; color: #9fdcc8;
    font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.v2-games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v2-games-grid a {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 10px 4px;
    border-radius: 8px;
    background: rgba(79,208,176,.1);
    border: 1px solid rgba(79,208,176,.25);
    color: #e6fff6;
    text-decoration: none;
    font-size: .78rem;
    transition: background .15s, transform .15s;
}
.v2-games-grid a:hover { background: rgba(79,208,176,.24); transform: translateY(-2px); }
.v2-game-ico { font-size: 1.3rem; color: #7ff0cf; }

/* ---------- Corner label (遮住残留水印) ---------- */
.v2-corner {
    position: absolute;
    right: 0; bottom: 0;
    z-index: 4;
    display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
    padding: 14px 20px 12px;
    background: linear-gradient(135deg, transparent 0%, rgba(10,8,5,.86) 42%);
    border-top-left-radius: 40px;
}
.v2-corner-label {
    font-family: var(--font-pixel);
    font-size: .6rem;
    letter-spacing: 1.5px;
    color: #b98a4a;
}
.v2-corner-value {
    font-family: var(--font-display);
    font-size: .95rem;
    color: #ffe3a6;
    text-shadow: 0 2px 5px #000;
}

/* ---------- Footer hint ---------- */
.v2-footer { display: flex; justify-content: center; margin-top: 14px; }
.v2-hint { margin: 0; color: var(--text-muted); font-size: .82rem; }
.v2-key {
    display: inline-block;
    padding: 2px 7px;
    margin: 0 3px;
    border-radius: 5px;
    background: rgba(255,200,120,.12);
    border: 1px solid rgba(255,200,120,.28);
    color: #ffe0a8;
    font-family: var(--font-pixel);
    font-size: .72rem;
}

/* ---------- Animations ---------- */
@keyframes v2-ping {
    0%   { transform: scale(.85); opacity: .9; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}
@keyframes v2-bob {
    0%, 100% { transform: translate(-50%, -100%); }
    50%      { transform: translate(-50%, calc(-100% - 6px)); }
}
@keyframes v2-pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
    .v2-brand { font-size: 1rem; }
    .v2-nav a { padding: 6px 11px; font-size: .84rem; }
    .v2-status { display: none; }
    .v2-scene { aspect-ratio: 4 / 3; }
    .v2-bg { object-position: 42% center; }
    .v2-npc { width: 12%; }
    .v2-hot { width: 34px; height: 34px; }
    .v2-hot-dot { inset: 11px; }
    .v2-hot-label { font-size: .7rem; padding: 3px 7px; }
    .v2-hot-label em { display: none; }
    .v2-dialog { width: 94%; bottom: 2%; padding: 10px; gap: 10px; }
    .v2-dialog-portrait { flex-basis: 60px; }
    .v2-dialog-text { font-size: .82rem; }
    .v2-corner { padding: 8px 12px; }
    .v2-corner-value { font-size: .78rem; }
}
@media (max-width: 520px) {
    .v2-scene { aspect-ratio: 1 / 1; }
    .v2-bg { object-position: 50% center; }
    .v2-hot-npc, .v2-hot-arcade { display: none; }
    .v2-hint { font-size: .72rem; }
}
