/* 轻墨 (Qingmo) - 温室手帖主题 */
/* 基于 2000 Blog 复古风格美化 */

@font-face {
    font-family: "LXGW";
    src: url("LXGWWenKaiLite-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: "LXGW", "LXGWWenKaiLite", "Noto Serif SC", "Source Han Serif SC", "SimSun", "STSong", "FangSong", "宋体", serif;
    font-size: 15px;
    line-height: 2;
    color: #2c2c2c;
    background: linear-gradient(135deg, #e8f0ff 0%, #f0e8ff 50%, #ffe8f0 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 30px 20px;
    min-height: 100vh;
}

a {
    color: #6b5b95;
    text-decoration: none;
    border-bottom: 1px dashed #b8a8d8;
    transition: all 0.25s ease;
    position: relative;
}

a:hover {
    color: #4a3a75;
    border-bottom: 1px solid #8a7ab5;
    background: linear-gradient(180deg, transparent 60%, rgba(180, 160, 220, 0.2) 60%);
}

.container {
    max-width: 860px;
    margin: 0 auto;
    border: 1px solid #d0c8e0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 4px rgba(107, 91, 149, 0.06),
        0 8px 16px rgba(107, 91, 149, 0.08),
        0 16px 32px rgba(107, 91, 149, 0.04);
    border-radius: 2px;
}

.header {
    border-bottom: 3px double #c8c0d8;
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.header h1 {
    margin: 0 0 8px 0;
    font-size: 26px;
    letter-spacing: 3px;
    font-weight: normal;
}

.header h1 a {
    color: #4a3a75;
    text-decoration: none;
    border-bottom: none;
    background: none;
}

.header h1 a:hover {
    color: #6b5b95;
    background: none;
}

.header .desc {
    margin: 0 0 10px 0;
    color: #888;
    font-size: 13px;
}

.nav {
    font-size: 13px;
    padding-top: 8px;
    color: #999;
}

.nav a {
    margin: 0 6px;
    font-size: 13px;
    color: #7a6a9a;
    border-bottom: 1px dashed #c0b8d0;
}

.nav a:hover {
    color: #5a4a7a;
    border-bottom: 1px solid #9a8aba;
}

.main {
    float: left;
    width: 65%;
}

.sidebar {
    float: right;
    width: 32%;
    border-left: 1px dashed #d0c8e0;
    padding-left: 15px;
}

.sidebar .box {
    margin-bottom: 20px;
    border-bottom: 1px dashed #d0c8e0;
    padding-bottom: 12px;
}

.sidebar .box:last-child {
    border-bottom: none;
}

.sidebar .box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #c8c0d8;
    padding-bottom: 5px;
    color: #4a3a75;
    font-weight: normal;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    font-size: 13px;
    margin-bottom: 6px;
}

.sidebar li a {
    font-size: 13px;
    color: #7a6a9a;
}

.clear {
    clear: both;
}

.footer {
    border-top: 1px solid #c8c0d8;
    margin-top: 25px;
    padding-top: 15px;
    text-align: center;
    font-size: 12px;
    color: #aaa;
}

.footer a {
    color: #999;
    border-bottom: 1px dashed #ccc;
}

.footer a:hover {
    color: #6b5b95;
    border-bottom: 1px solid #8a7ab5;
}

/* 文章列表 */
.post-list {
    margin-bottom: 25px;
}

.post-item {
    border-bottom: 1px dashed #d0c8e0;
    padding-bottom: 15px;
    margin-bottom: 18px;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item h2 {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: normal;
}

.post-item h2 a {
    color: #4a3a75;
    border-bottom: none;
    background: none;
}

.post-item h2 a:hover {
    color: #6b5b95;
    background: linear-gradient(180deg, transparent 60%, rgba(180, 160, 220, 0.25) 60%);
}

.post-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.post-summary {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

/* 文章详情 */
.post-content {
    margin-bottom: 25px;
}

.post-content h1 {
    font-size: 20px;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #e0d8f0;
    padding-bottom: 8px;
    text-align: center;
    letter-spacing: 2px;
    font-weight: normal;
    color: #4a3a75;
}

.post-content .content {
    line-height: 2;
}

.post-content .content p {
    margin: 0 0 12px 0;
    text-indent: 2em;
}

.post-content .content h2,
.post-content .content h3,
.post-content .content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: normal;
    color: #4a3a75;
}

.post-content .content h2 {
    font-size: 17px;
    border-bottom: 1px solid #e0d8f0;
    padding-bottom: 5px;
}

.post-content .content h3 {
    font-size: 15px;
    padding-left: 12px;
    border-left: 3px solid #b8a8d8;
}

.post-content .content blockquote {
    margin: 1em 0;
    padding: 10px 15px;
    border-left: 3px solid #c8b8e8;
    background: rgba(200, 184, 232, 0.08);
    color: #555;
}

.post-content .content blockquote p {
    text-indent: 0;
    margin-bottom: 0;
}

.post-content .content code {
    background: rgba(200, 184, 232, 0.12);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
    color: #6b5b95;
}

.post-content .content pre {
    background: rgba(200, 184, 232, 0.08);
    padding: 12px 15px;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid #e0d8f0;
}

.post-content .content pre code {
    background: none;
    padding: 0;
}

.post-content .content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 14px;
}

.post-content .content th,
.post-content .content td {
    border: 1px solid #d0c8e0;
    padding: 6px 10px;
    text-align: left;
}

.post-content .content th {
    background: rgba(200, 184, 232, 0.12);
    font-weight: normal;
    color: #4a3a75;
}

.post-content .content hr {
    border: none;
    border-top: 1px dashed #d0c8e0;
    margin: 2em 0;
    position: relative;
}

.post-content .content hr::after {
    content: "✿";
    position: absolute;
    left: 50%;
    top: -0.6em;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.88);
    padding: 0 12px;
    color: #c8b8e8;
    font-size: 0.85rem;
}

.post-content .content ul,
.post-content .content ol {
    margin: 0.5em 0 1em 2em;
    padding-left: 1em;
}

.post-content .content li {
    margin-bottom: 0.3em;
}

/* 评论 */
.comment-list {
    margin-top: 25px;
    border-top: 1px solid #c8c0d8;
    padding-top: 15px;
}

.comment-list h3 {
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: normal;
    color: #4a3a75;
}

.comment-item {
    border-bottom: 1px dashed #d0c8e0;
    padding: 10px 0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item .comment-meta {
    font-size: 12px;
    color: #999;
}

.comment-item .comment-content {
    margin-top: 6px;
    line-height: 1.7;
}

.comment-form {
    margin-top: 20px;
    border: 1px solid #d0c8e0;
    padding: 15px;
    background: rgba(200, 184, 232, 0.06);
    border-radius: 4px;
}

.comment-form label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #666;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 90%;
    border: 1px solid #c8c0d8;
    padding: 5px 8px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    border-color: #a898c8;
    box-shadow: 0 0 0 3px rgba(180, 160, 220, 0.15);
    outline: none;
}

.comment-form textarea {
    height: 100px;
    line-height: 1.6;
}

/* 按钮 */
button, input[type="submit"] {
    border: 1px solid #b0a0c8;
    background: linear-gradient(180deg, #f0e8ff 0%, #e8e0f8 100%);
    padding: 5px 16px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
    color: #4a3a75;
}

button:hover, input[type="submit"]:hover {
    background: linear-gradient(180deg, #e8e0f8 0%, #e0d8f0 100%);
    border-color: #9a8aba;
    box-shadow: 0 2px 4px rgba(107, 91, 149, 0.1);
}

/* 分页 */
.pagination {
    margin: 20px 0;
    font-size: 13px;
    text-align: center;
}

.pagination a {
    margin: 0 4px;
    padding: 2px 8px;
    border: 1px solid #d0c8e0;
    border-radius: 3px;
    color: #6b5b95;
}

.pagination a:hover {
    background: rgba(200, 184, 232, 0.12);
    border-color: #b0a0c8;
}

/* 标签 */
.tag-list {
    font-size: 13px;
    margin-top: 8px;
}

.tag-list a {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 2px 8px;
    background: rgba(200, 184, 232, 0.12);
    border: 1px solid #d0c8e0;
    border-radius: 3px;
    font-size: 12px;
    color: #6b5b95;
    border-bottom: 1px solid #d0c8e0;
}

.tag-list a:hover {
    background: rgba(200, 184, 232, 0.25);
    border-color: #b0a0c8;
    color: #4a3a75;
}

/* 管理后台 */
.admin-login {
    max-width: 400px;
    margin: 50px auto;
    border: 1px solid #c8c0d8;
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(107, 91, 149, 0.08);
    border-radius: 4px;
}

.admin-login h2 {
    margin-top: 0;
    border-bottom: 1px solid #c8c0d8;
    padding-bottom: 8px;
    font-size: 18px;
    text-align: center;
    font-weight: normal;
    color: #4a3a75;
}

.admin-nav {
    background: rgba(200, 184, 232, 0.1);
    border: 1px solid #c8c0d8;
    padding: 10px 12px;
    margin-bottom: 18px;
    font-size: 13px;
    border-radius: 4px;
}

.admin-nav a {
    margin-right: 12px;
    border-bottom: none;
    color: #6b5b95;
}

.admin-nav a:hover {
    color: #4a3a75;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th, .admin-table td {
    border: 1px solid #c8c0d8;
    padding: 6px 10px;
    text-align: left;
}

.admin-table th {
    background: rgba(200, 184, 232, 0.12);
    font-weight: normal;
    color: #4a3a75;
}

.admin-form label {
    display: block;
    font-size: 13px;
    margin: 12px 0 4px 0;
    color: #555;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    max-width: 500px;
    border: 1px solid #c8c0d8;
    padding: 5px 8px;
    font-family: inherit;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-form input[type="text"]:focus,
.admin-form input[type="password"]:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    border-color: #a898c8;
    box-shadow: 0 0 0 3px rgba(180, 160, 220, 0.15);
    outline: none;
}

.admin-form textarea {
    height: 300px;
    line-height: 1.8;
}

.msg {
    border: 1px solid #c8c0d8;
    padding: 10px 12px;
    margin-bottom: 15px;
    font-size: 13px;
    border-radius: 4px;
}

.msg.success {
    background: rgba(180, 220, 180, 0.15);
    border-color: #7cb342;
    color: #3d5a26;
}

.msg.error {
    background: rgba(220, 180, 180, 0.15);
    border-color: #e57373;
    color: #8b1a1a;
}

/* 响应式 */
@media (max-width: 600px) {
    body {
        padding: 15px 10px;
        font-size: 15px;
    }
    .container {
        padding: 20px 15px;
    }
    .main, .sidebar {
        float: none;
        width: 100%;
        border-left: none;
        padding-left: 0;
    }
    .sidebar {
        margin-top: 25px;
        border-top: 1px dashed #d0c8e0;
        padding-top: 15px;
    }
    .header h1 {
        font-size: 22px;
    }
    .post-content h1 {
        font-size: 18px;
    }
}
