/* ------------------------------------
 * Typecho Sea Foam Theme (Based on Default)
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */
body {
  /* 核心修改：背景设为透明，让 header.php 里的壁纸透出来 */
  background-color: transparent; 
  color: #444;
  font-family: 'Noto Sans SC', "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  font-size: 16px; /* 稍微大一点，阅读更舒服 */
  line-height: 1.6;
}

/* 全局链接颜色 */
a {
  color: #455a64;
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover, a:active {
  color: #00b4db; /* Sea Foam 青色 */
}

/* 代码块美化 */
pre, code { 
  background: rgba(255, 255, 255, 0.6); /* 半透明背景 */
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  border-radius: 6px;
}
code { 
  padding: 2px 6px; 
  color: #c7254e; 
  background-color: rgba(255, 255, 255, 0.8);
}
pre {
  padding: 15px;
  overflow: auto;
  max-height: 500px;
  border: 1px solid rgba(0,0,0,0.05);
}
pre code {
  padding: 0;
  color: #444;
  background: none;
}

/* 引用块美化 (Blockquote) */
blockquote {
  margin: 1.5em 0;
  padding: 15px 20px;
  border-left: 4px solid #00b4db; /* 青色左边框 */
  background: rgba(255, 255, 255, 0.5); /* 半透明背景 */
  color: #546e7a;
  border-radius: 0 8px 8px 0;
}

/* 表格美化 */
table {
  border-collapse: collapse; /* 合并边框 */
  width: 100%;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  overflow: hidden;
}
table th, table td {
  padding: 12px 15px;
  border: 1px solid rgba(0,0,0,0.05);
}
table th {
  background: rgba(0, 180, 219, 0.1);
  color: #0083b0;
  font-weight: 600;
}

/* 输入框美化 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 10px 15px;
  border: 1px solid rgba(0,0,0,0.1);
  width: 100%;
  border-radius: 12px;
  background: rgba(255,255,255,0.6);
  outline: none;
  transition: 0.3s;
}
input:focus, textarea:focus {
  background: white;
  border-color: #00b4db;
  box-shadow: 0 0 0 3px rgba(0, 180, 219, 0.1);
}
textarea { resize: vertical; }

/* ------------------
 * Header (样式大部分已移至 header.php，这里保留基础布局)
 * --------------- */
#header {
  /* 基础布局保留，样式由 header.php 的 inline style 覆盖 */
}

/* ------------------
 * Main Post Styles
 * --------------- */
.post {
  padding: 0; /* padding 由 glass-card 控制 */
  border-bottom: none; /* 去掉默认下划线 */
}

.post-content {
  line-height: 1.8;
  word-wrap: break-word;
}
.post-content img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ------------------
 * Comment List (评论区大改造)
 * --------------- */
#comments {
  padding-top: 0;
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 每一条评论变成一个气泡 */
.comment-list li {
  padding: 20px;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.6); /* 气泡背景 */
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.5);
  transition: 0.3s;
}
.comment-list li:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(5px);
}

/* 作者的高亮评论 */
.comment-list li.comment-by-author {
  background: rgba(0, 180, 219, 0.05);
  border-color: rgba(0, 180, 219, 0.2);
}

.comment-list li .comment-reply {
  text-align: right;
  font-size: 0.9em;
}
.comment-list li .comment-reply a {
  color: #00b4db;
}

.comment-meta a {
  color: #90a4ae;
  font-size: 0.85em;
}

.comment-author {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  color: #444;
}
.comment-author .avatar {
  float: none;
  margin-right: 12px;
  border-radius: 50%;
  width: 40px; height: 40px;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.comment-author cite {
  font-weight: 700;
  font-style: normal;
  color: #2c3e50;
}

/* 评论回复框 */
.respond {
  margin-top: 30px;
  background: rgba(255,255,255,0.5);
  padding: 20px;
  border-radius: 16px;
}
.respond .cancel-comment-reply {
  float: right;
  margin-top: 5px;
  font-size: 0.9em;
}
#comment-form label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: #546e7a;
}
#comment-form button {
  margin-top: 10px;
  padding: 8px 25px;
  background: #00b4db;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}
#comment-form button:hover {
  background: #0083b0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 180, 219, 0.3);
}

/* ------------------
 * Secondary (Sidebar)
 * --------------- */
#secondary {
  /* 样式大部分由 sidebar.php 的 inline style 控制，这里做兜底 */
  padding-top: 0;
}

/* ------------------
 * Footer 
 * --------------- */
#footer {
  padding: 40px 0;
  line-height: 1.5;
  text-align: center;
  color: #fff; /* 底部文字改为白色，因为背景是深色壁纸 */
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
#footer a {
  color: rgba(255,255,255,0.8);
}
#footer a:hover {
  color: white;
  text-decoration: underline;
}

/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 100px;
  margin-bottom: 100px;
  text-align: center;
  color: #fff;
}
.error-page h2 {
  font-size: 4em;
  color: white;
  text-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* -----------------
 * Responsive (移动端适配)
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 15px;
  }
  .glass-card {
    padding: 20px; /* 移动端减小内边距 */
  }
  #header {
    margin-bottom: 20px;
  }
  #nav-menu a {
    padding: 0 10px;
    font-size: 0.9em;
  }
}

@media (max-width: 768px) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
  /* 移动端侧边栏通常隐藏或沉底，这里简单处理 */
  #secondary {
    margin-top: 30px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1100px; /* 加宽容器，让卡片看起来更大气 */
  }
}

/* 工具类：隐藏 */
.hidden { display: none !important; visibility: hidden; }
.sr-only { border: 0; height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }