/* ===== 浅紫色主题 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}
body {
    background: #f8f4fc;
    color: #3d2c4a;
    padding: 20px;
    min-height: 100vh;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 245, 255, 0.7);
    backdrop-filter: blur(2px);
    border-radius: 32px;
    padding: 24px 20px 40px;
    box-shadow: 0 8px 28px rgba(180, 140, 200, 0.2);
    border: 1px solid #ede0f5;
}
/* ----- 顶部导航 (head.php) ----- */
.header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 24px;
    border-bottom: 2px solid #ede0f5;
    padding-bottom: 16px;
}
.header h1 {
    color: #5f3d6b;
    font-weight: 500;
    font-size: 1.8rem;
    border-left: 6px solid #b894d4;
    padding-left: 16px;
}
.nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.nav a {
    background: #ede0f5;
    padding: 6px 18px;
    border-radius: 40px;
    color: #4f345c;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}
.nav a:hover,
.nav a.active {
    background: #d5bae8;
}
.search-box {
    display: flex;
    flex: 1;
    min-width: 200px;
    background: #f3e8fa;
    border-radius: 60px;
    padding: 4px 4px 4px 20px;
}
.search-box input {
    border: none;
    background: transparent;
    padding: 8px 6px;
    flex: 1;
    min-width: 100px;
    outline: none;
}
.search-box button {
    background: #d5bae8;
    border: none;
    padding: 8px 20px;
    border-radius: 60px;
    cursor: pointer;
    font-weight: 500;
}
/* ----- 通用卡片 ----- */
.card {
    background: #ffffffd9;
    border-radius: 24px;
    padding: 20px 22px;
    margin-bottom: 24px;
    border: 1px solid #f0e4f8;
}
/* ----- 日记列表 ----- */
.note-item {
    border-bottom: 1px solid #eddff5;
    padding: 18px 0;
}
.note-item:last-child {
    border-bottom: none;
}
.note-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #4b2e57;
}
.note-meta {
    font-size: 0.8rem;
    color: #7f6390;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 6px 0 10px;
}
.note-preview {
    color: #3f2c49;
    line-height: 1.6;
}
.protected-badge {
    background: #d5c0e6;
    font-size: 0.7rem;
    padding: 2px 12px;
    border-radius: 40px;
    margin-left: 8px;
    color: #3a2445;
}
/* ----- 标签 ----- */
.tag {
    background: #e7d6f2;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: #4d2f5a;
    display: inline-block;
    margin: 4px 6px 4px 0;
    cursor: pointer;
    border: 1px solid #d0b4e6;
}
.tag:hover {
    background: #dac2ec;
}
/* ----- 分页 ----- */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 28px 0 10px;
    flex-wrap: wrap;
}
.pagination span,
.pagination a {
    background: #ede0f5;
    padding: 6px 16px;
    border-radius: 40px;
    color: #4f345c;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}
.pagination .active {
    background: #c7a8df;
    font-weight: 500;
}
/* ----- 按钮 ----- */
.btn-outline {
    background: transparent;
    border: 1px solid #c9ade0;
    padding: 8px 22px;
    border-radius: 60px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    color: #3c2847;
    font-size: 0.9rem;
}
.btn-outline:hover {
    background: #f0e4fa;
}
/* ----- 日记详情 (byqin.php) ----- */
.note-detail {
    background: #fcf7ff;
    border-radius: 28px;
    padding: 28px 24px;
    border: 1px solid #e3d0f0;
}
.note-detail .title {
    font-size: 1.8rem;
    font-weight: 400;
}
.note-detail .content {
    white-space: pre-wrap;
    line-height: 1.8;
    margin: 20px 0;
}
/* ----- 底部 (foot.php) ----- */
.footer {
    text-align: center;
    font-size: 0.8rem;
    color: #a388b0;
    margin-top: 28px;
    border-top: 1px solid #ede0f5;
    padding-top: 20px;
}
/* ----- 表单 (add.php) ----- */
.note-form input,
.note-form textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 16px;
    border-radius: 24px;
    border: 1px solid #dcc6ea;
    background: #faf5fd;
    font-size: 0.95rem;
}
.note-form button {
    background: #d5bae8;
    border: none;
    padding: 10px 28px;
    border-radius: 60px;
    cursor: pointer;
    margin-right: 10px;
    font-weight: 500;
}
/* ----- 工具类 ----- */
.hidden {
    display: none;
}
/* ----- 响应式 ----- */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        min-width: unset;
    }
}