/* 强行把卡片提到最上层 */
.card {
    position: relative;
    z-index: 10;
}

.content {
    position: relative;
    z-index: 2;
}

/* ===== 头像样式 ===== */
.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #00FF88;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto 20px;
}

/* ===== 折叠框 =====*/
details.default {
    border-left: 6px solid #4488ff;
    background: rgba(68, 136, 255, 0.1);
}

details.error {
    border-left: 6px solid #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

details.warning {
    border-left: 6px solid #ff8800;
    background: rgba(255, 187, 51, 0.15);
}

details.success {
    border-left: 6px solid #00FF88;
    background: rgba(0, 255, 136, 0.08);
}

details {
    border-radius: 6px;
    padding: 12px 18px;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}

details summary {
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}

details[open] summary {
    margin-bottom: 10px;
}

/* ===== 叠加层基础样式 ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===== 六个主题 ===== */
body.theme-pure-white .overlay {
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4));
}
body.theme-pure-white {
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-accent: #00FF88;
}

body.theme-pure-black .overlay {
    background: rgba(0,0,0,0);
}
body.theme-pure-black {
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --text-accent: #00FF88;
    background: #000000;
}

body.theme-chip .overlay {
    background: 
        linear-gradient(to bottom, transparent, rgba(0,68,204,0.4)),
        url('images/image_lw/chip.jpg') center/cover fixed no-repeat;
}
body.theme-chip {
    --text-primary: #ffffff;
    --text-secondary: #dddddd;
    --text-accent: #00FF88;
}

body.theme-saturn .overlay {
    background: 
        linear-gradient(to bottom, transparent, rgba(26,10,46,0.4)),
        url('images/image_lw/saturn.jpg') center/cover fixed no-repeat;
}
body.theme-saturn {
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-accent: #00FF88;
}

body.theme-white-wall .overlay {
    background: 
        linear-gradient(to bottom, transparent, rgba(245,250,235,0.4)),
        url('images/image_lw/wall.jpg') center/cover fixed no-repeat;
}
body.theme-white-wall {
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-accent: #00FF88;
}

body.theme-code .overlay {
    background: 
        linear-gradient(to bottom, transparent, rgba(45,45,45,0.4)),
        url('images/image_lw/code.jpg') center/cover fixed no-repeat;
}
body.theme-code {
    --text-primary: #00FF88;
    --text-secondary: #ff6600;
    --text-accent: #ff3333;
}

h1 { color: var(--text-primary); }
h2 { color: var(--text-secondary); }
h3 { color: var(--text-accent); }
h4 { color: var(--text-primary); }
p { color: var(--text-secondary); }
a { color: var(--text-accent); }
b { color: var(--text-secondary); }

/* ===== 三栏布局 ===== */
.layout {
    display: flex;
    gap: 24px;
    max-width: 1450px;
    margin: 0 auto;
    padding: 20px 30px;
    height: 100vh;
    box-sizing: border-box;
    align-items: flex-start;
}

.left-panel {
    width: 265px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* 滚动容器：正文 + 拓展 同步滚动 */
.scroll-area {
    flex: 1;
    height: calc(100vh - 40px);
    overflow-y: auto;
    display: flex;
    flex-direction: row;      /* 改为横向排列 */
    gap: 24px;
    align-items: flex-start;
}

/* 正文区：占大部分宽度 */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.content-body {
    /* 不需要额外属性 */
}

/* 拓展区：固定宽度，独立成列 */
.ext-links {
    width: 210px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: fit-content;
}

.ext-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;   /* 纵向排列链接 */
    gap: 10px;
}

.ext-links li {
    /* 不需要 flex:1，让链接自然排列 */
}

.ext-links a {
    display: block;
    color: var(--text-accent);
    text-decoration: none;
    padding: 4px 0;
}

.ext-links a:hover {
    text-decoration: underline;
}

/* ===== 毛玻璃卡片（通用） ===== */
.card {
    border-radius: 6px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@supports (backdrop-filter: blur(1px)) {
    .card {
        background: rgba(255, 255, 255, 0.55);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
}

@supports not (backdrop-filter: blur(1px)) {
    .card {
        background: #dce8f5;
    }
}

/* ===== 左框区内部样式 ===== */
.left-panel .avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

.left-panel h2 {
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.left-panel .contact {
    text-align: center;
    margin: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== 响应式 ===== */
@media (max-width: 850px) {
    .layout {
        flex-direction: column;
        padding: 15px;
    }

    .left-panel {
        width: 100%;
        position: static;
    }

    .main-area {
        margin-left: 0;
    }
}

/* ===== 主题切换 =====*/

.theme-switcher {
    margin-bottom: 16px;
}

.theme-switcher h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.theme-dots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: transform 0.15s, border-color 0.15s;
}

.theme-dot:hover {
    transform: scale(1.2);
    border-color: #00FF88;
}

.theme-dot.active {
    border-color: #00FF88;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

/* ===== 管理模式面板 ===== */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 12;  /* 改为12，确保在卡片（z-index:10）之上 */
}

.admin-panel.hidden {
    display: none;
}

.panel-content {
    width: 340px;
    padding: 28px;
    text-align: center;
}

.panel-content h3 {
    margin-top: 0;
    color: var(--text-primary);
}

.panel-content p {
    color: var(--text-secondary);
    margin: 12px 0;
}

#passwordInput {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
}

#passwordInput:focus {
    border-color: #00FF88;
}

.panel-btn {
    margin-top: 14px;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    background: #00FF88;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

.panel-btn:hover {
    opacity: 0.85;
}

.exit-btn {
    background: #ff4444;
    color: white;
    margin-top: 20px;
}

.error-message {
    color: #ff4444;
    font-size: 13px;
    margin-top: 8px;
}

.error-message.hidden {
    display: none;
}

.status-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.status-option {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: background 0.15s;
}

.status-option:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: #00FF88;
}

.hidden {
    display: none;
}

.link-btn {
    background: none;
    border: none;
    color: var(--text-accent);
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: none;
}

.link-btn:hover {
    text-decoration: underline;
}

/* ===== 管理模式面板 - 宽屏横排 ===== */
@media (min-width: 1024px) {
    .panel-content {
        width: 560px;
        max-width: 76vw;
    }

    .status-options {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }

    .status-option {
        flex: 0 0 auto;
        width: calc(50% - 12px);
        text-align: center;
        padding: 12px 10px;
        font-size: 15px;
    }
}

/* ===== 博客卡片 ===== */
.blog-section {
    margin-top: 24px;
}

.blog-section h2 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 22px;
}

.blogPT {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 16px;
    transition: background 0.2s;
}

.blogPT:hover {
    background: rgba(255, 255, 255, 0.09);
}

/* 头部：标题 + 标签 + 编号 */
.blog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
    flex: 1;
}

.blog-tags {
    display: flex;
    gap: 6px;
}

.blog-tags tag {
    background: rgba(0, 255, 136, 0.15);
    color: #00FF88;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.blog-id {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
}

/* 正文预览 */
.blog-body p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 12px 0;
}

/* 阅读入口按钮 */
.blog-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.blog-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-html {
    background: rgba(0, 255, 136, 0.12);
    color: #00FF88;
    border: 1px solid rgba(0, 255, 136, 0.25);
}

.btn-html:hover {
    background: #00FF88;
    color: #000;
}

.btn-md {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-md:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* ===== bug 根治区 ===== */
.layout::after {
    content: '';
    display: block;
    height: 0;
    clear: both;
}

body {
    overflow: hidden;
    height: 100vh;
    margin: 0;
}