/* modified from http://www.yinwang.org/main.css */
body {
  font-family:"lucida grande", "lucida sans unicode", lucida, helvetica, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  background-color: #F5E8C7;
  color: #4A4035;
  font-size: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 内容包装器 - 两栏布局 */
.content-wrapper {
  margin: auto;
  width: 1000px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

div.main {
  flex: 1;
  padding: 2% 5% 5% 5%;
  line-height: 150%;
  border: 1px solid #D8A48F;
  border-radius: 12px;
  background-color: #FDF6E3;
  min-width: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.title-header {
  margin-bottom: 20px;
}

.title-header h2 {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2em;
}

.title-header h2 .theme-toggle-btn {
  background: none;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 15px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.title-header h2 .theme-toggle-btn:hover {
  background-color: #F5E8C7;
  border-color: #D8A48F;
}

/* 主内容区域布局 */
.main-content-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.vertical-divider {
  width: 1px;
  background-color: #D8A48F;
  align-self: stretch;
  flex-shrink: 0;
}

.sidebar-inline {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

/* 侧边栏样式 */
.sidebar {
  width: 280px;
  flex-shrink: 0;
}

.github-info {
  border: 1px solid #D8A48F;
  border-radius: 12px;
  padding: 20px;
  background-color: #FDF6E3;
  margin-top: 60px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-inline .github-info {
  margin-top: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.github-profile {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.github-info h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.1em;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}



.github-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 15px;
  border: 3px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  align-self: center;
}

.github-details h4 {
  margin: 0 0 5px 0;
  font-size: 1.2em;
  border: none;
}

.github-details h4 a {
  color: #333;
  text-decoration: none;
}

.github-details h4 a:hover {
  color: #0366d6;
}

.github-username {
  color: #666;
  font-size: 0.9em;
  margin: 0 0 15px 0;
}

.github-stats {
  display: flex;
  justify-content: space-around;
  margin: 15px 0;
  padding: 10px 0;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-weight: bold;
  font-size: 1.1em;
  color: #333;
}

.stat-label {
  display: block;
  font-size: 0.8em;
  color: #666;
  margin-top: 2px;
}

.github-links {
  margin-top: 15px;
}

.github-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: #0366d6;
  color: white !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9em;
  transition: background-color 0.2s;
}

.github-link:hover {
  background-color: #0256cc;
  text-decoration: none;
}

H1, H2, H3, H4 {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Helvetica, STKaiti, SimSun, serif; 
  width: 98%;
  line-height: 150%;
  color: #4A4035;
  transition: color 0.3s ease;
}

H1, H2 {
  margin-bottom: 1.67em;
  padding: 0.2em;
  border-bottom: 2px #D8A48F solid;
  transition: border-color 0.3s ease;
}

H3, H4 {
  margin-top: 2.14em;
  margin-bottom: 1.5em;
  border-bottom: 1px #D8A48F solid;
  transition: border-color 0.3s ease;
}

blockquote {
  margin: 0 0 0 0.25em;
  padding: 0 0 0 0.5em;
  border-left: 0.25em #A8B5A2 solid;
  background-color: #F5E8C7;
  color: #4A4035;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

pre {
  font-family: Inconsolata, Consolas, "DEJA VU SANS MONO", "DROID SANS MONO", Proggy, monospace;
  border: solid 1px #A8B5A2;
  border-radius: 3px;
  background-color: #FDF6E3;
  padding: 6px 10px;
  font-size: 1em;
  line-height: 100%;
  overflow: auto;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

code {
  font-family: Inconsolata, Consolas, "DEJA VU SANS MONO", "DROID SANS MONO", Proggy, monospace;
  font-size: 0.75em;
  border: none;
  border-radius: 3px;
  background-color: #F5E8C7;
  color: #4A4035;
  margin: 0 2px;
  padding: 0px 5px;
  word-wrap: break-word;
  word-break: break-all;
  transition: background-color 0.3s ease, color 0.3s ease;
}

pre code {
  border: none;
  margin: 0;
  padding: 0;
  background-color: transparent;
  word-wrap: normal;
}

a {
  text-decoration: none;
  padding: 1px;
  color: #D8A48F;
  word-wrap: break-word;
  word-break: break-all;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
  color: #A8B5A2;
  transition: color 0.3s ease;
}

div.tag_cloud a {
  word-wrap: normal;
  word-break: normal;
}

/* 导航样式已移除 - 不再使用navigation.html */

img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 居中图片样式 */
.center-image {
  margin: 0 auto;
  display: block;
  max-width: 100%;
  height: auto;
}

/* 图片容器 */
.image-container {
  text-align: center;
  margin: 1.5em 0;
}

/* 图片标题 */
.image-caption {
  font-style: italic;
  color: #666;
  font-size: 0.9em;
  margin-top: 0.5em;
}

img.emoji {
  display: inline;
  margin-bottom: 0;
}

hr {
  border: 0;
  height: 2px;
  background-color: LightGrey;
  margin: 0.75em 0;
}

strong {
  color: #666666;
}

div.overview {
  margin: 1.75em 1.25em 1.75em 1.25em;
}

div.detail {
  margin-left: 28%;
}

div.date { 
  padding-top: 1px;
  float: left; 
  width: 25%; 
  color: #555;
  text-align: right; 
  font-style: italic; 
  font-size: 0.75em;
}

div.paginator {
  margin-left: 20%;
  float: center;
  width: 60%;
  color: #555;
  text-align: center;
  font-size: 0.75em;
}

.prev_next {
  display: block;
  padding: 0;
  padding-top: 0.6em;
}

.prev_next li {
  list-style-type: none;
  padding: 0 0 0.2em;
}

.prev_next li span {
  padding: 0 0.5em 0 0.5em;
  background-color: lightslategrey;
  color: #fff;
  margin-right: 0.5em;
}

div.post_footer {
  text-align: right;
  font-size: 0.9em;
  font-style: italic;
}

div.post_footer a {
  border: LightGrey 1px dashed;
}

table {
  border-collapse: collapse;
}

th {
  padding: 0.375em 0.8125em;
  border: 1px solid #ddd;
  font-weight: bold;
}

td {
  padding: 0.375em 0.8125em;
  border: 1px solid #ddd;
}

tr:nth-child(2n) {
  background-color: #f8f8f8;
}

/* 主题切换按钮样式 */
.theme-toggle-btn {
  background: #f0f0f0;
  border: 1px solid #ccc;
  font-size: 1em;
  cursor: pointer;
  padding: 0.2em 0.4em;
  margin-left: 0.5em;
  border-radius: 4px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  min-width: 32px;
  height: 1.3em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.theme-toggle-btn:hover {
  background-color: #e0e0e0;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.theme-toggle-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 暗色主题样式 */
[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="dark"] body {
  background-color: #1a1a1a;
  color: #e0e0e0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] div.main {
  border: 1px solid #444;
  background-color: #2d2d2d;
  border-radius: 12px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] H1, [data-theme="dark"] H2, [data-theme="dark"] H3, [data-theme="dark"] H4 {
  color: #b0b0b0;
}

[data-theme="dark"] H1, [data-theme="dark"] H2 {
  border-bottom: 2px #444 solid;
}

[data-theme="dark"] H3, [data-theme="dark"] H4 {
  border-bottom: 1px #444 solid;
}

[data-theme="dark"] blockquote {
  border-left: 0.25em #666 solid;
  background-color: #252525;
  color: #e0e0e0;
}

[data-theme="dark"] pre {
  border: solid 1px #444;
  background-color: #2d2d2d;
  color: #e0e0e0;
}

[data-theme="dark"] code {
  border: none;
  background-color: #2d2d2d;
  color: #e0e0e0;
}

[data-theme="dark"] a {
  color: #66b3ff;
}

[data-theme="dark"] a:hover {
  color: #99ccff;
}

/* 深色主题导航样式已移除 - 不再使用navigation.html */

[data-theme="dark"] .image-caption {
  color: #999;
}

[data-theme="dark"] hr {
  background-color: #444;
}

[data-theme="dark"] strong {
  color: #b0b0b0;
}

[data-theme="dark"] div.date {
  color: #999;
}

[data-theme="dark"] div.paginator {
  color: #999;
}

[data-theme="dark"] .prev_next li span {
  background-color: #555;
}

[data-theme="dark"] div.post_footer a {
  border: #666 1px dashed;
}

[data-theme="dark"] table {
  background-color: #2d2d2d;
  border-color: #404040;
}

[data-theme="dark"] th {
  border: 1px solid #404040;
  background-color: #404040;
  color: #e0e0e0;
}

[data-theme="dark"] td {
  border: 1px solid #404040;
  color: #e0e0e0;
}

[data-theme="dark"] tr:nth-child(even) {
  background-color: #252525;
}

[data-theme="dark"] .theme-toggle-btn {
  background-color: #404040;
  color: #e0e0e0;
  border-color: #606060;
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background-color: #505050;
}

/* 暗色主题下的侧边栏样式 */
[data-theme="dark"] .github-info {
  background-color: #2d2d2d;
  border-color: #444;
  border-radius: 12px;
}

[data-theme="dark"] .github-info h3 {
  color: #b0b0b0;
  border-bottom-color: #444;
}

[data-theme="dark"] .github-avatar {
  border-color: #555;
}

[data-theme="dark"] .github-details h4 a {
  color: #e0e0e0;
}

[data-theme="dark"] .github-details h4 a:hover {
  color: #66b3ff;
}

[data-theme="dark"] .github-username {
  color: #999;
}

[data-theme="dark"] .github-stats {
  border-top-color: #444;
  border-bottom-color: #444;
}

[data-theme="dark"] .stat-number {
  color: #e0e0e0;
}

[data-theme="dark"] .stat-label {
  color: #999;
}

[data-theme="dark"] .github-link {
  background-color: #0366d6;
}

[data-theme="dark"] .github-link:hover {
  background-color: #0256cc;
}

/* 暗色主题下的标题头部按钮样式 */
[data-theme="dark"] .title-header h2 .theme-toggle-btn {
  border-color: #555;
  color: #e0e0e0;
}

[data-theme="dark"] .title-header h2 .theme-toggle-btn:hover {
  background-color: #404040;
  border-color: #777;
}

/* 暗色主题下的h2标题样式 */
[data-theme="dark"] .title-header h2 {
  border-bottom-color: #444;
}

/* 暗色主题下的竖向分割线 */
[data-theme="dark"] .vertical-divider {
  background-color: #444;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .content-wrapper {
    width: 95%;
    flex-direction: column;
  }
  
  .main-content-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  
  .vertical-divider {
    width: 100%;
    height: 1px;
    min-height: 1px;
  }
  
  .sidebar-inline {
    width: 100%;
    order: -1;
  }
  
  .sidebar {
    width: 100%;
    order: -1;
  }
  
  .github-info {
    margin-top: 20px;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .github-stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .stat-number, .stat-label {
    display: inline;
  }
}

/* GitHub区域内的footer样式 */
.github-links .footer-content {
  margin-top: 15px;
  padding: 10px 0;
  text-align: center;
  border-top: 1px solid #e9ecef;
}

.github-links .footer-text {
  font-size: 1.1em;
  color: #6c757d;
  margin: 0;
  font-weight: 300;
  letter-spacing: 1px;
}

/* 暗色主题下的GitHub区域footer样式 */
[data-theme="dark"] .github-links .footer-content {
  border-top-color: #4a5568;
}

[data-theme="dark"] .github-links .footer-text {
  color: #a0aec0;
}

/* 浮动按钮样式 */
.floating-buttons {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floating-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: #0366d6;
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.floating-btn:hover {
  background-color: #0256cc;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.floating-btn.back-to-top {
  background-color: #28a745;
}

.floating-btn.back-to-top:hover {
  background-color: #218838;
}

.floating-btn.back-to-pagination {
  background-color: #6f42c1;
}

.floating-btn.back-to-pagination:hover {
  background-color: #5a32a3;
}

.floating-btn.back-to-home {
  background-color: #e36209;
}

.floating-btn.back-to-home:hover {
  background-color: #d35400;
}

/* 暗色主题下的浮动按钮 */
[data-theme="dark"] .floating-btn {
  background-color: #0366d6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .floating-btn:hover {
  background-color: #0256cc;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .floating-btn.back-to-top {
  background-color: #28a745;
}

[data-theme="dark"] .floating-btn.back-to-top:hover {
  background-color: #218838;
}

[data-theme="dark"] .floating-btn.back-to-pagination {
  background-color: #6f42c1;
}

[data-theme="dark"] .floating-btn.back-to-pagination:hover {
  background-color: #5a32a3;
}

[data-theme="dark"] .floating-btn.back-to-home {
  background-color: #e36209;
}

[data-theme="dark"] .floating-btn.back-to-home:hover {
  background-color: #d35400;
}

/* 响应式设计 - 在小屏幕上调整浮动按钮位置 */
@media (max-width: 768px) {
  .floating-buttons {
    right: 15px;
    bottom: 15px;
  }
  
  .floating-btn {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
}
