/*
Theme Name: OneBlog Remake V36 Details
Theme URI: https://oneblog.net/
Author: Gemini
Description: V36版本 - 微语UI微调，友链去空框，原生灯箱支持滑动切换。
Version: 6.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, minimal, clean, responsive, one-column, theme-options
*/

:root {
    --theme-color: #ffae84;
    --text-main: #333;
    --text-gray: #666;
    --bg-body: #f5f7f9;
    --bg-white: #fff;
    --border-radius: 12px;
    --main-width: 825px;       
    --container-max: 1155px;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.8;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--theme-color); }

/* --- [V36 升级] 原生 Lightbox 样式 --- */
#oneblog-lightbox {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
}
#oneblog-lightbox.active { opacity: 1; visibility: visible; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.92); cursor: zoom-out; }
.lightbox-content {
    position: relative; z-index: 1000000; 
    max-width: 90vw; max-height: 90vh;
    display: flex; justify-content: center; align-items: center;
}
.lightbox-content img {
    max-width: 100%; max-height: 90vh; 
    object-fit: contain; 
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 2px;
    background: #000;
}
/* 导航按钮 */
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; color: rgba(255,255,255,0.7); cursor: pointer;
    background: transparent; border: none; font-size: 30px;
    width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
    transition: color 0.2s, background 0.2s; z-index: 1000010;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: #fff; background: rgba(255,255,255,0.1); border-radius: 50%; }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    height: 64px;
    position: fixed; top: 0; left: 0; width: 100%; z-index: 999;
    display: flex; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    transition: top 0.3s;
    min-height: 64px; 
}
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

.header-inner { 
    width: 100%; max-width: var(--main-width); margin: 0 auto; padding: 0;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; 
}

.site-branding { display: flex; align-items: center; margin-right: 30px; flex-shrink: 0; height: 100%; }
.site-branding h1 { margin: 0; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; line-height: 1; }
.soul { font-size: 11px; background: #333; color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: normal; transform: translateY(-1px); }

/* Menu & Actions */
.header-menu { flex: 1; display: flex; justify-content: flex-start; margin-left: 30px; height: 100%; }
.header-menu ul { display: flex; list-style: none; padding: 0; margin: 0; gap: 25px; height: 100%; align-items: center; }
.header-menu li { display: flex; align-items: center; height: 100%; }
.header-menu li a { font-size: 15px; color: #555; font-weight: 500; padding: 0 5px; display: block; line-height: 64px; }
.header-menu li a:hover { color: var(--theme-color); }
.header-actions { display: flex; align-items: center; gap: 10px; height: 100%; }
.menu-toggle { display: none; background: none; border: none; font-size: 22px; color: #555; cursor: pointer; } 
.search-toggle { background: none; border: none; cursor: pointer; font-size: 20px; color: #555; padding: 5px; display: flex; transition: color 0.3s; }

/* Drawer */
.menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s; }
.menu-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; background: #fff; z-index: 2001; transform: translateX(-100%); transition: transform 0.3s; box-shadow: 2px 0 10px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }
body.menu-open .menu-drawer { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid #f0f0f0; }
.drawer-content { flex: 1; overflow-y: auto; padding: 10px 0; }
.drawer-menu ul { list-style: none; padding: 0; margin: 0; }
.drawer-menu li a { display: block; padding: 12px 25px; color: #666; font-size: 15px; border-bottom: 1px solid #fcfcfc; }
.menu-close { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; }

/* Page Thumb */
.page-thumb-wrapper { margin-top: 100px; margin-bottom: 40px; width: 100%; display: flex; justify-content: center; padding: 0; }
.page-thumb-header {
    position: relative; height: 400px; width: 100%; max-width: var(--main-width); border-radius: var(--border-radius);
    overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; text-align: center;
    background-size: cover; background-position: center; background-color: #333; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.page-thumb-header::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); }
.page-header-content { position: relative; z-index: 2; animation: fadeIn 1s; padding: 0 20px; width: 100%; }
.page-header-content h1 { 
    font-size: 36px; margin: 0 0 12px 0; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.5); 
    text-align: center; width: 100%; letter-spacing: 2px;
}
.page-header-content span { display: block; width: 100%; text-align: center; opacity: 0.9; font-size: 16px; font-family: "Noto Serif SC", serif; font-style: italic; letter-spacing: 1px; }

/* Container */
.container-narrow { max-width: var(--main-width); margin: 0 auto; width: 100%; padding: 0; }

/* Slider */
.home-slider { 
    width: 100%; height: 380px; border-radius: var(--border-radius); overflow: hidden; 
    margin-bottom: 30px; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    background: #f0f0f0; display: block; 
}
.swiper-wrapper { display: flex; width: 100%; height: 100%; }
.swiper-slide { position: relative; width: 100%; height: 100%; flex-shrink: 0; }
.slide-bg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; display: block; }
.swiper-slide:hover .slide-bg { transform: scale(1.05); }
.slide-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: #fff; z-index: 10; }
.slide-title { font-size: 24px; font-weight: bold; margin: 0 0 10px; }
.slide-meta { font-size: 13px; opacity: 0.8; }

/* Posts */
.post-list { margin-top: 100px; }
.post-item { background: #fff; padding: 35px; margin-bottom: 30px; border-radius: var(--border-radius); box-shadow: 0 5px 15px rgba(0,0,0,0.02); display: block; transition: transform 0.3s; }
.post-item:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.06); }
.post-title-home { font-size: 24px; font-weight: 700; margin: 0 0 15px 0; color: #333; }
.post-item:hover .post-title-home { color: var(--theme-color); }
.post-preview-home { display: flex; gap: 30px; font-size: 15px; color: var(--text-gray); }
.post-img-home { width: 200px; height: 130px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #eee; }
.post-excerpt { flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.7; text-align: justify; }

/* Memos (微语) & Photos */
.memo-item { background: #fff; padding: 30px; margin-bottom: 30px; border-radius: var(--border-radius); box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.memo-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.memo-avatar { width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0; }

/* [V36] 微语用户信息垂直排列优化 */
.memo-meta { 
    display: flex; 
    flex-direction: column; /* 垂直排列 */
    justify-content: center;
}
.memo-meta .author { font-weight: bold; color: #405b93; display: block; font-size: 16px; line-height: 1.2; margin-bottom: 4px; }
.memo-meta .date { font-size: 12px; color: #ccc; line-height: 1.2; }

.memo-content { font-size: 16px; color: #333; line-height: 1.7; margin-bottom: 15px; word-wrap: break-word; }
.memo-gallery { display: grid; gap: 8px; width: 100%; margin-top: 15px; grid-template-columns: repeat(2, 1fr); }
.memo-gallery-item { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: #f0f0f0; }
.memo-gallery-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.memo-gallery.grid-1 { grid-template-columns: 1fr; }
.memo-gallery.grid-1 .memo-gallery-item { aspect-ratio: auto; max-width: 60%; }

.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; padding-bottom: 40px; }
.photo-card { background: #fff; padding: 8px; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.3s; display: block; cursor: zoom-in; }
.photo-img-wrapper { width: 100%; aspect-ratio: 1; overflow: hidden; background: #eee; }
.photo-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.photo-card:hover .photo-img-wrapper img { transform: scale(1.05); }

.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding-bottom: 40px; }
.link-card { background: #fff; padding: 20px; border-radius: var(--border-radius); box-shadow: 0 2px 6px rgba(0,0,0,0.03); display: flex; align-items: center; gap: 15px; transition: all 0.3s ease; border: 1px solid transparent; }
.link-card:hover { transform: translateY(-5px); border-color: var(--theme-color); }
.link-avatar img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.link-info { flex: 1; min-width: 0; }
.link-name { font-weight: bold; margin-bottom: 4px; display: block; }
.link-desc { font-size: 13px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* Navigation */
.post-navigation { margin-top: 50px; padding-top: 0; border-top: none; }
.nav-links { display: flex; justify-content: space-between; gap: 15px; }
.nav-card { flex: 1; position: relative; display: block; padding: 30px; border-radius: var(--border-radius); background-color: #f7f7f7; background-size: cover; background-position: center; overflow: hidden; text-decoration: none; transition: transform 0.3s, box-shadow 0.3s; border: 1px solid #eee; min-width: 0; }
.nav-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: var(--theme-color); }
.nav-card.has-bg::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); transition: background 0.3s; }
.nav-card.has-bg:hover::before { background: rgba(0,0,0,0.2); }
.nav-card-content { position: relative; z-index: 2; }
.nav-card.has-bg .nav-card-content { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.nav-subtitle { display: block; font-size: 12px; margin-bottom: 5px; opacity: 0.8; text-transform: uppercase; }
.nav-title { display: block; font-size: 16px; font-weight: bold; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nav-card.no-bg .nav-subtitle { color: #888; }
.nav-card.no-bg .nav-title { color: #333; }
.nav-card.no-bg:hover .nav-title { color: var(--theme-color); }
.nav-previous { text-align: left; }
.nav-next { text-align: right; }

.site-footer { background: #fff; margin-top: 40px; padding: 50px 0; text-align: center; border-top: 1px solid #eee; color: #999; font-size: 14px; }

/* Comments */
.comments-area { margin-top: 30px; padding: 30px; background: #fff; box-shadow: none; border-top: 1px solid #eee; border-radius: 0; }
.comments-title { font-size: 18px; font-weight: bold; border-bottom: 2px solid #333; display: inline-block; padding-bottom: 5px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-body { padding: 20px 0; border-bottom: 1px solid #f5f5f5; }
.comment-meta { display: flex; align-items: center; margin-bottom: 10px; }
.comment-author img { width: 40px; height: 40px; border-radius: 50%; margin-right: 12px; object-fit: cover; }
.fn { font-style: normal; font-weight: bold; font-size: 15px; color: #333; }
.comment-metadata { margin-left: auto; font-size: 12px; color: #ccc; }
.comment-metadata a { color: #ccc; }
.comment-content { font-size: 15px; line-height: 1.7; color: #444; }
.reply { font-size: 12px; margin-top: 5px; }
.reply a { color: #999; }
.reply a:hover { color: var(--theme-color); }
.comment-respond { margin-top: 40px; }
.comment-reply-title { font-size: 16px; font-weight: bold; margin-bottom: 20px; display: block; }
.comment-form { display: flex; flex-wrap: wrap; gap: 15px; }
.comment-form p { margin: 0; width: 100%; }
.comment-form-author { flex: 1; min-width: 200px; }
.comment-form-comment { width: 100%; }
.comment-form input[type="text"], .comment-form textarea { width: 100%; padding: 12px; background: #f9f9f9; border: 1px solid #eee; border-radius: 4px; font-size: 15px; font-family: inherit; color: #333; outline: none; transition: all 0.2s; box-shadow: none; }
.comment-form input[type="text"]:focus, .comment-form textarea:focus { background: #fff; border-color: var(--theme-color); }
.comment-form-email, .comment-form-url { display: none; }
.comment-security { margin: 0; padding: 0; border: none; background: transparent; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.comment-security input { width: 80px !important; text-align: center; }
.form-submit { margin-top: 10px; width: 100%; }
.submit { background: #333; color: #fff; border: none; padding: 10px 30px; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background 0.2s; font-family: inherit; }
.submit:hover { background: var(--theme-color); }

@media (max-width: 900px) {
    .header-menu { display: none; }
    .menu-toggle { display: block; } 
    .page-thumb-header { height: 280px; max-width: 100%; }
    .home-slider { height: 260px; }
    .header-inner, .page-thumb-wrapper, .container-narrow { padding: 0 15px; }
    .post-preview-home { flex-direction: column-reverse; gap: 15px; }
    .post-img-home { width: 100%; height: 180px; }
    .nav-links { flex-direction: column; }
    .nav-card { width: 100%; }
    .comments-area { padding: 20px; border-top: none; }
    .comment-form { flex-direction: column; gap: 15px; }
    .comment-form-author { width: 100%; }
}
