/* ============================================================
 * 《白石岭没有下线》 — css/dreamcore.css
 * 中式梦核页面风格（PHASE 04：白石岭映像 · 在线相册）
 * - 2006 网络相册样式：旧纸张底、宝丽来白框、宋体小字
 * - 梦核氛围：低饱和、轻微褪色、空场感
 * - 动画：0.3s 淡入、悬停 scale(1.02)、平滑放大查看
 * ============================================================ */

/* ---------- 页面氛围：旧纸张 + 轻微褪色 ---------- */
.dreamcore-page {
    background:
        radial-gradient(ellipse at 50% -20%, rgba(255, 250, 235, 0.85) 0%, rgba(255, 250, 235, 0) 60%),
        #ece9df;
}

/* ---------- 相册头部：2006 博客风格 ---------- */
.album-main {
    background: #f7f4ea;
    padding: 18px 16px 22px;
    border: 1px solid #d8d2bf;
    border-top: none;
}

.album-header {
    text-align: center;
    padding: 10px 0 14px;
    border-bottom: 1px dashed #c9c2ac;
    margin-bottom: 16px;
}

.album-title {
    font-family: "SimSun", "宋体", serif;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 8px;
    color: #4a4436;
    margin: 0 0 4px 8px; /* 抵消字距偏移，保证视觉居中 */
}

.album-subtitle {
    font-family: "SimSun", "宋体", serif;
    font-size: 15px;
    color: #7a8aa0;
    letter-spacing: 6px;
    margin: 0 0 8px 6px;
}

.album-desc {
    font-size: 12px;
    color: #9a927e;
    margin: 0;
}

/* ---------- 四列网格 ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
}

.gallery-item {
    margin: 0;
    background: #fffdf6;
    border: 1px solid #d5ceba;
    padding: 6px 6px 10px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(90, 80, 50, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* 0.3s 淡入，逐张错开。
       fill-mode 用 backwards：动画结束后释放 transform，避免覆盖 :hover 缩放 */
    animation: dc-fade-in 0.3s ease backwards;
}
.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.10s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.20s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.30s; }

@keyframes dc-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    border: 1px solid #e3ddca;
    background: #eae6d8;
}

/* 悬停放大 1.02 + 阴影加深 */
.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(70, 60, 30, 0.28);
}

.gallery-item figcaption {
    margin-top: 6px;
    font-size: 12px;
    color: #5c5546;
    text-align: center;
    line-height: 1.5;
}
.g-file {
    color: #8a8f9a;
    margin-right: 6px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 11px;
}

.album-note {
    text-align: center;
    color: #a49b85;
    font-size: 12px;
    margin: 18px 0 0;
}

/* ---------- 点击放大查看（拍摄信息） ---------- */
.gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 11, 7, 0.86);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.gallery-overlay.open {
    opacity: 1;
    visibility: visible;
}

.overlay-stage {
    position: relative;
    background: #fffdf5;
    padding: 10px 10px 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    max-width: min(92vw, 880px);
    transform: scale(0.96);
    transition: transform 0.3s ease;
}
.gallery-overlay.open .overlay-stage { transform: scale(1); }

#overlay-img {
    display: block;
    max-width: min(86vw, 840px);
    max-height: 72vh;
    border: 1px solid #e0dac6;
    background: #f2eee0;
}

.overlay-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
    padding: 8px 4px 0;
    font-size: 13px;
    color: #4a4436;
}
.overlay-info b { color: #2f2a1e; font-weight: normal; }
.oi-file { color: #8a8f9a; font-family: "Consolas", "Courier New", monospace; font-size: 12px; }
.oi-title { color: #333; font-weight: bold; }

.overlay-hint {
    padding: 6px 4px 0;
    font-size: 11px;
    color: #b3ab93;
}

.overlay-close {
    position: absolute;
    top: -13px;
    right: -13px;
    width: 28px;
    height: 28px;
    border: 1px solid #6e6753;
    border-radius: 50%;
    background: #f5efe0;
    color: #4a4436;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.overlay-close:hover { background: #ffe9d0; }

body.overlay-lock { overflow: hidden; }

/* ---------- 动效开关：尊重系统减弱动效设置 ---------- */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-overlay,
    .overlay-stage {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================================
 * PHASE 10：夜间模式（压抑 · 梦核，非恐怖）
 * ============================================================ */

/* 夜间值班室页面：整体降亮、降饱和、灰蓝背景 */
.night-page {
    margin: 0;
    padding: 24px 16px;
    background: #262c34;
    color: #9aa4ad;
    font-family: "SimSun", "宋体", serif;
}

.night-wrap {
    max-width: 720px;
    margin: 0 auto;
    /* 亮度 0.85、饱和度降低 */
    filter: brightness(0.85) saturate(0.85);
    animation: night-fade-in 0.8s ease both;
}

@keyframes night-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.night-title {
    text-align: center;
    font-size: 18px;
    letter-spacing: 6px;
    color: #b8c2cc;
    margin: 0 0 4px;
}
.night-sub {
    text-align: center;
    font-size: 11px;
    color: #6f7a85;
    letter-spacing: 2px;
    margin: 0 0 22px;
}

/* 夜间照片卡 */
.night-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (max-width: 640px) {
    .night-grid { grid-template-columns: 1fr; }
}
.night-card {
    background: #2f363f;
    border: 1px solid #3c454f;
    padding: 8px 8px 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}
.night-card img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid #3c454f;
    background: #333b44;
}
.night-card .n-caption {
    text-align: center;
    font-size: 12px;
    color: #7e8994;
    margin-top: 8px;
    letter-spacing: 1px;
}

/* 值班记录区 */
.night-log {
    margin-top: 24px;
    border-top: 1px solid #39424c;
    padding-top: 16px;
    font-size: 13px;
    color: #8d98a2;
    line-height: 2;
}
.night-log .log-current { color: #aab4bd; }
.night-log summary {
    cursor: pointer;
    color: #7e8994;
    font-size: 12px;
    letter-spacing: 1px;
    margin-top: 10px;
}
.night-log summary:hover { color: #b8c2cc; }
.night-log .log-list { margin-top: 8px; color: #6f7a85; font-size: 12px; }
.night-log .log-list .odd { color: #8d98a2; }
.night-log .log-list .oldest { color: #aab4bd; }

.night-back {
    text-align: center;
    margin-top: 22px;
}
.night-back a {
    color: #6f7a85;
    font-size: 11px;
    text-decoration: none;
    letter-spacing: 2px;
}
.night-back a:hover { color: #b8c2cc; }

/* 夜间值班室入口（极淡链接） */
.night-link {
    display: block;
    text-align: center;
    color: #8a8f9a;
    font-size: 11px;
    opacity: 0.35;
    margin-top: 6px;
    text-decoration: none;
    letter-spacing: 2px;
}
.night-link:hover { opacity: 0.7; color: #6b7a96; }

@media (prefers-reduced-motion: reduce) {
    .night-wrap { animation: none !important; }
}
