/* 全局重置与基础风格：还原1999年个人网站质感 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1B0F2A;
    color: #C9B87E;
    font-family: "SimSun", "宋体", serif;
    font-size: 14px;
    line-height: 1.6;
    /* 扫描线噪点效果 */
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(0,0,0,0.15),
            rgba(0,0,0,0.15) 1px,
            transparent 1px,
            transparent 2px
        );
    min-height: 100vh;
}

/* 整体布局容器 */
.container {
    width: 900px;
    margin: 0 auto;
    border: 2px solid #4A3A66;
    background-color: #231437;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 顶部横幅 */
.header {
    text-align: center;
    padding: 20px;
    border-bottom: 3px double #4A3A66;
    background-color: #1B0F2A;
}

.header h1 {
    font-size: 28px;
    color: #D4AF37;
    letter-spacing: 8px;
    margin-bottom: 5px;
}

.header .subtitle {
    color: #8B7AA8;
    font-size: 12px;
    letter-spacing: 3px;
}

/* 主体两栏布局 */
.main {
    display: flex;
    min-height: 500px;
}

/* 左侧导航栏 */
.sidebar {
    width: 180px;
    border-right: 2px solid #4A3A66;
    padding: 20px 10px;
    background-color: #1E1130;
}

.nav-item {
    display: block;
    color: #C9B87E;
    text-decoration: none;
    padding: 8px 12px;
    margin-bottom: 5px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
}

.nav-item:hover {
    background-color: #2D1E46;
    border: 1px solid #6B538E;
}

.nav-item.locked {
    color: #55446F;
    cursor: not-allowed;
}

.nav-item.locked:hover {
    background: none;
    border-color: transparent;
}

.nav-item.active {
    background-color: #2D1E46;
    border: 1px solid #D4AF37;
    color: #D4AF37;
}

/* 右侧内容区 */
.content {
    flex: 1;
    padding: 25px;
    position: relative;
}

.content h2 {
    color: #D4AF37;
    font-size: 18px;
    border-bottom: 1px dashed #6B538E;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* 老式按钮风格 */
.btn {
    background-color: #3A2956;
    border: 2px outset #6B538E;
    color: #C9B87E;
    padding: 4px 12px;
    font-family: "SimSun", "宋体", serif;
    font-size: 13px;
    cursor: pointer;
}

.btn:active {
    border-style: inset;
}

.btn:disabled {
    color: #55446F;
    cursor: not-allowed;
    border-style: outset;
}

/* 输入框风格 */
.input {
    background-color: #120920;
    border: 1px solid #4A3A66;
    color: #C9B87E;
    padding: 5px 8px;
    font-family: "SimSun", "宋体", serif;
    font-size: 13px;
    width: 220px;
}

.input:focus {
    outline: 1px solid #D4AF37;
}

/* 底部状态栏 */
.footer {
    border-top: 3px double #4A3A66;
    padding: 10px 20px;
    font-size: 12px;
    color: #8B7AA8;
    display: flex;
    justify-content: space-between;
    background-color: #1B0F2A;
}

.footer .warning {
    color: #A85252;
}

/* 闪烁动画 */
.blink {
    animation: blink 1.2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* 留言条目 */
.post-item {
    border-bottom: 1px dashed #4A3A66;
    padding: 15px 0;
}

.post-title {
    color: #D4AF37;
    font-size: 15px;
    margin-bottom: 5px;
}

.post-meta {
    color: #8B7AA8;
    font-size: 12px;
    margin-bottom: 8px;
}

.post-content {
    color: #D8CEB0;
    white-space: pre-line;
}

/* 相册网格 */
.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.album-item {
    text-align: center;
}

.album-img {
    width: 180px;
    height: 130px;
    background-color: #120920;
    border: 2px solid #4A3A66;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B538E;
    font-size: 12px;
    position: relative;
    overflow: hidden;
}

.album-img.locked {
    filter: brightness(0.3);
    cursor: not-allowed;
}

.album-photo {
    padding: 0;
    cursor: zoom-in;
}

.album-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.glitch-photo {
    box-shadow: 0 0 14px rgba(168, 82, 82, 0.7);
}

.album-filename {
    font-size: 11px;
    color: #8B7AA8;
}

/* 聊天室布局 */
.chat-box {
    height: 320px;
    background-color: #120920;
    border: 1px solid #4A3A66;
    padding: 10px;
    margin-bottom: 10px;
    overflow-y: auto;
    font-size: 13px;
}

.chat-user {
    color: #D4AF37;
}

.chat-system {
    color: #8B7AA8;
    font-style: italic;
}

.chat-self {
    color: #7EB8D4;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-area .input {
    flex: 1;
    width: auto;
}

.user-list {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #1A0E2B;
    border: 1px solid #4A3A66;
    font-size: 12px;
}

.user-list span {
    margin-right: 15px;
}

.user-offline {
    color: #55446F;
}

.typing-indicator {
    color: #8B7AA8;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* 资料室文档 */
.doc-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #1A0E2B;
    border: 1px solid #3A2956;
}

.doc-title {
    color: #D4AF37;
    margin-bottom: 10px;
    font-size: 14px;
}

.doc-content {
    color: #A89AC2;
    font-size: 13px;
    line-height: 1.8;
}

.faint-text {
    color: #55446F;
    font-size: 12px;
}

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal {
    background-color: #231437;
    border: 2px solid #6B538E;
    padding: 30px;
    min-width: 350px;
    text-align: center;
}

.modal h3 {
    color: #D4AF37;
    margin-bottom: 15px;
}

.modal p {
    margin-bottom: 20px;
    color: #D8CEB0;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 结局画面 */
.ending-screen {
    text-align: center;
    padding: 60px 20px;
}

.ending-screen h2 {
    font-size: 22px;
    margin-bottom: 30px;
    border: none;
}

.ending-text {
    color: #D8CEB0;
    font-size: 15px;
    line-height: 2;
    margin-bottom: 40px;
    white-space: pre-line;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 眼睛图标 */
.eye-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 20px;
    cursor: pointer;
    color: #6B538E;
}

/* 故障文字效果 */
.glitch {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.photo-modal-inner {
    position: relative;
    max-width: min(92vw, 920px);
    max-height: 90vh;
    text-align: center;
}

.photo-modal-inner img {
    max-width: 100%;
    max-height: 78vh;
    border: 2px solid #6B538E;
    background: #120920;
    image-rendering: auto;
}

.photo-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 34px;
    height: 34px;
    border: 1px solid #6B538E;
    background: #231437;
    color: #D8CEB0;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.photo-caption {
    margin-top: 10px;
    color: #C9B87E;
    font-size: 13px;
}
/* Full-screen responsive layout pass */
html {
    min-height: 100%;
}

body {
    font-size: clamp(16px, 1.05vw, 18px);
    min-height: 100vh;
    padding: 0;
}

.container {
    width: min(100vw - 32px, 1440px);
    min-height: calc(100vh - 32px);
    margin: 16px auto;
    display: flex;
    flex-direction: column;
}

.header {
    padding: clamp(24px, 3vh, 42px) 28px;
}

.header h1 {
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.15;
}

.header .subtitle {
    font-size: clamp(13px, 1vw, 16px);
}

.main {
    flex: 1;
    min-height: 0;
}

.sidebar {
    width: clamp(220px, 18vw, 300px);
    padding: 28px 16px;
}

.nav-item {
    font-size: clamp(16px, 1.1vw, 19px);
    padding: 12px 16px;
    margin-bottom: 9px;
}

.content {
    padding: clamp(28px, 3vw, 52px);
    min-width: 0;
}

.content h2 {
    font-size: clamp(24px, 2vw, 34px);
    margin-bottom: 28px;
}

.btn {
    font-size: 16px;
    padding: 8px 18px;
    min-height: 38px;
}

.input {
    font-size: 16px;
    padding: 9px 12px;
    width: min(100%, 340px);
}

.footer {
    padding: 14px 28px;
    font-size: 14px;
    gap: 16px;
}

.post-item {
    padding: 22px 0;
}

.post-title {
    font-size: 19px;
}

.post-meta {
    font-size: 14px;
}

.post-content {
    font-size: 17px;
}

.album-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.album-img {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 18 / 13;
    height: auto;
}

.album-filename {
    font-size: 13px;
}

.chat-box {
    height: min(52vh, 520px);
    font-size: 16px;
}

.modal {
    width: min(92vw, 560px);
    font-size: 17px;
}

@media (max-width: 760px) {
    body {
        font-size: 16px;
    }

    .container {
        width: 100vw;
        min-height: 100vh;
        margin: 0;
        border-left: none;
        border-right: none;
    }

    .header {
        padding: 20px 14px;
    }

    .header h1 {
        font-size: clamp(28px, 9vw, 40px);
        letter-spacing: 4px;
    }

    .header .subtitle {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #4A3A66;
        padding: 10px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .nav-item {
        margin: 0;
        text-align: center;
        padding: 10px 6px;
        font-size: 15px;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .content {
        padding: 20px 14px 28px;
    }

    .content h2 {
        font-size: 24px;
        margin-bottom: 18px;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 14px;
        font-size: 13px;
        gap: 4px;
    }

    .album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .album-img {
        max-width: none;
    }

    .post-title {
        font-size: 17px;
    }

    .post-content {
        font-size: 16px;
    }

    .input,
    textarea.input {
        width: 100% !important;
    }

    .photo-modal {
        padding: 12px;
    }

    .photo-close {
        top: 8px;
        right: 8px;
    }
}

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

    .album-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: auto;
        max-width: 100%;
    }
}
body .memory-container {
    width: min(92vw, 920px);
    margin: clamp(28px, 8vh, 80px) auto;
    padding: 0 12px;
}

body .video-frame {
    width: min(100%, 820px);
    aspect-ratio: 4 / 3;
    height: auto;
}

@media (max-width: 760px) {
    .content div[style*="display:flex"] {
        flex-wrap: wrap;
    }

    .content div[style*="display:flex"] .btn {
        flex: 0 0 auto;
    }

    body .memory-container {
        width: 100vw;
        margin: 24px auto;
        padding: 0 14px;
    }

    body .video-text {
        padding: 0 18px;
        font-size: 13px;
    }
}