/* Custom hexo-blog-encrypt password form styling - Glassmorphism v3 with background image */
/* Structure: #hexo-blog-encrypt = bg image container, #hbeForm = glass card */

/* ===== Outer container: background image ===== */
#hexo-blog-encrypt.hbe-container {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 60vh !important;
  padding: 4rem 2rem !important;
  margin: -1rem -1rem 0 !important;
  overflow: hidden !important;

  /* Background image */
  background: url('/img/hbe-bg.jpg') center/cover no-repeat !important;
  border-radius: 16px !important;
  width: calc(100% + 2rem) !important;
  max-width: none !important;

  /* No glassmorphism on outer - it's the image layer */
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Dark overlay to improve readability */
#hexo-blog-encrypt.hbe-container::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    135deg,
    rgba(20, 10, 40, 0.35) 0%,
    rgba(30, 20, 60, 0.25) 50%,
    rgba(15, 10, 35, 0.4) 100%
  ) !important;
  border-radius: 16px !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

#hexo-blog-encrypt.hbe-container:hover {
  box-shadow: none !important;
  transform: none !important;
}

/* ===== Lock icon (above glass card) ===== */
#hexo-blog-encrypt.hbe-container::before {
  content: "\f023" !important;
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-size: 2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 56px !important;
  height: 56px !important;
  line-height: 56px !important;
  text-align: center !important;
  margin: 0 auto 1rem !important;
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 50% !important;
  color: rgba(255, 255, 255, 0.9) !important;
  z-index: 2 !important;
  position: relative !important;
}

/* ===== Abstract text ===== */
#hexo-blog-encrypt .hbe-content {
  position: relative !important;
  z-index: 2 !important;
  text-align: center !important;
  font-size: 0.95rem !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 0 0 1.2em !important;
  max-width: 380px !important;
  margin: 0 auto !important;
  line-height: 1.7 !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* ===== Form: Glassmorphism card ===== */
#hexo-blog-encrypt .hbe-form {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 400px !important;
  margin: 0 auto !important;
  padding: 2.5rem 2rem !important;

  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(24px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 24px !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: all 0.4s ease !important;
}

#hexo-blog-encrypt .hbe-form:hover {
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px);
}

/* ===== Input field ===== */
#hexo-blog-encrypt .hbe-input {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 320px !important;
  margin: 0.8em auto !important;
}

#hexo-blog-encrypt .hbe-input-field {
  display: block !important;
  width: 100% !important;
  padding: 14px 20px !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 14px !important;
  outline: none !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  float: none !important;
  letter-spacing: 3px !important;
  height: auto !important;
  line-height: normal !important;
}

#hexo-blog-encrypt .hbe-input-field:focus {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(180, 200, 255, 0.6) !important;
  box-shadow:
    0 0 0 4px rgba(180, 200, 255, 0.12),
    0 4px 20px rgba(100, 120, 220, 0.15) !important;
  transform: translateY(-1px);
}

#hexo-blog-encrypt .hbe-input-field::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
  letter-spacing: 0.5px !important;
}

/* ===== Label ===== */
#hexo-blog-encrypt .hbe-input-label {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  float: none !important;
  padding: 0 !important;
  margin-bottom: 0.3em !important;
}

#hexo-blog-encrypt .hbe-input-label-content {
  display: block !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 0.3em 0 !important;
  letter-spacing: 1px !important;
}

/* ===== Button ===== */
#hexo-blog-encrypt .hbe-button {
  display: block !important;
  width: 100% !important;
  max-width: 320px !important;
  margin: 1.5em auto 0 !important;
  padding: 14px 28px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
  letter-spacing: 1.5px !important;
  height: auto !important;
  line-height: normal !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

#hexo-blog-encrypt .hbe-button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.5) !important;
  background: linear-gradient(135deg, rgba(123, 145, 238, 0.9) 0%, rgba(139, 95, 181, 0.9) 100%) !important;
}

#hexo-blog-encrypt .hbe-button:active {
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3) !important;
}

/* ===== Error message ===== */
#hexo-blog-encrypt .hbe-error {
  margin-top: 1.2em !important;
  padding: 0.7em 1.4em !important;
  font-size: 0.85rem !important;
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  border-radius: 10px !important;
  text-align: center !important;
  max-width: 320px !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#hexo-blog-encrypt .hbe-error:empty {
  display: none !important;
}

/* ===== Dark mode ===== */
[data-theme="dark"] #hexo-blog-encrypt.hbe-container::after {
  background: linear-gradient(
    135deg,
    rgba(10, 5, 25, 0.5) 0%,
    rgba(15, 10, 35, 0.4) 50%,
    rgba(10, 5, 25, 0.55) 100%
  ) !important;
}

[data-theme="dark"] #hexo-blog-encrypt .hbe-form {
  background: rgba(20, 15, 40, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] #hexo-blog-encrypt .hbe-input-field {
  background: rgba(30, 25, 50, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] #hexo-blog-encrypt .hbe-input-field:focus {
  background: rgba(30, 25, 50, 0.6) !important;
  border-color: rgba(140, 160, 255, 0.4) !important;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  #hexo-blog-encrypt.hbe-container {
    padding: 3rem 1rem !important;
    min-height: 50vh !important;
    border-radius: 12px !important;
    margin: -0.5rem -0.5rem 0 !important;
    width: calc(100% + 1rem) !important;
  }

  #hexo-blog-encrypt .hbe-form {
    padding: 2rem 1.5rem !important;
    border-radius: 20px !important;
  }

  #hexo-blog-encrypt .hbe-input-field {
    padding: 13px 18px !important;
    font-size: 14px !important;
  }

  #hexo-blog-encrypt .hbe-button {
    padding: 13px 24px !important;
  }
}

/* ==========================================================
   Article List Card Beautification
   ========================================================== */

/* Card container: rounded corners, elevated shadow, subtle border */
#recent-posts > .recent-post-item {
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  margin-bottom: 1.5rem !important;
  background: #fff !important;
}

#recent-posts > .recent-post-item:hover {
  transform: translateY(-6px) !important;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.06) !important;
  border-color: rgba(102, 126, 234, 0.15) !important;
}

/* Cover image: smooth zoom on hover */
#recent-posts > .recent-post-item .post-bg {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

#recent-posts > .recent-post-item:hover .post-bg {
  transform: scale(1.05) !important;
}

/* Title: gradient text effect */
#recent-posts .recent-post-info .article-title {
  font-weight: 700 !important;
  font-size: 1.3rem !important;
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  transition: all 0.3s ease !important;
  line-height: 1.5 !important;
}

#recent-posts > .recent-post-item:hover .recent-post-info .article-title {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Meta info: softer, with better spacing */
#recent-posts .recent-post-info .article-meta-wrap {
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
}

/* Content preview text */
#recent-posts .recent-post-info .content {
  color: #64748b !important;
  line-height: 1.8 !important;
  font-size: 0.92rem !important;
}

/* Category/tag badges */
#recent-posts .recent-post-info .article-meta-wrap a {
  color: #667eea !important;
  font-weight: 500 !important;
  transition: color 0.3s ease !important;
}

#recent-posts .recent-post-info .article-meta-wrap a:hover {
  color: #764ba2 !important;
}

/* Info section padding */
#recent-posts .recent-post-info {
  padding: 1.5rem 1.8rem !important;
}

/* Pagination beautification */
#pagination .page-number {
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
}

#pagination .page-number.current {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

#pagination .page-number:hover:not(.current) {
  background: rgba(102, 126, 234, 0.08) !important;
  border-color: rgba(102, 126, 234, 0.3) !important;
  color: #667eea !important;
}

/* ===== Dark mode support for article cards ===== */
[data-theme="dark"] #recent-posts > .recent-post-item {
  background: rgba(30, 30, 46, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    0 1px 4px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="dark"] #recent-posts > .recent-post-item:hover {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(102, 126, 234, 0.25) !important;
}

[data-theme="dark"] #recent-posts .recent-post-info .article-title {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

[data-theme="dark"] #recent-posts > .recent-post-item:hover .recent-post-info .article-title {
  background: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

[data-theme="dark"] #recent-posts .recent-post-info .content {
  color: #94a3b8 !important;
}

[data-theme="dark"] #recent-posts .recent-post-info .article-meta-wrap {
  color: #64748b !important;
}

[data-theme="dark"] #recent-posts .recent-post-info .article-meta-wrap a {
  color: #a78bfa !important;
}

/* ===== Responsive for cards ===== */
@media (max-width: 768px) {
  #recent-posts > .recent-post-item {
    border-radius: 12px !important;
    margin-bottom: 1rem !important;
  }

  #recent-posts .recent-post-info {
    padding: 1.2rem 1.4rem !important;
  }

  #recent-posts .recent-post-info .article-title {
    font-size: 1.1rem !important;
  }
}

/* ==========================================================
   Homepage Banner Text - Subtle Lavender Tint
   ========================================================== */

/* Site title in banner */
#page-header #site-title {
  color: rgba(232, 220, 255, 0.92) !important;
  text-shadow: 0 2px 12px rgba(102, 126, 234, 0.3),
               0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Subtitle / typed text in banner */
#page-header #site-subtitle,
#page-header #site-subtitle span {
  color: rgba(210, 195, 240, 0.8) !important;
  text-shadow: 0 1px 8px rgba(102, 126, 234, 0.25),
               0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* Typed cursor */
#page-header #site-subtitle .typed-cursor {
  color: rgba(180, 160, 230, 0.7) !important;
}

/* Navigation site-name in header */
#page-header #nav .site-name {
  color: rgba(232, 220, 255, 0.9) !important;
}

/* Scroll-down arrow if present */
#page-header #scroll-down i,
#page-header #scroll-down .scroll-down-icon {
  color: rgba(200, 185, 245, 0.7) !important;
}

/* ===== Dark mode - banner text slightly brighter ===== */
[data-theme="dark"] #page-header #site-title {
  color: rgba(220, 205, 255, 0.9) !important;
  text-shadow: 0 2px 16px rgba(140, 160, 255, 0.35),
               0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] #page-header #site-subtitle,
[data-theme="dark"] #page-header #site-subtitle span {
  color: rgba(195, 180, 235, 0.75) !important;
}

[data-theme="dark"] #page-header #nav .site-name {
  color: rgba(220, 205, 255, 0.85) !important;
}
