/* ========================================
   GOM 游戏引擎网站 - GOM工具页面样式
   蓝白简洁主题
   ======================================== */

/* ==========================================
   1. Hero 区域
   ========================================== */
.tool-hero {
  padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
}

.tool-hero__content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.tool-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: rgba(66, 133, 244, 0.08);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--primary);
  margin-bottom: var(--space-lg);
}

.tool-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.tool-hero__subtitle {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-xl);
}

.tool-hero__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.tool-hero__scroll {
  display: none;
}

.tool-hero__bg,
.tool-hero__grid,
.tool-hero__glow {
  display: none;
}

/* ==========================================
   2. 通用区块样式
   ========================================== */
.py-section {
  padding: var(--space-2xl) 0;
}

.bg-gray {
  background: var(--gray-50);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.section-title p {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
}

/* ==========================================
   3. 工具卡片区域
   ========================================== */
.tools-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.tools-grid .tool-card {
  flex: 0 1 calc(20% - var(--space-md));
  min-width: 220px;
  max-width: 300px;
}

.tool-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-fast);
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(66, 133, 244, 0.15);
  transform: translateY(-4px);
}

.tool-card__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  margin: 0 auto var(--space-sm);
  color: var(--white);
}

.tool-card__icon--accent {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.tool-card__icon--blue {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.tool-card__icon--green {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.tool-card__icon--purple {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.tool-card__badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: 4px 10px;
  background: rgba(66, 133, 244, 0.1);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--primary);
  font-weight: var(--font-weight-medium);
}

.tool-card__badge--new {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.tool-card__badge--hot {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.tool-card h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.tool-card p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-md);
}

.tool-card__features {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.tool-card__feature {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--gray-50);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.tool-card__feature svg {
  color: var(--success);
}

.tool-card__btn {
  width: 100%;
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 50%, #E65100 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 13px;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 
    0 4px 15px rgba(255, 152, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card__btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.tool-card__btn:hover {
  background: linear-gradient(135deg, #FFB74D 0%, #FF9800 50%, #F57C00 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(255, 152, 0, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tool-card__btn:hover::before {
  left: 100%;
}

.tool-card__btn:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(255, 152, 0, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   4. 下载列表区域
   ========================================== */
.download-section {
  background: var(--gray-50);
}

.download-list {
  max-width: 900px;
  margin: 0 auto var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.download-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.download-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(66, 133, 244, 0.1);
}

.download-item__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-md);
  color: var(--white);
  flex-shrink: 0;
}

.download-item__icon--accent {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.download-item__icon--blue {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.download-item__icon--green {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.download-item__icon--purple {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.download-item__info {
  flex: 1;
  min-width: 0;
}

.download-item__info h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.download-item__info p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.download-item__meta {
  display: flex;
  gap: var(--space-md);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.download-item__size,
.download-item__date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.download-item__actions {
  flex-shrink: 0;
}

.download-all {
  text-align: center;
}

/* ==========================================
   5. 教程区域
   ========================================== */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.tutorial-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.tutorial-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.1);
}

.tutorial-card__image {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-md);
  color: var(--white);
  flex-shrink: 0;
}

.tutorial-card__image--accent {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.tutorial-card__image--blue {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.tutorial-card__image--green {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.tutorial-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tutorial-card__category {
  display: inline-block;
  width: fit-content;
  padding: 2px 8px;
  background: rgba(66, 133, 244, 0.1);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.tutorial-card__category--accent {
  background: rgba(245, 158, 11, 0.1);
  color: #D97706;
}

.tutorial-card__category--blue {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
}

.tutorial-card__category--green {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.tutorial-card h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.tutorial-card p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  flex: 1;
}

.tutorial-card__meta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.tutorial-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tutorial-card__btn {
  width: fit-content;
}

.tutorials-more {
  text-align: center;
}

/* ==========================================
   6. 响应式设计
   ========================================== */
@media (max-width: 1200px) {
  .tools-grid .tool-card {
    flex: 0 1 calc(33.333% - var(--space-md));
  }
}

@media (max-width: 1024px) {
  .tools-grid .tool-card {
    flex: 0 1 calc(50% - var(--space-md));
  }

  .tutorials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tool-hero__title {
    font-size: var(--font-size-2xl);
  }

  .tool-hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .tools-grid .tool-card {
    flex: 0 1 100%;
    max-width: 100%;
  }

  .download-item {
    flex-direction: column;
    text-align: center;
  }

  .download-item__meta {
    justify-content: center;
  }

  .tutorial-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tutorial-card__meta {
    justify-content: center;
  }

  .tutorial-card__btn {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .tool-card__features {
    flex-direction: column;
    align-items: center;
  }

  .download-item__icon {
    width: 40px;
    height: 40px;
  }

  .tutorial-card__image {
    width: 64px;
    height: 64px;
  }
}
