#blog-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

#blog-layer.visible {
  opacity: 1;
}

.blog-container {
  width: 80%;
  height: 80%;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #555;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95);
  clip-path: inset(50% 0 50% 0);
  transition: all 0.1s;
}

#blog-layer.visible .blog-container {
  animation: window-open 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

#blog-layer.closing .blog-container {
  animation: window-close 0.4s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}

@keyframes window-open {
  0% {
    opacity: 0;
    clip-path: inset(50% 0 50% 0);
    transform: scale(0.8);
    filter: brightness(2) contrast(1.5);
  }
  50% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: scale(1.02);
    filter: brightness(1.2);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: scale(1);
    filter: brightness(1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  }
}

@keyframes window-close {
  0% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: scale(1);
    filter: brightness(1);
  }
  40% {
    opacity: 1;
    filter: brightness(1.2);
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    clip-path: inset(50% 0 50% 0);
    transform: scale(0.9);
    filter: brightness(0.5);
  }
}

.blog-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #888;
}

.blog-header {
  height: 60px;
  border-bottom: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.05);
}

.blog-title {
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
}

.blog-close {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 16px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}

.blog-close:hover {
  color: #ff5e19;
}

.blog-content,
.blog-list {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  color: #ddd;
  font-family: "Noto Sans SC", sans-serif;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.blog-content::-webkit-scrollbar,
.blog-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}

.blog-content {
  display: none; /* Hidden by default, shown when post opens */
  line-height: 1.8;
}

/* Markdown Styles */
.blog-content h1 {
  font-size: 2.5em;
  border-bottom: 2px solid #ff5e19;
  padding-bottom: 10px;
  margin-bottom: 20px;
  color: #fff;
}
.blog-content h2 {
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #eee;
  border-left: 4px solid #ff5e19;
  padding-left: 10px;
}
.blog-content p {
  margin-bottom: 15px;
  font-size: 16px;
}
.blog-content code {
  background: #333;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: monospace;
}
.blog-content pre {
  background: #222;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.blog-content blockquote {
  border-left: 4px solid #666;
  padding-left: 15px;
  color: #aaa;
  margin: 20px 0;
  font-style: italic;
}
.blog-content ul {
  padding-left: 20px;
  margin-bottom: 20px;
}
.blog-content li {
  margin-bottom: 5px;
}
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.blog-content th,
.blog-content td {
  border: 1px solid #444;
  padding: 10px;
  text-align: left;
}
.blog-content th {
  background: #333;
  color: #fff;
}
.blog-content a {
  color: #00c3ff;
  text-decoration: none;
}
.blog-content a:hover {
  text-decoration: underline;
}

/* Blog List Styles */
.post-item {
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 15px;
  padding: 20px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.post-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid #ff5e19;
  transform: translateX(10px);
}

.post-title {
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 5px;
}

.post-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.post-desc {
  font-size: 15px;
  color: #bbb;
}

.back-btn {
  display: inline-block;
  margin-bottom: 20px;
  color: #ff5e19;
  cursor: pointer;
  font-weight: bold;
}
.back-btn:hover {
  text-decoration: underline;
}

