/* style.css */
/* ==================== 全局重置 & 基础 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    /* 背景图片可自定义，此处保留模糊背景效果，不指向具体个人图片 */
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCIgdmlld0JveD0iMCAwIDgwIDgwIj48cmVjdCB3aWR0aD0iODAiIGhlaWdodD0iODAiIGZpbGw9IiNlNWU5ZWYiLz48cGF0aCBkPSJNMzAgMjBoMTB2MTBIMzB6TTUwIDIwaDEwdjEwSDUwek0zMCA0MGgxMHYxMEgzMHpNNTAgNDBoMTB2MTBINTB6TTQwIDMwaDEwdjEwSDQweiIgZmlsbD0iI2NmZDhkZSIvPjwvc3ZnPg==') repeat;
    background-size: 60px 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
}

/* ==================== 主容器 ==================== */
.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 25px 28px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

/* ==================== 标题 ==================== */
h1 {
    margin-top: 0;
    margin-bottom: 4px;
    color: #1a1a2e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 26px;
}

h1 .subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

.sub {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ==================== 工具栏 (保留原风格) ==================== */
.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 0 16px 0;
    border-bottom: 2px solid #eaeef2;
    align-items: center;
}

.toolbar .months {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar .month-btn {
    padding: 4px 14px;
    border: 1px solid #d0d7de;
    border-radius: 20px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.toolbar .month-btn:hover:not(.active) {
    background: #f0f2f4;
    border-color: #b0b8c0;
}

.toolbar .month-btn.active {
    background: #0366d6;
    color: #fff;
    border-color: #0366d6;
}

.toolbar .search-box {
    display: flex;
    gap: 6px;
}

.toolbar .search-box input {
    padding: 5px 12px;
    border: 1px solid #d0d7de;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: border 0.2s;
    min-width: 140px;
}

.toolbar .search-box input:focus {
    border-color: #0366d6;
}

.toolbar .search-box .btn {
    padding: 5px 16px;
    background: #2ea44f;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.toolbar .search-box .btn:hover {
    background: #22863a;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #0366d6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

/* ==================== 按钮 ==================== */
.btn {
    background: #0366d6;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn:hover {
    background: #0250a3;
}

.btn-sm {
    padding: 6px 18px;
    font-size: 13px;
    background: #2ea44f;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-sm:hover {
    background: #22863a;
}

/* ==================== 错误提示 ==================== */
.error {
    background: #ffe3e3;
    color: #b00020;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #b00020;
}

/* ==================== 帖子卡片 ==================== */
.post {
    border: 1px solid #e1e4e8;
    padding: 15px 18px;
    margin: 18px 0;
    border-radius: 8px;
    background: #fafbfc;
    transition: box-shadow 0.2s;
}

.post:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.post-name {
    font-weight: 700;
    color: #0366d6;
}

.post-email {
    color: #666;
    font-size: 13px;
    font-weight: 400;
}

.post-time {
    color: #888;
    font-size: 13px;
}

.post-content {
    font-size: 15px;
    margin: 8px 0 6px 0;
    word-wrap: break-word;
    line-height: 1.7;
}

.post-id {
    color: #bbb;
    font-size: 12px;
}

/* ==================== 回帖 ==================== */
.replies {
    margin-left: 20px;
    margin-top: 14px;
    padding-left: 18px;
    border-left: 3px solid #d0d7de;
}

.reply {
    background: #f6f8fa;
    padding: 10px 14px;
    margin: 8px 0;
    border-radius: 6px;
    font-size: 14px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.reply-name {
    font-weight: 600;
    color: #0366d6;
}

.reply-email {
    color: #666;
    font-size: 12px;
}

.reply-time {
    color: #888;
    font-size: 12px;
}

.reply-content {
    margin-top: 4px;
    line-height: 1.6;
}

/* ==================== 回帖表单 ==================== */
.reply-form {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.reply-form input,
.reply-form textarea {
    flex: 1;
    min-width: 100px;
    padding: 6px 10px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    transition: border 0.2s;
}

.reply-form input:focus,
.reply-form textarea:focus {
    border-color: #0366d6;
    outline: none;
}

.reply-form textarea {
    min-width: 150px;
    resize: vertical;
}

/* ==================== 分割线 ==================== */
.hr {
    border: none;
    border-top: 2px solid #eaeef2;
    margin: 25px 0;
}

/* ==================== 空状态 ==================== */
.empty {
    color: #999;
    text-align: center;
    padding: 30px 0;
}

/* ==================== 底部信息 ==================== */
.file-info {
    text-align: right;
    color: #aaa;
    font-size: 12px;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

/* ==================== 自定义卡片内联样式 (通用化) ==================== */
.bio-text {
    background-color: #f8fafc;
    border-radius: 24px;
    padding: 22px 26px;
    margin-bottom: 32px;
    border: 1px solid #e9edf2;
    line-height: 1.55;
    color: #1e293b;
    font-size: 1rem;
}

.bio-text p {
    margin-bottom: 1em;
}
.bio-text p:last-child {
    margin-bottom: 0;
}

.link-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.link-card {
    flex: 1;
    min-width: 160px;
    background: white;
    border-radius: 28px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef2f8;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 24px -8px rgba(0, 0, 0, 0.12);
    border-color: #cbdde9;
}

.link-text {
    font-weight: 550;
    font-size: 1rem;
    color: #1e2f3f;
}

.link-arrow {
    font-size: 1.3rem;
    color: #5b7c9c;
    transition: transform 0.2s;
}

.link-card:hover .link-arrow {
    transform: translateX(4px);
    color: #2c3e50;
}

.inline-link {
    color: #2c5a7a;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.inline-link:hover {
    color: #1a3e57;
}

.footnote {
    font-size: 0.7rem;
    text-align: center;
    color: #7f8c9a;
    background: #f9fafc;
    padding: 16px 20px;
    border-top: 1px solid #eef2f8;
    border-radius: 12px;
}

/* ==================== 模态窗 ==================== */
.modal_pop {
    border: none;
    border-radius: 32px;
    padding: 0;
    max-width: 420px;
    width: 90vw;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.4);
    animation: fadeSlideUp 0.2s ease;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.modal_pop::backdrop {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px 10px 24px;
    border-bottom: 1px solid #eef2f8;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f172a;
}

.modal-close {
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #5c6f87;
    transition: color 0.2s;
    background: none;
    border: none;
    font-weight: 400;
    padding: 0 6px;
}

.modal-close:hover {
    color: #dc2626;
}

.modal-links {
    padding: 24px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-link {
    background: #f8fafc;
    border-radius: 60px;
    padding: 14px 20px;
    text-decoration: none;
    font-weight: 500;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.modal-link:hover {
    background: white;
    border-color: #2c3e50;
    box-shadow: 0 6px 14px rgba(0,0,0,0.05);
    transform: translateX(4px);
}

.modal-link span {
    font-weight: 500;
}

.modal-link small {
    color: #5f7f9e;
    font-size: 0.75rem;
}

/* ==================== 响应式 ==================== */
@media (max-width: 640px) {
    body {
        padding: 16px;
    }
    .container {
        padding: 16px 14px;
        border-radius: 8px;
    }
    h1 {
        font-size: 20px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .toolbar .search-box {
        width: 100%;
    }
    .toolbar .search-box input {
        flex: 1;
        min-width: 0;
    }
    .reply-form {
        flex-direction: column;
    }
    .reply-form input,
    .reply-form textarea {
        min-width: 0;
        width: 100%;
    }
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .replies {
        margin-left: 8px;
        padding-left: 10px;
    }
    .link-cluster {
        flex-direction: column;
        gap: 10px;
    }
    .link-card {
        width: 100%;
    }
    .bio-text {
        padding: 18px 20px;
        font-size: 0.95rem;
    }
    .modal_pop {
        width: 92vw;
        border-radius: 28px;
    }
    .modal-links {
        padding: 20px 20px 28px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
}