/* 强制覆盖所有宽度限制 - 最高优先级 */
* {
  max-width: none !important;
}

/* 现代化首页样式 */
.modern-homepage {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  /* max-width: 100% !important;
  width: 100% !important; */
}

/* 关键宽度控制规则 - 最高优先级覆盖main.scss */
.wrapper {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 max(20px, 2vw) !important;
  box-sizing: border-box;
}

/* 强制覆盖main.scss中的超宽屏限制 */
@media (min-width: 2560px) {
  .wrapper {
    /* max-width: 100% !important;
    width: 100% !important; */
  }
}

.hero-section {
  padding: 80px 0;
  margin: -2em -15px 3em -15px;
  text-align: center;
  background:
    linear-gradient(135deg,
      rgba(15, 23, 42, 0.98) 0%,
      rgba(30, 41, 59, 0.98) 30%,
      rgba(51, 65, 85, 0.98) 60%,
      rgba(71, 85, 105, 0.98) 100%
    ),
    linear-gradient(45deg,
      rgba(59, 130, 246, 0.08) 0%,
      rgba(16, 185, 129, 0.08) 30%,
      rgba(99, 102, 241, 0.06) 60%,
      rgba(6, 182, 212, 0.08) 100%
    );
  color: white;
  position: static;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

/* Geek风格网格背景 */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 20s linear infinite;
}

/* 霓虹光晕效果 */
.hero-section::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(59, 130, 246, 0.08) 0%,
    rgba(16, 185, 129, 0.04) 25%,
    transparent 50%
  );
  animation: neon-pulse 4s ease-in-out infinite alternate;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

@keyframes neon-pulse {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 max(20px, 3vw);
}

.hero-title {
  font-size: 4em;
  font-weight: 800;
  margin: 0 0 20px 0;
  text-shadow:
    0 0 20px rgba(59, 130, 246, 0.4),
    0 0 40px rgba(16, 185, 129, 0.2),
    0 2px 4px rgba(0,0,0,0.3);
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #dbeafe 40%, #d1fae5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

.hero-subtitle {
  font-size: 1.4em;
  opacity: 0.95;
  margin-bottom: 40px;
  font-weight: 400;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  color: rgba(255, 255, 255, 0.95);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 25px;
  min-width: 140px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.stat-item:hover::before {
  left: 100%;
}

.stat-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
  font-size: 2.8em;
  font-weight: 800;
  display: block;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.stat-label {
  font-size: 0.95em;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.content-section {
  padding: 0 max(20px, 3vw);
  max-width: 100%;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #2d3748;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(16, 185, 129, 0.8) 100%);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: max(2rem, 3vw);
  margin-bottom: 2em;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(16, 185, 129, 0.8) 100%);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(16, 185, 129, 0.8) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2d3748;
}

.feature-description {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-link {
  color: rgba(59, 130, 246, 0.9);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.feature-link:hover {
  color: rgba(16, 185, 129, 0.9);
  transform: translateX(4px);
  text-decoration: none;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.cta-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 30px;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  margin: 2em 0;
  border: 1px solid rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.8), rgba(16, 185, 129, 0.8), rgba(6, 182, 212, 0.8));
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.cta-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2d3748;
}

.cta-description {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 2rem;
  max-width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(16, 185, 129, 0.8) 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(16, 185, 129, 0.9) 100%);
}

/* 关注领域样式 */
.focus-content {
  text-align: center;
  max-width: 100% !important;
  margin: 0 auto;
}

.focus-intro {
  font-size: 1.2rem;
  color: #4a5568;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: max(2rem, 3vw);
  margin: 3rem 0;
}

.focus-item {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 2rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.focus-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

.focus-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.focus-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.focus-item p {
  color: #718096;
  font-size: 0.9rem;
  font-style: italic;
}

.focus-outro {
  font-size: 1.1rem;
  color: #4a5568;
  margin-top: 3rem;
  line-height: 1.6;
}

/* 最新动态样式 */
.latest-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.latest-posts-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.2);
  overflow: visible;
  display: flex;
  flex-direction: column;
  position: relative;
}

.latest-posts-panel .panel-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(16, 185, 129, 0.8) 100%);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: help;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.info-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: var(--tooltip-bottom, calc(100% + 12px));
  top: var(--tooltip-top, auto);
  left: calc(50% + var(--tooltip-left, 0px));
  transform: translateX(-50%);
  background: #2d3748;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  line-height: 1.4;
  max-width: 280px;
  min-width: 150px;
  width: max-content;
  word-wrap: break-word;
  white-space: normal;
  text-align: center;
}

.info-icon:hover::after {
  opacity: 1;
}

.info-icon::before {
  content: '';
  position: absolute;
  bottom: var(--arrow-bottom, calc(100% + 6px));
  top: var(--arrow-top, auto);
  left: calc(50% + var(--tooltip-left, 0px));
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2d3748;
  border-bottom-color: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10000;
}

.info-icon:hover::before {
  opacity: 1;
}

.latest-posts-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.post-list-header {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(16, 185, 129, 0.03));
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
  font-size: 0.8rem;
  font-weight: 500;
  color: #718096;
  letter-spacing: 0.5px;
  position: relative;
}

.post-list-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
}

.post-list-header-added {
  background: linear-gradient(135deg, rgba(66, 153, 225, 0.05), rgba(59, 130, 246, 0.05));
}

.post-list-header-added::before {
  background: linear-gradient(135deg, #4299e1, #3b82f6);
}

.post-list-header-published {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

.post-list-header-published::before {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
}

.post-list-header-popular {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(6, 182, 212, 0.05));
}

.post-list-header-popular::before {
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.header-label {
  display: inline-block;
  position: relative;
  padding-left: 0.5rem;
}

/* 最多关注排序控件 */
.popular-sort-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1.5rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 8px;
  flex-wrap: wrap;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  background: white;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sort-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  color: #3b82f6;
  transform: translateY(-1px);
}

.sort-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(16, 185, 129, 0.9) 100%);
  border-color: rgba(59, 130, 246, 0.5);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.sort-btn.active:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 1) 0%, rgba(16, 185, 129, 1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);
}

.sort-icon {
  font-size: 1rem;
  line-height: 1;
}

.sort-label {
  font-size: 0.85rem;
}

.latest-posts-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.8), rgba(16, 185, 129, 0.8), rgba(6, 182, 212, 0.8));
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.latest-posts-panel .latest-posts-list .post-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  transition: background-color 0.3s ease;
}

.post-item .post-date {
  flex-shrink: 0;
}

.post-item .post-subcategory {
  flex-shrink: 0;
}

.post-item .post-link {
  flex: 1;
  min-width: 0;
}

.latest-posts-panel .latest-posts-list .post-item:last-child {
  border-bottom: none;
}

.latest-posts-panel .latest-posts-list .post-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
}

.post-date {
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
  min-width: 70px;
  text-align: center;
  flex-shrink: 0;
}

/* 添加时间 - 蓝青色渐变 */
.post-date-added {
  background: linear-gradient(135deg, #4299e1 0%, #3b82f6 50%, #10b981 100%);
}

/* 发表时间 - 蓝紫色渐变 */
.post-date-published {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 50%, rgba(168, 85, 247, 0.9) 100%);
}

.post-link {
  color: #2d3748;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.3s ease;
  flex: 1;
}

.post-subcategory {
  font-size: 0.7rem;
  padding: 0.25rem 0.65rem;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  width: 80px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-subcategory:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.post-subcategory-added {
  background: linear-gradient(135deg, rgba(66, 153, 225, 0.2), rgba(59, 130, 246, 0.2));
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.post-subcategory-published {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.post-subcategory-popular {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* 最多关注 - 青绿色渐变 */
.post-date-popular {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #0891b2 100%);
}

.post-link:hover {
  color: #3b82f6;
  text-decoration: none;
}

/* 超大屏幕优化 */
/* @media (min-width: 2400px) {
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3.5rem;
  }
  
  .focus-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3.5rem;
  }
  
  .hero-title {
    font-size: 4.5em;
  }
  
  .hero-subtitle {
    font-size: 1.5em;
  }
} */

/* 超宽屏优化 (2560px+) */
@media (min-width: 2560px) {
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
  }
  
  .focus-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
  }
  
  .hero-title {
    font-size: 5em;
  }
  
  .hero-subtitle {
    font-size: 1.6em;
  }
  
  .content-section {
    max-width: 100% !important;
  }
}

/* 响应式设计 */
@media (max-width: 767px) {
  .latest-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .latest-posts-panel .panel-title {
    font-size: 1.2rem;
    padding: 1.25rem 1.25rem 1rem 1.25rem;
  }
  
  .info-icon {
    width: 18px;
    height: 18px;
    font-size: 0.8rem;
  }
  
  .info-icon::after {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    max-width: 200px;
    white-space: normal;
    text-align: center;
    left: auto;
    right: 0;
    transform: translateX(0);
  }
  
  .info-icon::before {
    left: auto;
    right: 10px;
    transform: translateX(0);
  }
  
  .latest-posts-panel .latest-posts-list .post-item {
    padding: 0.875rem 1.25rem;
  }
  
  .post-subcategory {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    width: 70px;
  }
}


@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5em;
  }
  
  .hero-subtitle {
    font-size: 1.1em;
  }
  
  .hero-stats {
    gap: 20px;
  }
  
  .stat-item {
    min-width: 100px;
    padding: 15px;
  }
  
  .stat-number {
    font-size: 2em;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .content-section {
    padding: 0 10px;
  }
  
  .hero-section {
    padding: 40px 0;
    margin: -2em -10px -2em -10px;
  }
  
  .focus-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .post-item {
    padding: 0.8rem 1rem;
  }
  
  .post-date {
    min-width: 60px;
    font-size: 0.8rem;
  }
  
  .cta-section {
    padding: 20px;
    margin: 1em 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2em;
  }
  
  .hero-section {
    padding: 40px 0;
    margin: -2em -10px -2em -10px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .cta-section {
    padding: 20px;
    margin: 1em 0;
  }
  
  .cta-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}
