/* ------------------------------------
 * Typecho Default Theme
 *
 * @author  Typecho Team
 * @link  http: //typecho.org/
 * @update  2013-10-28
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */
body {
  background-color: #faf7fc;  /* 极浅紫白背景 */
  color: #444;
  font-family: "Droid Serif", Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei","Microsoft Yahei", serif;
  font-size: 87.5%;
}

a {
  color: #ad6598;  /* 豆蔻紫主色 */
  text-decoration: none;
}
a:hover, a:active {
  color: #7a4568;  /* 深紫褐色 */
}
pre, code { 
  background: #F3F3F3;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
}
code { padding: 2px 4px; color: #B94A48; }
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
}
pre code {
  display: block;
  padding: 3px;
  color: #444;
}

blockquote {
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 4px solid #e8dce9;  /* 柔和紫灰 */
  color: #666;
}

table {
  border: 1px solid #e8dce9;
  width: 100%;
}
table th,
table td {
  padding: 5px 10px;
  border: 1px solid #e8dce9;
}
table th {
  background: #f3f3f3;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei","Microsoft Yahei", sans-serif;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 5px;
  border: 1px solid #e8dce9;
  width: 100%;

  border-radius: 2px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
textarea {
  resize: vertical;
}


/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid #e8dce9;
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: transparent;
}

/* ------------------
 * Header
 * --------------- */

#header {
  padding-top: 35px;
  border-bottom: 1px solid #e8dce9;
}

#logo {
  color: #333;
  font-size: 2.5em;
}
#logo img {
    max-height: 64px;
}

.description {
  margin: .5em 0 0;
  color: #999;
  font-style: italic;
}

/* Navigation menu */
#nav-menu {
  margin: 25px 0 0;
  padding: 0;
}
#nav-menu a {
  display: block;
  margin-right: -1px;
  padding: 0 20px;
  border: 1px solid #e8dce9;
  border-bottom: none;
  height: 32px;
  line-height: 32px;
  color: #444;
  float: left;
}
#nav-menu a:hover,
#nav-menu .current {
  background: #ad6598;  /* 主色背景 */
  color: #fff;          /* 白色文字 */
}
#nav-menu a:hover {
  background: #7a4568;  /* 深色悬停 */
}

/* Search */
#search {
  position: relative;
  margin-top: 15px;
}
#search input {
  padding-right: 30px;
}
#search button {
  position: absolute;
  right: 4px;
  top: 2px;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  background: #ad6598 url(img/icon-search.png) no-repeat center center; /* 主色背景 + 图标 */
  background-size: 16px 16px;  /* 调整图标大小，可根据实际图标调整 */
  direction: ltr;
  text-indent: -9999em;
  border-radius: 2px;
}

@media 
(-webkit-min-device-pixel-ratio: 2), 
(min-resolution: 192dpi) {
  #search button {
    background-image: url(img/icon-search@2x.png);
    -webkit-background-size: 24px 24px;
    -moz-background-size: 24px 24px;
    -o-background-size: 24px 24px;
    background-size: 24px 24px;
  }
}


/* ------------------
 * Main
 * --------------- */

/* 原 .post 样式已被后面的卡片式样式覆盖，此处保留但实际不生效 */
.post {
  padding: 15px 0 20px;
  border-bottom: 1px solid #e8dce9;
}
.post-title {
  margin: .83em 0;
  font-size: 1.4em;
}
.post-meta {
  margin-top: -0.5em;
  padding: 0;
  color: #999;
  font-size: .92857em;
}
.post-meta li {
  display: inline-block;
  margin: 0 8px 0 0;
  padding-left: 12px;
  border-left: 1px solid #e8dce9;
}
.post-meta li:first-child {
  margin-left: 0;
  padding-left: 0;
  border: none;
}
.post-content {
  line-height: 1.5;
}
.post .tags {
  clear: both;
}

.post-near {
  list-style: none;
  margin: 30px 0;
  padding: 0;
  color: #999;
}
.post-near li {
  margin: 10px 0;
}

.archive-title {
  margin: 1em 0 -1em;
  padding-top: 20px;
  color: #999;
  font-size: 1em;
}
.more {
  text-align: center;
}
.more a {
  border: none;
}
.protected .text {
  width: 50%;
}

/* Page nav */

.page-navigator {
  list-style: none;
  margin: 25px 0;
  padding: 0;
  text-align: center;
}
.page-navigator li {
  display: inline-block;
  margin: 0 4px;
}
.page-navigator a {
  display: inline-block;
  padding: 0 10px;
  height: 30px;
  line-height: 30px;
}
.page-navigator a:hover {
  background: #e8dce9;
  text-decoration: none;
}
.page-navigator .current a {
  color: #fff;
  background: #ad6598;  /* 当前页码主色 */
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 15px;
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 14px;
  margin-top: 10px;
  border: 1px solid #e8dce9;
}
.comment-list li.comment-level-odd {
  background: #faf7fc;
}
.comment-list li.comment-level-even {
  background: #FFF;
}
.comment-list li.comment-by-author {
  background: #f5edf2;  /* 作者评论浅紫背景 */
}
.comment-list li .comment-reply {
  text-align: right;
  font-size: .92857em;
}
.comment-meta a {
  color: #999;
  font-size: .92857em;
}
.comment-author {
  display: block;
  margin-bottom: 3px;
  color: #444;
}
.comment-author .avatar {
  float: left;
  margin-right: 10px;
}
.comment-author cite {
  font-weight: bold;
  font-style: normal;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 15px;
  border-top: 1px solid #e8dce9;
}
.respond .cancel-comment-reply {
  float: right;
  margin-top: 15px;
  font-size: .92857em;
}
#comment-form label {
  display: block;
  margin-bottom: .5em;
  font-weight: bold;
}
#comment-form .required:after {
  content: " *";
  color: #ad6598;  /* 必填星号用主色 */
}

/* ------------------
 * secondary
 * --------------- */
#secondary {
  padding-top: 15px;
  word-wrap: break-word;
}
.widget {
  margin-bottom: 30px;
}
.widget-list {
  list-style: none;
  padding: 0;
}
.widget-list li {
  margin: 5px 0;
  line-height: 1.6;
}

.widget-list li ul {
  margin-left: 15px;
}


/* ------------------
 * Footer 
 * --------------- */
#footer {
  padding: 3em 0;
  line-height: 1.5;
  text-align: center;
  color: #999;
  border-top: 1px solid #e8dce9;  /* 添加顶部边框与整体风格统一 */
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 100px;
  margin-bottom: 100px;
}


/* -----------------
 * Content format
 *--------------- */
.post-content, .comment-content {
  line-height: 1.5;
  word-wrap: break-word;
}
.post-content h2, .comment-content h2 {
  font-size: 1.28571em;
}
.post-content img, .comment-content img,
.post-content video, .comment-content video {
  max-width: 100%;
}
.post-content a img,
.comment-content a img {
  background: #FFF;
  position: relative;
  bottom: -4px;
}
.post-content hr, .comment-content hr {
  margin: 2em auto;
  width: 100px;
  border: 1px solid #E9E9E9;
  border-width: 2px 0 0 0;
}


/* -----------------
 * Misc
 *--------------- */
.aligncenter, div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignleft {
  float: left;
}
.alignright {
  float: right;
}
img.alignleft {
  margin: 0 15px 0 0;
}
img.alignright {
  margin: 0 0 0 15px;
}


/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 81.25%;
  }
  #nav-menu a {
    float: none;
    display: inline-block;
    margin: 0 -2px;
  }
}

@media (max-width: 768px) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
}

/* 大屏幕时容器最大宽度（保留原有） */
@media (min-width: 1200px) {
  .container {
    max-width: 952px;
  }
}

/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
  display: none !important;
  visibility: hidden; }

/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.sr-only {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px; }

/*
* Extends the .sr-only class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto; }

/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
  visibility: hidden; }

/* ====================== 以下为新增/修改的自定义样式 ====================== */

/* 站点品牌区：图片 + 文字横向排列，垂直居中 */
.site-branding {
    display: flex;
    align-items: center;      /* 垂直居中 */
    gap: 20px;                /* 图片与文字间距 */
    flex-wrap: wrap;          /* 手机端自动换行 */
}

/* 图片 Logo 区域 */
.brand-logo {
    flex-shrink: 0;           /* 防止图片被压缩 */
}
.brand-logo img {
    display: block;
    max-height: 30px;         /* Logo 最大高度 30px（可根据需要调整） */
    width: auto;
    border-radius: 8px;       /* 可选：圆角 */
}

/* 文字区域 */
.brand-text {
    flex: 1;
}

/* 站点标题 */
.site-title {
    margin: 0;
    font-size: 28px;          /* 标题字号 */
    line-height: 1.2;
}
.site-title a {
    color: #333;
    text-decoration: none;
}
.site-title a:hover {
    color: #ad6598;           /* 标题悬停主色 */
}

/* 格言 / 描述 */
.site-description {
    margin: 5px 0 0;
    font-size: 14px;          /* 描述字号 */
    line-height: 1.4;
    color: #666;              /* 深灰色更柔和 */
    font-style: normal;       /* 正常样式，取消斜体 */
}

/* 手机端适配：图片与文字可居中，适当缩小字号 */
@media (max-width: 768px) {
    .site-branding {
        flex-direction: column;   /* 手机端改为上下排列 */
        text-align: center;
        gap: 10px;
    }
    .site-title {
        font-size: 24px;
    }
    .site-description {
        font-size: 12px;
    }
    .brand-logo img {
        max-height: 40px;
        margin: 0 auto;
    }
}

/* 文章卡片样式 + 悬停动画 */
.post {
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    position: relative;          /* 为左侧竖条提供定位参考 */
    overflow: hidden;           /* 可选，防止竖条超出圆角边界 */
}

/* 左侧竖条 - 默认隐藏（宽度0） */
.post::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;                  /* 距离顶部距离，可调 */
    bottom: 12px;               /* 距离底部距离，可调 */
    width: 0;
    background: #ad6598;        /* 豆蔻紫主色 */
    border-radius: 0 4px 4px 0; /* 右侧圆角 */
    transition: width 0.25s ease-out;
}

/* 悬停效果：向右移动 + 竖条显现 */
.post:hover {
    transform: translateX(6px);  /* 向右移动6px，可调 */
    box-shadow: 0 12px 28px rgba(173, 101, 152, 0.15);
}

.post:hover::before {
    width: 4px;                 /* 竖条宽度，可调 */
}

/* 标题颜色变化保持 */
.post-title a {
    transition: color 0.2s ease;
}

.post:hover .post-title a {
    color: #ad6598;
}

/* ========= 整体内容左移（保留左边距，不贴边） ========= */
.container {
    margin-left: 20px;   /* 左边距20px，可根据喜好改为 30px 或 5% 等 */
    margin-right: auto;  /* 右侧自动留白 */
}

/* 文章区域整体下移，增加与页头的距离 */
#body {
    padding-top: 30px;
}

/* 手机端时恢复左右边距，避免贴边 */
@media (max-width: 768px) {
    .container {
        margin-left: 15px;
        margin-right: 15px;
    }
    #body {
        padding-top: 20px;
    }
}