/* ========== 复古纸张风格（唯一主题，三端统一） ========== */
:root {
    --paper: #f5f0e6;
    --paper-dark: #e8ddd0;
    --ink: #4a3728;
    --ink-light: #6b5344;
    --accent: #8b6914;
    --accent-light: #a67c00;
    --shadow: rgba(74, 55, 40, 0.15);
    --shadow-hover: rgba(74, 55, 40, 0.25);
}

/* 全局重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Serif SC', 'STSong', 'SimSun', serif;
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-blend-mode: soft-light;
    min-height: 100vh;
    color: var(--ink);
    line-height: 1.6;
}

/* 滚动条 */
*::-webkit-scrollbar { width: 3px; height: 3px; }
*::-webkit-scrollbar-track { background: transparent; border-radius: 2px; }
*::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* ========== 顶部横排导航（fg.html 风格） ========== */
header {
    background: linear-gradient(135deg, var(--paper) 0%, var(--paper-dark) 100%);
    border-bottom: 2px solid rgba(74, 55, 40, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow);
}
nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}
.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.nav-links a {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}
.nav-links a:hover {
    background: rgba(139, 105, 20, 0.1);
    transform: translateY(-2px);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-links a:hover::after { width: 60%; }
.nav-links .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    font-family: 'ZCOOL XiaoWei', cursive;
}
.nav-links .login-btn {
    background: var(--accent);
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px;
}
.nav-links .login-btn:hover {
    background: var(--accent-light) !important;
    transform: translateY(-2px) !important;
}
.nav-links .logout-btn {
    background: #8b4545;
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px;
}
.nav-links .logout-btn:hover {
    background: #a05555 !important;
    transform: translateY(-2px) !important;
}

/* ========== 主内容区 ========== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 页面切换动画 */
.page-section { display: none; animation: fadeInUp 0.5s ease-out; }
.page-section.active { display: block; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 卡片（核心复古风格） ========== */
.paper-card {
    background: white;
    border-radius: 12px;
    padding: 45px 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid rgba(74, 55, 40, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.paper-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}
.paper-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

/* ========== 页面标题 ========== */
.page-header { text-align: center; margin-bottom: 2rem; }
.page-header h2 { font-size: 2.5rem; color: var(--ink); margin-bottom: 0.5rem; text-align: center; }
.page-header h2::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
    margin: 8px auto 0;
}
.page-header p { font-size: 1.1rem; color: var(--ink-light); font-style: italic; }

/* ========== 首页元素 ========== */
.main-title {
    font-size: 2.6em;
    color: var(--ink);
    text-align: center;
    margin-bottom: 12px;
}
.main-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
    margin: 8px auto 0;
}

.subtitle {
    text-align: center;
    font-size: 1.25em;
    color: var(--ink-light);
    margin: 22px 0 30px;
    font-style: italic;
}

.story-section { margin: 30px 0; line-height: 2; font-size: 1.12em; color: var(--ink-light); }

.quote-box {
    background: rgba(139, 105, 20, 0.05);
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 22px 28px;
    margin: 30px 0;
}
.quote-box p {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--accent);
}

.window-photo { width: 85%; max-width: 480px; margin: 30px auto; }
.window-photo img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--shadow);
}

.cta-section {
    text-align: center;
    margin: 35px 0;
    padding: 28px;
    background: rgba(139, 105, 20, 0.05);
    border: 2px dashed rgba(74, 55, 40, 0.2);
    border-radius: 20px;
}
.cta-highlight {
    font-size: 1.45em;
    color: var(--accent);
    font-weight: bold;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.admin-edit-bar { text-align: right; margin-top: 20px; }
.admin-bar { margin-bottom: 20px; }

/* ========== 作品/日志列表 ========== */
.card-grid, .journal-list { display: flex; flex-direction: column; gap: 12px; margin: 25px 0; }

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: white;
    border: 1px solid rgba(74, 55, 40, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0;
    transition: opacity 0.3s;
}
.list-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px var(--shadow-hover); }
.list-item:hover::before { opacity: 1; }
.list-item h3 {
    font-size: 1.15em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-link-btn {
    font-size: 0.72em;
    padding: 2px 8px;
    background: rgba(139, 105, 20, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s;
}
.demo-link-btn:hover { background: var(--accent); color: white; }

.item-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.item-tag {
    background: rgba(139, 105, 20, 0.1);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}
.item-date { font-size: 0.82em; color: #a1887f; white-space: nowrap; margin-left: 12px; }

/* ========== 留言板 ========== */
.msg-form {
    background: rgba(139, 105, 20, 0.05);
    border: 2px dashed rgba(74, 55, 40, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}
.msg-form h3 { margin-bottom: 15px; color: var(--ink); }
.msg-form .form-group { margin-bottom: 1.2rem; }
.msg-form .form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
    color: var(--ink);
}
.msg-form .form-group input,
.msg-form .form-group textarea {
    width: 60%;
    max-width: none;
    padding: 0.75rem;
    border: 2px solid rgba(74, 55, 40, 0.2);
    border-radius: 8px;
    background: var(--paper);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
}
.msg-form .form-group input { height: 36px; }
.msg-form .form-group textarea { min-height: 90px; resize: vertical; }
.msg-form .form-group input:focus,
.msg-form .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

.msg-list { margin: 20px 0; display: flex; flex-direction: column; gap: 16px; }
.msg-item {
    background: white;
    border-radius: 12px;
    padding: 18px 22px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.msg-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}
.msg-item:hover { transform: translateY(-2px); box-shadow: 0 4px 15px var(--shadow-hover); }
.msg-author { font-weight: bold; color: var(--ink); font-size: 1.05em; }
.msg-time { font-size: 0.8em; color: #a1887f; float: right; }
.msg-body {
    margin-top: 10px;
    line-height: 1.7;
    color: var(--ink-light);
    font-size: 1em;
    word-break: break-word;
    clear: both;
}
.msg-actions { margin-top: 12px; text-align: right; }
.msg-reply {
    margin-top: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(139, 105, 20, 0.08), rgba(139, 105, 20, 0.05));
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
}
.reply-label { font-weight: bold; color: var(--accent); font-size: 0.9em; }
.msg-reply-body { margin-top: 6px; color: var(--ink-light); line-height: 1.6; }

/* ========== 按钮（fg.html 胶囊风格） ========== */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.btn-primary {
    background: var(--accent);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-secondary {
    background: rgba(74, 55, 40, 0.1);
    color: var(--ink);
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
}
.btn-secondary:hover { background: rgba(74, 55, 40, 0.2); transform: translateY(-2px); }

/* 搜索图标按钮 - 浅色干净 */
.btn-search-icon {
    background: transparent !important;
    border: 1.5px solid var(--border);
    color: var(--ink-light);
    padding: 6px 12px;
    font-size: 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-search-icon:hover {
    background: rgba(139, 105, 20, 0.08) !important;
    border-color: var(--accent);
    color: var(--accent);
}
.btn-danger { background: #8b4545; color: white; }
.btn-danger:hover { background: #a05555; transform: translateY(-2px); }
.btn-sm { padding: 6px 14px; font-size: 0.88em; }

/* ========== 弹窗（fg.html 风格） ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
}
.modal.show { display: flex; justify-content: center; align-items: center; }

.login-box,
.wechat-box,
.form-modal,
.detail-modal-body {
    background: var(--paper);
    margin: 3% auto;
    padding: 1.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalIn 0.3s ease;
    display: flex;
    flex-direction: column;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box { width: 360px; text-align: center; padding: 35px 30px; }
.login-box h2 { color: var(--ink); margin-bottom: 1rem; }
.login-box p { margin-bottom: 20px; color: var(--ink-light); }
.login-box input {
    width: 100%; max-width: 280px;
    padding: 0.75rem;
    border: 2px solid rgba(74, 55, 40, 0.2);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 15px;
}
.login-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}
.login-box .btn { margin-top: 8px; width: 100%; max-width: 280px; }

.wechat-box { width: 340px; text-align: center; position: relative; }
.wechat-box h3 { color: var(--ink); margin-bottom: 1rem; }
.wechat-box img { width: 180px; border-radius: 16px; margin: 10px auto; box-shadow: 0 10px 30px var(--shadow); display: block; }
.wechat-box p { color: var(--ink-light); }

.form-modal { max-width: 700px; max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; }
.form-modal h2 { color: var(--ink); margin-bottom: 1rem; padding-right: 30px; flex-shrink: 0; }
.form-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(74, 55, 40, 0.1); flex-shrink: 0; position: sticky; bottom: 0; background: var(--paper); padding-bottom: 5px; z-index: 1; }

.detail-modal-body { padding: 20px; position: relative; }
.detail-modal-body h2 { color: var(--ink); margin-bottom: 15px; }
.detail-modal-body .meta { color: var(--ink-light); font-size: 0.9rem; margin-bottom: 15px; }
.detail-modal-body .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.detail-modal-body .content { line-height: 1.8; color: var(--ink-light); }
.detail-modal-body .content img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.detail-modal-body .actions { margin-top: 20px; text-align: right; }

/* 关闭按钮（fg.html X 风格） */
.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ink-light);
    transition: color 0.3s;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}
.close-modal:hover { color: var(--accent); }
.detail-modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ink-light);
    transition: color 0.3s;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: none;
    border: none;
}
.detail-modal-close:hover { color: var(--accent); }

/* ========== 表单通用 ========== */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; color: var(--ink); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(74, 55, 40, 0.2);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.form-group textarea { min-height: 150px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

/* ========== RTE 编辑器 ========== */
.rte-editor {
    min-height: 300px;
    padding: 14px 16px;
    border: 2px solid rgba(74, 55, 40, 0.2);
    border-radius: 0 0 8px 8px;
    background: white;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.8;
    color: inherit;
    overflow-y: auto;
    max-height: 500px;
}
.rte-editor:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}
.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    align-items: stretch;
}
.rte-toolbar .tb-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin: 1px;
    color: var(--ink);
}
.rte-toolbar .tb-btn:hover { background: var(--accent); color: white; }
.rte-toolbar .tb-sep { width: 1px; background: rgba(74, 55, 40, 0.2); margin: 4px 4px; }

/* ========== 表单弹窗内部滚动 ========== */
#formBody { flex: 1; overflow-y: auto; min-height: 0; padding-bottom: 10px; }

/* ========== 服务与承诺 ========== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
}
.service-card {
    background: white;
    border-radius: 12px;
    padding: 24px 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(74, 55, 40, 0.08);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}
.service-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 8px 25px var(--shadow-hover); }
.service-icon { font-size: 2.6rem; margin-bottom: 12px; }
.service-card h3 { font-size: 1.3rem; color: var(--ink); margin-bottom: 10px; }
.service-card p { font-size: 0.9rem; color: var(--ink-light); }

.promise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}
.promise-item {
    text-align: center;
    padding: 24px 16px;
    background: rgba(139, 105, 20, 0.05);
    border-radius: 12px;
    border: 1px dashed rgba(74, 55, 40, 0.2);
}
.promise-item .emoji { font-size: 2.2rem; margin-bottom: 12px; }
.promise-item h4 { color: var(--ink); margin-bottom: 8px; }
.promise-item p { font-size: 0.85rem; color: var(--ink-light); }

/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 2rem;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: linear-gradient(135deg, #4CAF50, #45a049); }
.toast.error { background: linear-gradient(135deg, #c62828, #b71c1c); }

/* ========== 图片上传区域 ========== */
.image-upload-area {
    border: 2px dashed rgba(74, 55, 40, 0.2);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}
.image-upload-area:hover { border-color: var(--accent); background: rgba(139, 105, 20, 0.05); }
.image-upload-area.dragover { border-color: var(--accent); background: rgba(139, 105, 20, 0.1); }
.image-upload-area i { font-size: 3rem; margin-bottom: 1rem; color: var(--accent); }
.image-preview { max-width: 200px; max-height: 150px; object-fit: cover; border-radius: 8px; margin-top: 1rem; }
.upload-progress { width: 100%; height: 4px; background: var(--paper-dark); border-radius: 2px; margin-top: 1rem; overflow: hidden; }
.upload-progress-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s ease; }

/* ========== 平板端响应式 (768px - 1024px) ========== */
@media (max-width: 1024px) {
    main { padding: 1.5rem; }
    .paper-card { padding: 35px 30px; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .promise-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links a { font-size: 1rem; padding: 0.4rem 0.8rem; }
    .nav-links .logo { font-size: 1.3rem; }
}

/* ========== 手机端响应式 (< 768px) ========== */
@media (max-width: 768px) {
    nav { padding: 0.8rem 1rem; }
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .nav-links a { font-size: 0.9rem; padding: 0.4rem 0.8rem; }
    .nav-links .logo {
        width: 100%;
        text-align: center;
        font-size: 1.3rem;
    }
    
    main { padding: 1rem; }
    .paper-card { padding: 25px 18px; margin-bottom: 20px; }
    .page-header h2 { font-size: 1.8rem; }
    .main-title { font-size: 1.8rem; }
    
    .service-grid { grid-template-columns: 1fr; gap: 16px; }
    .promise-grid { grid-template-columns: 1fr; gap: 12px; }
    
    .list-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .list-item .item-right { width: 100%; justify-content: space-between; }
    
    .window-photo { width: 100%; }
    .rte-editor { min-height: 200px; }
    
    .wechat-box { width: 280px; padding: 20px 16px; }
    .wechat-box img { width: 140px; }
    .login-box { width: 300px; padding: 25px 20px; }
    
    /* 留言板手机端调整 */
    .msg-form .form-group input, .msg-form .form-group textarea { width: 80%; max-width: none; }
    .msg-item { padding: 14px 16px; }
    .msg-author { font-size: 1rem; }
    .msg-time { float: none; display: block; margin-top: 4px; font-size: 0.75rem; }
    .msg-body { margin-top: 8px; font-size: 0.95rem; }
    .msg-actions { margin-top: 10px; }
    .msg-form { padding: 18px; }
    
    .quote-box { padding: 15px 20px; }
    .quote-box p { font-size: 1.2rem; }
    .cta-section { padding: 20px; }
    .cta-highlight { font-size: 1.2rem; }
    
    /* 弹窗手机端 */
    .modal { padding: 10px; }
    .login-box, .wechat-box, .form-modal { width: 95%; padding: 1rem; margin: 5% auto; }
    .detail-modal-body { padding: 15px; }
    
    /* 按钮手机端适配 */
    .btn { padding: 8px 16px; font-size: 0.9rem; }
    .btn-primary { padding: 0.6rem 1.5rem; }
}

/* ========== 悬浮登录/退出按钮（圆形） ========== */
.fab-login, .fab-logout {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5f0e6;
    border: none;
    box-shadow: 0 2px 8px rgba(74, 55, 40, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}
.fab-login::after {
    content: '↑';
    font-size: 1.4rem;
    color: #8b6914;
}
.fab-logout::after {
    content: '↓';
    font-size: 1.4rem;
    color: #8b6914;
}
.fab-login:hover, .fab-logout:hover {
    box-shadow: 0 4px 12px rgba(74, 55, 40, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

/* ========== 小屏幕手机 (< 480px) ========== */
@media (max-width: 480px) {
    nav { padding: 0.6rem 0.8rem; }
    .nav-links a { font-size: 0.82rem; padding: 0.35rem 0.65rem; }
    .nav-links .logo { font-size: 1.1rem; }
    
    main { padding: 0.8rem; }
    .paper-card { padding: 20px 15px; }
    .main-title { font-size: 1.5rem; }
    .page-header h2 { font-size: 1.5rem; }
    
    .login-box, .wechat-box, .form-modal { width: 98%; }
    .wechat-box img { width: 120px; }
    
    .msg-form { padding: 15px; }
    .msg-form h3 { font-size: 1rem; }
    .msg-item { padding: 12px; }
    
    /* 手机端悬浮按钮调整 */
    .fab-login, .fab-logout {
        width: 40px;
        height: 40px;
        right: 1rem;
        bottom: 1rem;
    }
}