/* =========================================
   hexo-theme-fluid — Material Design Style
   Inspired by fluid-dev/hexo-theme-fluid
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #0a0a0f;
  color: #c8c9ce;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: #6ab0f3;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #89c4ff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* --- Particle Canvas Background --- */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================
   Navigation Bar
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-header {
  display: flex;
  align-items: center;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-right: 12px;
}

.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #c8c9ce;
  border-radius: 2px;
  margin: 4px 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e8e8ed !important;
  display: flex;
  align-items: center;
}

.navbar-brand .brand-dot {
  color: #6ab0f3;
  font-size: 1.8rem;
  margin-left: 2px;
}

.navbar-collapse {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item a {
  display: block;
  padding: 8px 16px;
  color: #a8aab3 !important;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-item a:hover {
  color: #e8e8ed !important;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active a {
  color: #6ab0f3 !important;
  background: rgba(106, 176, 243, 0.1);
}

.navbar-search a {
  display: block;
  padding: 8px 12px;
  color: #a8aab3 !important;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.navbar-search a:hover {
  color: #6ab0f3 !important;
}

/* =========================================
   Search Modal
   ========================================= */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: flex-start;
  padding-top: 120px;
}

.search-modal.active {
  display: flex;
}

.search-modal-content {
  background: #1a1a24;
  border-radius: 12px;
  padding: 30px;
  width: 90%;
  max-width: 560px;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.search-close {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 28px;
  color: #a8aab3;
  cursor: pointer;
  transition: color 0.3s;
}

.search-close:hover {
  color: #e8e8ed;
}

.search-input {
  width: 100%;
  padding: 14px 18px;
  background: #252530;
  border: 1px solid #333;
  border-radius: 8px;
  color: #e8e8ed;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.search-input:focus {
  border-color: #6ab0f3;
}

.search-btn {
  position: absolute;
  right: 40px;
  bottom: 40px;
  background: none;
  border: none;
  color: #6ab0f3;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
}

/* =========================================
   Hero Section - 全屏英雄区 (首页顶部)
   ========================================= */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.hero-content {
  max-width: 900px;
}

.hero-title {
  font-size: 5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 4px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #6ab0f3 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroFadeIn 1.2s ease-out;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-size: 1.8rem;
  color: #999;
  margin-bottom: 50px;
  font-weight: 300;
  letter-spacing: 2px;
  animation: heroFadeIn 1.2s ease-out 0.2s both;
}

.hero-scroll {
  margin-top: 40px;
  animation: heroFadeIn 1.2s ease-out 0.6s both;
  cursor: pointer;
}

.scroll-arrow {
  display: block;
  width: 26px;
  height: 42px;
  margin: 0 auto 8px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 13px;
  position: relative;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: #6ab0f3;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDown 2s ease-in-out infinite;
}

.scroll-text {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
  text-transform: uppercase;
}

@keyframes scrollDown {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* =========================================
   Main Layout
   ========================================= */
.main {
  position: relative;
  z-index: 1;
  padding-top: 40px;
}

.main-inner {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.content-wrap {
  flex: 1;
  min-width: 0;
}

/* =========================================
   Post Cards (文章卡片 — Material Design)
   ========================================= */
.posts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-card {
  background: #14141e;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(106, 176, 243, 0.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.post-card-inner {
  padding: 32px;
}

.post-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.post-title a {
  color: #e8e8ed !important;
  transition: color 0.3s;
}

.post-title a:hover {
  color: #6ab0f3 !important;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: #777;
}

.meta-item i {
  margin-right: 4px;
  color: #6ab0f3;
}

.meta-item a {
  color: #888 !important;
}

.meta-item a:hover {
  color: #6ab0f3 !important;
}

.post-body {
  color: #a8aab3;
  line-height: 1.8;
  margin-bottom: 20px;
  overflow: hidden;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(106, 176, 243, 0.15), rgba(167, 139, 250, 0.15));
  color: #6ab0f3 !important;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.read-more:hover {
  background: linear-gradient(135deg, rgba(106, 176, 243, 0.25), rgba(167, 139, 250, 0.25));
  color: #89c4ff !important;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(106, 176, 243, 0.08);
  color: #6ab0f3 !important;
  border-radius: 4px;
  font-size: 0.78rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(106, 176, 243, 0.18);
}

.no-posts {
  text-align: center;
  padding: 80px 20px;
  color: #555;
}

.no-posts i {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* =========================================
   Sidebar
   ========================================= */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
}

.sidebar-widgets {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: #14141e;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 24px;
}

/* Author Widget */
.widget-author {
  text-align: center;
}

.widget-author-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(106, 176, 243, 0.2);
}

.widget-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-author-name {
  font-size: 1.1rem;
  color: #e8e8ed;
  margin-bottom: 6px;
}

.widget-author-desc {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 16px;
}

.widget-author-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.stat-item {
  text-align: center;
}

.stat-item a {
  color: inherit !important;
}

.stat-count {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #e8e8ed;
}

.stat-label {
  font-size: 0.78rem;
  color: #777;
}

.widget-author-social {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.widget-author-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #a8aab3 !important;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.widget-author-social a:hover {
  background: rgba(106, 176, 243, 0.15);
  color: #6ab0f3 !important;
}

/* Search Widget */
.search-group {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.search-group:focus-within {
  border-color: #6ab0f3;
}

.search-group input {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #e8e8ed;
  font-size: 0.9rem;
  outline: none;
}

.search-group input::placeholder {
  color: #555;
}

.search-group button {
  padding: 10px 14px;
  background: none;
  border: none;
  color: #6ab0f3;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s;
}

.search-group button:hover {
  color: #89c4ff;
}

/* =========================================
   Pagination
   ========================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: #14141e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: #a8aab3 !important;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.page-number:hover {
  border-color: rgba(106, 176, 243, 0.3);
  color: #6ab0f3 !important;
}

.page-number.current {
  background: linear-gradient(135deg, rgba(106, 176, 243, 0.2), rgba(167, 139, 250, 0.2));
  border-color: rgba(106, 176, 243, 0.3);
  color: #6ab0f3 !important;
}

/* =========================================
   Footer
   ========================================= */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(10, 10, 15, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 30px 0;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-info {
  font-size: 0.85rem;
  color: #666;
}

.footer-info .copyright {
  margin-bottom: 4px;
}

.with-love {
  color: #e25555;
  margin: 0 4px;
}

.footer-info a {
  color: #888 !important;
}

.footer-info a:hover {
  color: #6ab0f3 !important;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: #666 !important;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: #6ab0f3 !important;
}

/* =========================================
   Back to Top
   ========================================= */
.back-to-top {
  position: fixed;
  bottom: -60px;
  right: 30px;
  z-index: 999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(106, 176, 243, 0.15), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6ab0f3;
  cursor: pointer;
  transition: all 0.4s ease;
  opacity: 0;
}

.back-to-top.show {
  bottom: 30px;
  opacity: 1;
}

.back-to-top:hover {
  background: linear-gradient(135deg, rgba(106, 176, 243, 0.25), rgba(167, 139, 250, 0.25));
  transform: translateY(-3px);
}

/* =========================================
   Article Detail Page
   ========================================= */
.post-detail {
  background: #14141e;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 40px;
}

.post-detail-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.post-detail-title {
  font-size: 2rem;
  font-weight: 700;
  color: #e8e8ed;
  margin-bottom: 16px;
  line-height: 1.4;
}

.post-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #777;
}

.post-detail-content {
  color: #c8c9ce;
  line-height: 1.9;
  font-size: 1rem;
}

.post-detail-content p {
  margin-bottom: 20px;
}

.post-detail-content h1,
.post-detail-content h2,
.post-detail-content h3,
.post-detail-content h4,
.post-detail-content h5,
.post-detail-content h6 {
  color: #e8e8ed;
  margin: 32px 0 16px;
}

.post-detail-content h1 { font-size: 1.8rem; }
.post-detail-content h2 { font-size: 1.5rem; }
.post-detail-content h3 { font-size: 1.3rem; }
.post-detail-content h4 { font-size: 1.1rem; }

.post-detail-content img {
  border-radius: 8px;
  margin: 24px auto;
}

.post-detail-content blockquote {
  border-left: 4px solid #6ab0f3;
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(106, 176, 243, 0.04);
  border-radius: 0 8px 8px 0;
  color: #a8aab3;
}

.post-detail-content code {
  background: #1e1e2a;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #f0a070;
}

.post-detail-content pre {
  background: #0e0e16;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.post-detail-content pre code {
  background: none;
  padding: 0;
  color: #c8c9ce;
}

.post-detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.post-detail-content th,
.post-detail-content td {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.post-detail-content th {
  background: rgba(255, 255, 255, 0.04);
  color: #e8e8ed;
  font-weight: 600;
}

.post-detail-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Post Navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}

.post-nav-item {
  flex: 1;
}

.post-nav-item a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  color: #a8aab3 !important;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.post-nav-item a:hover {
  background: rgba(106, 176, 243, 0.06);
  border-color: rgba(106, 176, 243, 0.15);
  color: #6ab0f3 !important;
}

.post-nav-next {
  text-align: right;
}

.post-nav-next a {
  justify-content: flex-end;
}

/* =========================================
   Comments
   ========================================= */
.post-comments {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* =========================================
   Tags Cloud Page
   ========================================= */
.tag-cloud {
  text-align: center;
  padding: 40px 20px;
}

.tag-cloud-title {
  font-size: 1.2rem;
  color: #e8e8ed;
  margin-bottom: 32px;
}

.tag-cloud-title i {
  color: #6ab0f3;
  margin-right: 8px;
}

.tag-cloud-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tag-cloud-item {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(106, 176, 243, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  color: #a8aab3 !important;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.tag-cloud-item:hover {
  background: rgba(106, 176, 243, 0.12);
  border-color: rgba(106, 176, 243, 0.2);
  color: #6ab0f3 !important;
  transform: translateY(-2px);
}

/* =========================================
   404 Page
   ========================================= */
.page-404 {
  text-align: center;
  padding: 80px 20px;
}

.page-404-title {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6ab0f3, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.page-404-desc {
  font-size: 1.3rem;
  color: #e8e8ed;
  margin-bottom: 12px;
}

.page-404-hint {
  color: #777;
  margin-bottom: 30px;
}

.page-404-hint a {
  color: #6ab0f3 !important;
}

.page-404-search {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.page-404-search input {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: #e8e8ed;
  outline: none;
  font-size: 0.95rem;
}

.page-404-search button {
  padding: 12px 18px;
  background: none;
  border: none;
  color: #6ab0f3;
  cursor: pointer;
  font-size: 1rem;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 992px) {
  .sidebar {
    width: 260px;
  }

  .hero-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .navbar-collapse {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .navbar-collapse.active {
    display: flex;
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  .nav-item a {
    padding: 12px 16px;
  }

  .navbar-toggle {
    display: block;
  }

  .main-inner {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .post-card-inner {
    padding: 20px;
  }

  .post-title {
    font-size: 1.2rem;
  }

  .post-detail {
    padding: 24px;
  }

  .post-detail-title {
    font-size: 1.5rem;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav-next {
    text-align: left;
  }

  .post-nav-next a {
    justify-content: flex-start;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero {
    min-height: 100vh;
    padding: 80px 16px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .post-meta {
    gap: 8px;
    font-size: 0.78rem;
  }
}
