/* ============================================
   Hexo Fluid Theme Style - Pure CSS Version
   ============================================ */

/* Variables */
:root {
  /* Colors */
  --primary-color: #49b1f5;
  --primary-dark: #2f4154;
  --text-color: #3c4858;
  --text-light: #718096;
  --text-lighter: #a0aec0;
  --bg-color: #eee;
  --bg-white: #fff;
  --navbar-bg: #2f4154;
  --navbar-text: #fff;
  --link-color: #30a9de;
  --border-color: #eaecef;
  --code-bg: #f6f8fa;
  
  /* Layout */
  --navbar-height: 60px;
  --content-max-width: 1200px;
  
  /* Effects */
  --shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease-in-out;
}

/* Dark Mode */
[data-theme="dark"] {
  --text-color: #c4c6c9;
  --text-light: #a7a9ad;
  --bg-color: #181c27;
  --bg-white: #252d38;
  --navbar-bg: #1f3144;
  --border-color: #435266;
  --code-bg: #2d333b;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", 
               "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  overflow-x: hidden;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--link-color);
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--navbar-bg);
  z-index: 1000;
  transition: var(--transition);
}

.navbar .container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--navbar-text) !important;
}

.navbar-toggler {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar-toggler .animated-icon {
  width: 24px;
  height: 18px;
  position: relative;
}

.navbar-toggler .animated-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--navbar-text);
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.navbar-toggler .animated-icon span:nth-child(1) { top: 0; }
.navbar-toggler .animated-icon span:nth-child(2) { top: 8px; }
.navbar-toggler .animated-icon span:nth-child(3) { top: 16px; }

.navbar-collapse {
  display: flex;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  color: var(--navbar-text) !important;
  opacity: 0.8;
  transition: var(--transition);
}

.nav-link:hover {
  opacity: 1;
}

.nav-link i {
  margin-right: 0.25rem;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: " ▾";
  font-size: 0.7rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 160px;
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-color) !important;
}

.dropdown-menu a:hover {
  background: var(--border-color);
}

.dropdown-menu a.active {
  color: var(--primary-color) !important;
  font-weight: 600;
}

/* ============================================
   Banner
   ============================================ */

.header-inner {
  position: relative;
  width: 100%;
  min-height: 60vh;
  background: url('https://picsum.photos/1920/1080?random=1') no-repeat center center;
  background-size: cover;
}

#mingju-banner {
  position: absolute;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 0.5rem 1.5rem;
  background: transparent;
}
#mingju-banner .mingju-card {
  margin-bottom: 0;
  border-left: none;
  padding: 0;
  box-shadow: none;
  background: transparent;
}
#mingju-banner .mingju-card:hover {
  transform: none;
  box-shadow: none;
}
#mingju-banner .mingju-content {
  color: #fff;
  font-size: 1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
#mingju-banner .mingju-author {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.full-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.banner-text {
  color: #fff;
  text-align: center;
  padding: 2rem;
}

.banner-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.banner-text p {
  font-size: 1.25rem;
  opacity: 0.9;
}

.scroll-down-bar {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   Main Content
   ============================================ */

main {
  min-height: 100vh;
  padding-top: 100px;
}

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.container-fluid {
  width: 100%;
  padding: 0;
}

.nopadding-x {
  padding-left: 0;
  padding-right: 0;
}

.nopadding-x-md {
  padding-left: 0;
  padding-right: 0;
}

.nopadding-y {
  padding-top: 0;
  padding-bottom: 0;
}

#board {
  margin-top: -3rem;
  position: relative;
  z-index: 10;
}

/* ============================================
   Post Cards
   ============================================ */

.index-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: var(--transition);
}

.index-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.index-card .row {
  display: flex;
  flex-wrap: wrap;
}

.index-img {
  padding: 0;
  overflow: hidden;
}

.index-img a {
  display: block;
  height: 100%;
}

.index-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.index-card:hover .index-img img {
  transform: scale(1.05);
}

.index-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.index-header {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.index-header a {
  color: var(--text-color);
}

.index-header a:hover {
  color: var(--primary-color);
}

.index-excerpt {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.index-btm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-lighter);
  gap: 1rem;
}

.post-metas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-lighter);
}

.post-metas > div {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================
   Post Content (Article)
   ============================================ */

.post-content {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 3rem;
}

.post-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.post-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.post-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--code-bg);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
}

.post-content code {
  padding: 0.2em 0.4em;
  background: var(--code-bg);
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.post-content pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--code-bg);
  border-radius: 8px;
  overflow-x: auto;
}

.post-content pre code {
  padding: 0;
  background: none;
}

.post-content-inner {
  line-height: 1.8;
}

.post-content-inner p {
  margin-bottom: 1.25rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-content-inner pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--code-bg);
  border-radius: 8px;
  overflow-x: auto;
}

.post-content-inner code {
  padding: 0.2em 0.4em;
  background: var(--code-bg);
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.post-content-inner pre code {
  padding: 0;
  background: none;
}

.post-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

.post-content th, .post-content td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
}

.post-content th {
  background: var(--code-bg);
  font-weight: 600;
}

/* Post Meta */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0 2rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

.post-meta > span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Prev/Next */
.post-prevnext {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.post-prev, .post-next {
  max-width: 45%;
}

.post-next {
  text-align: right;
}

.post-prevnext a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
}

.post-prevnext a:hover {
  color: var(--primary-color);
}

/* ============================================
   Sidebar
   ============================================ */

.side-col {
  padding: 0 0.5rem;
}

.widget {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.category-list, .tag-cloud {
  list-style: none;
}

.category-list li, .tag-cloud a {
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-list li a, .tag-cloud a {
  color: var(--text-color);
}

.category-list li a:hover, .tag-cloud a:hover {
  color: var(--primary-color);
}

.category-count {
  color: var(--text-lighter);
  font-size: 0.875rem;
}

/* TOC */
#toc {
  position: sticky;
  top: calc(var(--navbar-height) + 1rem);
}

#toc .toc-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

#toc ol {
  list-style: none;
  padding-left: 1rem;
}

#toc > ol > li {
  margin-bottom: 0.5rem;
}

#toc a {
  color: var(--text-light);
  font-size: 0.875rem;
}

#toc a:hover, #toc a.active {
  color: var(--primary-color);
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.page-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-white);
  color: var(--text-color);
  font-weight: 500;
  transition: var(--transition);
}

.page-number:hover, .page-number.current {
  background: var(--primary-color);
  color: #fff;
}

.extend.prev::before {
  content: "‹";
  font-size: 1.5rem;
}

.extend.next::after {
  content: "›";
  font-size: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */

footer {
  background: var(--bg-white);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-light);
}

.footer-content {
  margin-bottom: 1rem;
}

.footer-content a {
  color: var(--text-color);
}

.footer-content a:hover {
  color: var(--primary-color);
}

/* Statistics */
.statistics {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* Beian */
.beian {
  font-size: 0.75rem;
  color: var(--text-lighter);
}

.beian a {
  color: var(--text-lighter);
}

/* ============================================
   Search Modal
   ============================================ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
}

.modal.show {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.modal-dialog {
  background: var(--bg-white);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-close {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  flex-shrink: 0;
}
.modal-close:hover {
  color: var(--text-color);
}

.modal-body {
  padding: 1.5rem;
}

#local-search-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
}

#local-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}
.search-result-item:hover {
  background: var(--border-color);
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.search-result-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   Scroll Top Button
   ============================================ */

#scroll-top-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

#scroll-top-button.show {
  opacity: 1;
  visibility: visible;
}

#scroll-top-button:hover {
  transform: translateY(-2px);
}

/* ============================================
   Tags & Categories
   ============================================ */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 0;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--border-color);
  border-radius: 20px;
  font-size: 0.875rem;
  transition: var(--transition);
}

.tag-cloud a:hover {
  background: var(--primary-color);
  color: #fff;
}

.category-chains {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-chains a {
  color: var(--text-light);
}

.category-chains a:hover {
  color: var(--primary-color);
}

/* ============================================
   Note (Blockquote Style)
   ============================================ */

.note {
  padding: 1rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
  border-radius: 4px;
}

.note-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.note-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
}

.note-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.note-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}

/* ============================================
   Code Highlight
   ============================================ */

.hljs {
  background: var(--code-bg) !important;
  padding: 1rem !important;
  border-radius: 8px;
  overflow-x: auto;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .navbar-collapse {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    padding: 1rem;
  }
  
  .navbar-collapse.show {
    display: block;
  }
  
  .navbar-toggler {
    display: block;
  }
  
  .header-inner {
    min-height: 40vh;
  }
  
  .banner-text h2 {
    font-size: 1.75rem;
  }
  
  .index-card .row {
    flex-direction: column;
  }
  
  .index-img {
    max-height: 200px;
  }
  
  .index-info {
    padding: 1.5rem;
  }
  
  .post-content {
    padding: 1.5rem;
  }
  
  .post-content h1 {
    font-size: 1.75rem;
  }
  
  .post-prevnext {
    flex-direction: column;
    gap: 1rem;
  }
  
  .post-prev, .post-next {
    max-width: 100%;
    text-align: left;
  }
  
  .side-col {
    display: none;
  }
}

/* ============================================
   Utility Classes
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-circle { border-radius: 50%; }

.shadow { box-shadow: var(--shadow); }
.shadow-sm { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }

.bg-white { background: var(--bg-white); }
.bg-dark { background: var(--navbar-bg); }

.text-white { color: #fff; }
.text-muted { color: var(--text-light); }

/* Section Title */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
}

/* Mingju Cards */
.mingju-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.mingju-card:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.mingju-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-color);
}

.mingju-author {
  text-align: right;
  margin-top: 0.75rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.mingju-author::before {
  content: "\2014\00A0";
}

/* Noscript Warning */
.noscript-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #f59e0b;
  color: #fff;
  text-align: center;
  padding: 0.5rem;
  z-index: 9999;
}
