/* style.css - 游戏合集网站主样式 */

/* 导入重置样式 */
@import url('reset.css');

/* 变量定义 */
:root {
  /* 颜色变量 */
  --main-purple: #2D1B4E; /* 主色调：深紫色 */
  --secondary-purple: #4A2B7E; /* 次要色：中紫色 */
  --accent-purple: #8A4FFF; /* 强调色：亮紫色 */
  --accent-pink: #FF4F9A; /* 强调色：霓虹粉 */
  --dark-grey: #222222; /* 中性色：深灰 */
  --light-grey: #EEEEEE; /* 中性色：浅灰 */
  --bg-dark-purple: #1A102F; /* 背景色：近黑紫色 */
  
  /* 边距变量 */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* 圆角变量 */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  
  /* 阴影变量 */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* 基础样式 */
body {
  font-family: 'Inter', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  background-color: var(--bg-dark-purple);
  color: #fff;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* 全局布局 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-xl) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.view-more {
  color: var(--accent-purple);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

.view-more:hover {
  color: var(--accent-pink);
}

/* 导航栏样式 */
.header {
  background-color: var(--main-purple);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-right: var(--spacing-xl);
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: #fff;
  font-weight: 500;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-purple);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  background-color: var(--accent-purple);
  color: #fff;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

.login-btn:hover {
  background-color: var(--accent-pink);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

/* 焦点游戏区域 */
.hero {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin: var(--spacing-xl) 0;
  box-shadow: var(--shadow-lg);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(26, 16, 47, 0.8), rgba(26, 16, 47, 0.3));
}

/* 轮播图样式 */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin: var(--spacing-xl) 0;
  box-shadow: var(--shadow-lg);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  display: flex;
  gap: var(--spacing-md);
  padding: 0 var(--spacing-md);
}

.carousel-item.active {
  opacity: 1;
  z-index: 2;
}

.game-slide {
  flex: 1;
  position: relative;
  height: 100%;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.game-slide:hover {
  transform: scale(1.02);
}

.game-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(26, 16, 47, 0.3), rgba(26, 16, 47, 0.8));
  z-index: 1;
}

.game-slide .hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-lg);
  z-index: 2;
}

.game-slide .hero-title {
  font-size: 1.8rem;
  margin-bottom: var(--spacing-sm);
}

.game-slide .hero-description {
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background-color: var(--accent-purple);
  transform: scale(1.2);
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.carousel-prev {
  left: 15px;
}

.carousel-next {
  right: 15px;
}

.carousel-control:hover {
  background-color: var(--accent-purple);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .carousel-item {
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
  }

  .game-slide {
    height: 50%;
  }

  .game-slide .hero-title {
    font-size: 1.4rem;
  }

  .game-slide .hero-description {
    display: none;
  }
}

.loading-carousel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: var(--light-grey);
}

.loading-carousel i {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-lg);
  z-index: 2;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
  font-size: 1rem;
  margin-bottom: var(--spacing-md);
  max-width: 60%;
  opacity: 0.9;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.rating {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: #FFD700;
}

/* 分类标签 */
.category-filters-container {
  overflow-x: auto;
  margin-bottom: var(--spacing-lg);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-filters-container::-webkit-scrollbar {
  display: none;
}

.category-filters {
  display: flex;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
}

.category-tag, .category-label {
  display: inline-block;
  background-color: var(--secondary-purple);
  color: #fff;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-lg);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.category-tag:hover, .category-tag.active {
  background-color: var(--accent-purple);
  transform: translateY(-2px);
}

/* 游戏卡片网格 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--spacing-md);
  min-height: 200px; /* 确保即使没有内容也有最小高度 */
  position: relative; /* 为加载指示器提供定位上下文 */
}

/* 加载状态指示 */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1; /* 跨越所有列 */
  padding: var(--spacing-xl);
  color: var(--accent-purple);
  text-align: center;
}

.loading-indicator i {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  color: var(--accent-purple);
}

.loading-indicator p {
  font-size: 1rem;
  opacity: 0.8;
}

/* 错误消息样式 */
.error-message {
  grid-column: 1 / -1;
  padding: var(--spacing-lg);
  background-color: rgba(255, 87, 87, 0.1);
  border-radius: var(--border-radius-md);
  color: #ff5757;
  text-align: center;
}

.game-card {
  background-color: var(--main-purple);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.game-thumbnail {
  position: relative;
  height: 150px;
  overflow: hidden;
}

.game-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.game-info {
  padding: var(--spacing-md);
}

.game-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  font-size: 0.85rem;
}

.game-category {
  color: var(--accent-purple);
}

.game-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #FFD700;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--accent-purple);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-pink);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-purple);
  border: 1px solid var(--accent-purple);
}

.btn-secondary:hover {
  background-color: var(--accent-purple);
  color: #fff;
}

.play-now {
  width: 100%;
}

/* 页脚样式 */
.footer {
  background-color: var(--main-purple);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
}

.footer-column h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: var(--spacing-md);
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.footer-description {
  margin-bottom: var(--spacing-md);
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-link {
  width: 36px;
  height: 36px;
  background-color: var(--secondary-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--accent-purple);
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-link {
  margin-bottom: var(--spacing-sm);
}

.footer-link a {
  opacity: 0.8;
  transition: all 0.3s ease;
}

.footer-link a:hover {
  opacity: 1;
  color: var(--accent-purple);
  padding-left: var(--spacing-sm);
}

.copyright {
  text-align: center;
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--spacing-xl);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* 分类页面样式 */
.category-sections {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.category-section {
  margin-bottom: var(--spacing-lg);
}

/* 简洁大气的页脚样式 */
.footer-modern {
    background-color: #191329;
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(187, 134, 252, 0), rgba(187, 134, 252, 0.5), rgba(187, 134, 252, 0));
}

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

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand .logo {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #bb86fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.footer-brand .description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.footer-nav h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
}

.footer-nav h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background-color: #bb86fc;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
}

.footer-nav-list li {
    margin-bottom: 12px;
}

.footer-nav-list a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
    position: relative;
    display: inline-block;
}

.footer-nav-list a:hover {
    color: #bb86fc;
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(187, 134, 252, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bb86fc;
    font-size: 1rem;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: #bb86fc;
    color: #191329;
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-bottom-links a:hover {
    color: #bb86fc;
}

/* 徽章挑战区布局优化 */
.badge-challenge {
    background: linear-gradient(135deg, var(--main-purple), var(--secondary-purple));
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.challenge-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--spacing-md);
}

.trophy-icon {
    background-color: var(--accent-purple);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

.challenge-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.today-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
}

.badge-icon {
    background-color: var(--accent-pink);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.badge-info {
    flex: 1;
}

.badge-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: #fff;
}

.badge-task {
    font-size: 0.9rem;
    opacity: 0.8;
}

.challenge-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.players-completed {
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.players-icon {
    color: var(--accent-purple);
}

.progress-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.progress-section {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
}

.progress-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-purple);
}

.progress-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-purple);
}

.reward-icon, .community-icon {
    color: var(--accent-pink);
    margin-right: var(--spacing-xs);
}

/* 错误卡片样式 */
.error-card {
  border: 1px solid rgba(255, 87, 87, 0.3);
}

.error-thumbnail {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 87, 87, 0.1);
  color: #ff5757;
  font-size: 2rem;
}

.error-thumbnail i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
} 