/*-----------------主页配置----------------------*/

.homeMain {
  height: 100vh;
  overflow: hidden;
}

.homeArticle {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-header {
  text-align: center;
  padding: 2em 0 1em;
  flex-shrink: 0;
}

.site-title {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.site-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.site-icons a {
  color: #666;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  padding: 8px;
  border-radius: 50%;
  background: rgba(199, 37, 78, 0.04);
}

.site-icons a:hover {
  color: var(--maincolor);
  background: rgba(199, 37, 78, 0.12);
  transform: translateY(-2px);
  border-bottom: none;
}

.site-icons svg {
  width: 20px;
  height: 20px;
}

.search-line-container {
  position: relative;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 1em;
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-line-container:focus-within {
  border-color: var(--maincolor);
}

.tabs-container.search-active ~ .search-line-container,
.tabs-container.search-active .search-line-container {
  border-bottom-color: var(--maincolor);
  box-shadow: 0 4px 12px rgba(199, 37, 78, 0.1);
}

.search-line-input {
  width: 100%;
  padding: 10px 40px 10px 0;
  border: none;
  background: transparent;
  font-family: 'Roboto Mono';
  font-size: 15px;
  color: var(--fontColor);
  outline: none;
  letter-spacing: 0.02em;
}

.search-line-input::placeholder {
  color: #ccc;
}

.search-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--maincolor);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.search-icon:hover {
  transform: translateY(-50%) scale(1.1);
}

.tabs-container {
  margin-top: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tabs-container.search-active .tabs-wrapper {
  display: none;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0;
  padding: 0;
}

.tabs-container.search-active .tabs-content {
  padding-top: 1em;
  animation: slideDown 0.3s ease-out;
}

.tabs-container.search-active .tabs-content:empty {
  display: none;
}

.search-focus-hint {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 3em 0;
  animation: fadeInResults 0.3s ease-out;
}

.search-results-container {
  animation: fadeInResults 0.3s ease-out;
}

.search-results-container .content-entry {
  padding: 0.8em 0;
  border-bottom: 1px solid rgba(199, 37, 78, 0.08);
  transition: all 0.15s ease;
}

.search-results-container .content-entry:hover {
  background: linear-gradient(90deg, rgba(199, 37, 78, 0.03) 0%, transparent 100%);
  padding-left: 8px;
  border-left: 3px solid var(--maincolor);
  margin-left: -8px;
}

.search-results-container .content-entry:last-child {
  border-bottom: none;
}

.search-results-container .search-no-results {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 3em 0;
}

.tabs-container:not(.search-active) .tabs-wrapper {
  display: block;
  max-height: none;
  opacity: 1;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInResults {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tabs-wrapper {
  position: relative;
  flex-shrink: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tabs-header {
  display: flex;
  gap: 4px;
  padding: 0 28px 10px 28px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs-header::-webkit-scrollbar {
  display: none;
}

.tabs-nav-btn {
  position: absolute;
  top: 0;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--maincolor);
  cursor: pointer;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: none;
  border-radius: 4px;
  opacity: 0.7;
}

.tabs-nav-btn:hover {
  background: rgba(199, 37, 78, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: none;
  border-color: transparent;
  opacity: 1;
  box-shadow: none;
}

.tabs-nav-btn:active {
  transform: none;
  box-shadow: none;
  opacity: 0.8;
}

.tabs-nav-btn.prev {
  left: 0;
}

.tabs-nav-btn.next {
  right: 0;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #666;
  font-family: 'Roboto Mono';
  font-size: 13px;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 400;
  letter-spacing: 0.02em;
  box-shadow: none;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  animation: fadeInTab 0.3s ease-out forwards;
  opacity: 0;
}

.tab-btn:nth-child(1) { animation-delay: 0.05s; }
.tab-btn:nth-child(2) { animation-delay: 0.10s; }
.tab-btn:nth-child(3) { animation-delay: 0.15s; }
.tab-btn:nth-child(4) { animation-delay: 0.20s; }
.tab-btn:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tab-btn:hover {
  background: rgba(199, 37, 78, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--maincolor);
  transform: translateY(-1px);
  box-shadow: none;
}

.tab-btn.active {
  background: var(--maincolor);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.tab-btn.has-matches:not(.active) {
  background: rgba(199, 37, 78, 0.08);
  color: var(--maincolor);
  box-shadow: none;
}

.tab-btn.has-matches:not(.active):after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--maincolor);
  border-radius: 1px;
}

.tab-btn.active:hover {
  background: var(--maincolor);
  color: white;
  box-shadow: none;
}

.tabs-content {
  flex: 1;
  padding-top: 0.8em;
  overflow-y: auto;
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-no-results {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 2em 0;
  display: none;
}

.search-no-results.visible {
  display: block;
}

.tabs-content::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.tabs-content {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
  position: relative;
}

.tab-pane.active {
  display: block;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 0 8px 0;
  margin-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pagination-prev,
.pagination-next {
  background: transparent;
  border: 1px solid #e0e0e0;
  color: #666;
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
  font-weight: 300;
  padding: 0;
}

.pagination-prev:hover:not(:disabled),
.pagination-next:hover:not(:disabled) {
  background: var(--maincolor);
  color: white;
  border-color: var(--maincolor);
  transform: scale(1.05);
}

.pagination-prev:active:not(:disabled),
.pagination-next:active:not(:disabled) {
  transform: scale(0.95);
}

.pagination-info {
  font-size: 13px;
  color: #888;
  min-width: 50px;
  text-align: center;
  font-family: 'Roboto Mono', monospace;
  letter-spacing: 0.02em;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.homeArticle .content-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5em 0;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
  animation: fadeInItem 0.3s ease-out forwards;
  opacity: 0;
}

.homeArticle .content-entry:nth-child(1) { animation-delay: 0.05s; }
.homeArticle .content-entry:nth-child(2) { animation-delay: 0.10s; }
.homeArticle .content-entry:nth-child(3) { animation-delay: 0.15s; }
.homeArticle .content-entry:nth-child(4) { animation-delay: 0.20s; }
.homeArticle .content-entry:nth-child(5) { animation-delay: 0.25s; }
.homeArticle .content-entry:nth-child(6) { animation-delay: 0.30s; }
.homeArticle .content-entry:nth-child(7) { animation-delay: 0.35s; }
.homeArticle .content-entry:nth-child(8) { animation-delay: 0.40s; }
.homeArticle .content-entry:nth-child(9) { animation-delay: 0.45s; }
.homeArticle .content-entry:nth-child(10) { animation-delay: 0.50s; }

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.homeArticle .content-entry:hover {
  background: linear-gradient(90deg, rgba(199, 37, 78, 0.02) 0%, transparent 100%);
  padding-left: 6px;
  border-left: 2px solid var(--maincolor);
}

.homeArticle .content-entry:last-child {
  border-bottom: none;
}

.homeArticle .content-title {
  margin: unset;
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.homeArticle .content-title a {
  color: var(--fontColor);
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-block;
}

.homeArticle .content-title a:hover {
  color: var(--maincolor);
  border-bottom: none;
  transform: translateX(3px);
}

.homeArticle .content-time {
  flex: 0 0 auto;
  margin-left: 20px;
  color: #bbb;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 300;
}

.homeRightSide .tags li {
  display: flex;
  align-items: center;
}

/* -------------------主页响应式优化---------------------- */
@media (max-width: 1024px) {
  .homeRightSide {
    display: none !important;
  }

  .homeMain .commonArticle {
    width: 85%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }

  .site-title {
    font-size: 2rem;
  }

  .home-header {
    padding: 2em 0 1.2em;
  }
}

@media (max-width: 768px) {
  .homeMain .commonArticle {
    width: 92%;
    max-width: none;
  }

  .site-title {
    font-size: 1.8rem;
  }

  .home-header {
    padding: 1.5em 0 1em;
  }

  .site-icons {
    gap: 12px;
  }

  .homeArticle .content-time {
    display: none;
  }

  .homeArticle .content-title {
    max-width: 100%;
  }
}