:root {
  --header-height: 64px;
  --accent-color: #6965c9;
  --text-main: #ffffff;
  --text-dim: #aaaaaa;
  --glass-bg: rgba(0, 0, 0, 0.25);
  --glass-blur: blur(7px);
}

.glass-box {
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 12px;
  box-sizing: border-box;
}

.page-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}

.page-layout::before {
  content: "";
  grid-column: 1 / -1;
  height: 25vh;
}

.page-layout.home-layout::before {
  content: none;
  height: 0;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar .glass-box { padding: 20px; }
.sidebar h2 { font-size: 1.1rem; margin-bottom: 0.8rem; }
.sidebar a { color: #ccc; text-decoration: none; transition: 0.2s; }
.sidebar a:hover { color: var(--accent-color); }

.sidebar .profile-card { text-align: center; padding-bottom: 40px; padding-top: 30px;}
.avatar-wrapper {
  width: 80px; height: 80px; margin: 0 auto 12px;
  border-radius: 50%; overflow: hidden; transition: 0.25s;
}
.avatar-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.avatar-wrapper:hover { transform: scale(1.08); }
.profile-name { font-size: 1rem; margin: 0.4rem 0; }
.profile-desc { font-size: 0.8rem; color: var(--text-dim); }

.links-list { display: flex; gap: 15px; justify-content: center; margin-top: 10px; }
.links-list p { margin: 0; }

.link-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255,255, 0.08);
  transition: transform 0.7s ease-in-out, background 0.5s ease-in-out;
}

.link-btn img { width: 20px; height: 20px; }
.link-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(360deg) scale(1.12);
}

.post-list-box { padding: 28px 24px; }
.post-list { display: flex; flex-direction: column; gap: 0.9rem; }

.post-card {
  position: relative;
  padding: 1.5rem 1.8rem;
  background-color: rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.post-card:hover {
  background-color: rgba(0, 0, 0, 0.2);
  transform: translateX(4px);
  box-shadow: inset 4px 4px 15px rgba(0, 0, 0, 0.15),
              0 4px 15px rgba(0, 0, 0, 0.05);
}

.post-card:hover .post-title a {
  color: var(--accent-color);
}

.post-card .post-title { 
  font-size: 1.35rem; 
  margin: 0 0 0.8rem 0; 
  text-align: left;
  position: relative;
  z-index: 2;
}

.post-card .post-title a { 
  color: #fff; 
  text-decoration: none; 
  transition: color 0.3s ease; 
}

.post-meta-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 2;
}

.post-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0;
  letter-spacing: 1px;
}
.post-excerpt {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
}

#article-container {
  padding: 48px 56px;
  box-sizing: border-box;
}

.post-content {
  max-width: 850px;
  margin: 0 auto;
}

#postContent .post-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  text-align: center;
  margin: 0 0 1rem 0;
}
.post-meta { text-align: center; color: var(--text-dim); margin-bottom: 2.5rem; }

div.post-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.2em;
  text-indent: 2em;
}

.post-content h1:first-child {
  margin-top: 0;
}

/* ===== Markdown 图片通用样式 ===== */
.post-content img {
  display: block;
  max-width: 75%;
  height: auto;
  margin: 2rem auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.article-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 3.5rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.share-label { font-size: 0.9rem; opacity: 0.7; margin-right: 20px; white-space: nowrap;}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}
.share-btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-3px); }
.share-btn img { width: 20px; height: 20px; }

.qr-modal {
  position: absolute; bottom: 70px; transform: translateX(-50%);
  width: 240px; background: white; padding: 12px; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 1000; display: none;
}
.qr-content { text-align: center; color: #333; }
.qr-content p { text-indent: 0 !important; font-size: 14px; margin-bottom: 10px; }
.qr-content button { margin-top: 8px; cursor: pointer; border: none; padding: 4px 12px; border-radius: 4px; }

.qr-modal::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.qr-content p {
    text-indent: 0 !important;
    margin: 0 0 8px 0;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

pre {
  background: rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 30px rgba(0, 0, 0, 0.35);

  margin: 2rem 0;
}

pre code {
  background: none !important;
  color: #e6e6e6;
  font-size: 0.95rem;
  line-height: 1.6;
}


@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 600px) {
  .page-layout {
    padding: 32px 16px 40px;
  }

  #article-container {
    padding: 32px 20px;
  }

  div.post-content p {
    text-indent: 1.5em;
    font-size: 1.05rem;
  }

  .article-share {
    margin-top: 2.5rem;
    justify-content: center;
  }
}
