/* 半糖次元原创样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 导航栏 */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(255, 154, 158, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff9a9e;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #ff9a9e;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  transition: 0.3s;
}

/* 主要内容 */
.main-content {
  margin-top: 80px;
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 英雄区域 */
.hero-section {
  text-align: center;
  padding: 4rem 0;
  color: white;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #fff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(255, 154, 158, 0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.search-box {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 10px 30px rgba(255, 154, 158, 0.3);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

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

/* 3D魔法球 */
.showcase-section {
  padding: 4rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.showcase-ball {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 2rem auto;
  perspective: 1000px;
}

.ball-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 0 0 30px rgba(255, 154, 158, 0.6);
  animation: coreFloat 3s ease-in-out infinite alternate;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.ball-core:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.ball-ring {
  position: absolute;
  border: 2px solid rgba(255, 154, 158, 0.4);
  border-radius: 50%;
  animation: ringRotate 10s linear infinite;
}

.ring-1 {
  width: 140px;
  height: 140px;
  top: 30px;
  left: 30px;
  animation-duration: 8s;
}

.ring-2 {
  width: 180px;
  height: 180px;
  top: 10px;
  left: 10px;
  animation-duration: 12s;
  animation-direction: reverse;
}

.ring-3 {
  width: 200px;
  height: 200px;
  top: 0;
  left: 0;
  animation-duration: 15s;
}

@keyframes coreFloat {
  0% { box-shadow: 0 0 30px rgba(255, 154, 158, 0.6); }
  100% { box-shadow: 0 0 50px rgba(254, 207, 239, 0.8); }
}

@keyframes ringRotate {
  0% { transform: rotateZ(0deg); }
  100% { transform: rotateZ(360deg); }
}

/* 内容卡片 */
.content-section {
  padding: 2rem 0;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  color: white;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  border-radius: 2px;
}

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

.content-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(255, 154, 158, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.content-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 154, 158, 0.3);
}

.card-image {
  height: 200px;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  position: relative;
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #ff9a9e;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #333;
}

.card-genre {
  color: #666;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-status {
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
}

.card-rating {
  color: #f39c12;
  font-weight: bold;
}

/* 分类网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.category-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  color: white;
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.category-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.25);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.category-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.category-desc {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 排行榜 */
.ranking-section {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.ranking-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.5rem;
}

.ranking-title {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ranking-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  margin-bottom: 0.5rem;
  transition: background 0.3s ease;
}

.ranking-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ranking-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
}

.ranking-number.gold {
  background: linear-gradient(45deg, #f1c40f, #f39c12);
}

.ranking-number.silver {
  background: linear-gradient(45deg, #bdc3c7, #95a5a6);
}

.ranking-number.bronze {
  background: linear-gradient(45deg, #e67e22, #d35400);
}

.ranking-cover {
  font-size: 1.5rem;
}

.ranking-info {
  flex: 1;
}

.ranking-name {
  color: white;
  font-weight: bold;
  margin-bottom: 0.2rem;
}

.ranking-data {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* 编辑推荐 */
.editor-section {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.editor-featured {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.featured-image {
  height: 300px;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
}

.featured-content {
  color: white;
}

.featured-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.featured-desc {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.featured-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
}

.featured-rating {
  font-size: 1.2rem;
  color: #f39c12;
  font-weight: bold;
}

.editor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.editor-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  transition: background 0.3s ease;
  cursor: pointer;
}

.editor-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.editor-cover {
  width: 60px;
  height: 80px;
  background: linear-gradient(45deg, #ff9a9e, #fecfef);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.editor-info {
  flex: 1;
}

.editor-name {
  color: white;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.editor-genre {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.editor-rating {
  color: #f39c12;
  font-size: 0.9rem;
}

/* 专题推荐 */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.topic-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 2rem;
  text-align: center;
  color: white;
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.topic-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.25);
}

.topic-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.topic-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.topic-desc {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.topic-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
}

.topic-stat {
  text-align: center;
}

.stat-number {
  font-size: 1.2rem;
  font-weight: bold;
  color: #f39c12;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* 甜蜜元素背景 */
.sweet-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.sweet-element {
  position: absolute;
  font-size: 2rem;
  opacity: 0.3;
  animation: sweetFloat 15s infinite linear;
}

.sweet-element:nth-child(1) { left: 10%; animation-delay: 0s; }
.sweet-element:nth-child(2) { left: 20%; animation-delay: -2s; }
.sweet-element:nth-child(3) { left: 30%; animation-delay: -4s; }
.sweet-element:nth-child(4) { left: 40%; animation-delay: -6s; }
.sweet-element:nth-child(5) { left: 50%; animation-delay: -8s; }
.sweet-element:nth-child(6) { left: 60%; animation-delay: -10s; }
.sweet-element:nth-child(7) { left: 70%; animation-delay: -12s; }
.sweet-element:nth-child(8) { left: 80%; animation-delay: -14s; }

@keyframes sweetFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* 底部 */
.footer {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: #ff9a9e;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #ff9a9e;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ranking-grid {
    grid-template-columns: 1fr;
  }
  
  .editor-featured {
    grid-template-columns: 1fr;
  }
  
  .topic-grid {
    grid-template-columns: 1fr;
  }
  
  .showcase-ball {
    width: 150px;
    height: 150px;
  }
  
  .ball-core {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
  }
  
  .ring-1 {
    width: 110px;
    height: 110px;
    top: 20px;
    left: 20px;
  }
  
  .ring-2 {
    width: 130px;
    height: 130px;
    top: 10px;
    left: 10px;
  }
  
  .ring-3 {
    width: 150px;
    height: 150px;
  }
}

/* 动画效果 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 粒子效果 */
.particle {
  position: absolute;
  pointer-events: none;
  font-size: 1.5rem;
  animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: scale(0) rotate(360deg);
  }
}