/* ===== 趣味玩法首页 ===== */
.fun-home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 70px;
}

/* 顶部筛选栏 */
.fun-top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 10px 12px 12px;
  background: var(--gc-card);
  box-shadow: 0 2px 12px rgba(79, 140, 255, 0.06);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.fun-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.fun-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fun-logo-icon-small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gc-primary), var(--gc-logic));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(79, 140, 255, 0.3);
  color: white;
  flex-shrink: 0;
}

.fun-logo-icon-small i {
  width: 16px;
  height: 16px;
}

.fun-header-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gc-foreground);
}

.fun-filter-bar {
  display: flex;
  align-items: center;
  background: var(--gc-muted);
  border-radius: 14px;
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fun-filter-bar:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.fun-filter-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  background: var(--gc-card);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.fun-filter-divider {
  width: 4px;
  flex-shrink: 0;
}

.filter-label {
  font-size: 11px;
  color: var(--gc-muted-foreground);
  font-weight: 600;
}

.filter-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--gc-foreground);
}

/* 内容区域 - 与顶部筛选栏左右对齐 */
.fun-home-content {
  flex: 1;
  padding: 10px 12px 20px;
}

/* 每日挑战横幅 - 铺满内容区宽度 */
.fun-daily-banner {
  margin: 4px 0 14px;
  background: linear-gradient(135deg, #FF7043 0%, #FF5722 50%, #E64A19 100%);
  border-radius: 16px;
  padding: 14px 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  border: none;
  width: 100%;
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.fun-daily-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.fun-daily-banner:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.fun-daily-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.fun-daily-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.fun-daily-text {
  color: white;
  text-align: left;
  min-width: 0;
}

.fun-daily-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 3px;
}

.fun-daily-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.2;
}

.fun-daily-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: white;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.fun-daily-time-label {
  font-size: 10px;
  opacity: 0.85;
  font-weight: 500;
}

.fun-daily-time {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

/* 分区标题 */
.fun-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px;
}

.fun-section-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fun-section-title .section-icon {
  font-size: 18px;
}

.fun-section-count {
  font-size: 12px;
  color: var(--gc-muted-foreground);
  background: var(--gc-muted);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* 玩法卡片网格 - 3列平铺，无间隙 */
.fun-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fun-card {
  background: var(--gc-card);
  border-radius: 14px;
  padding: 12px 6px;
  border: 2px solid var(--gc-border);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.fun-card:active {
  transform: scale(0.96);
  box-shadow: var(--gc-shadow-sm);
}

.fun-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.fun-card-info {
  flex: 1;
  width: 100%;
  text-align: center;
}

.fun-card-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fun-card-desc {
  font-size: 10px;
  color: var(--gc-muted-foreground);
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fun-card-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  background: rgba(255, 140, 66, 0.12);
  color: #FF8C42;
}

.fun-card-tag.new {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}

.fun-card-tag.hot {
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
}

/* 更多玩法预告区 - 平铺，无间隙 */
.fun-more-section {
  margin-top: 16px;
}

.fun-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.fun-more-card {
  background: var(--gc-card);
  border-radius: 14px;
  padding: 14px 6px;
  border: 2px dashed var(--gc-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  opacity: 0.6;
  position: relative;
  pointer-events: none;
  cursor: default;
}

.fun-more-icon {
  font-size: 24px;
  opacity: 0.6;
}

.fun-more-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gc-muted-foreground);
  line-height: 1.2;
}

.fun-more-tag {
  font-size: 9px;
  font-weight: 600;
  color: var(--gc-primary);
  background: rgba(79, 140, 255, 0.1);
  padding: 3px 8px;
  border-radius: 8px;
}

.fun-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--gc-muted-foreground);
  font-size: 13px;
}

/* 响应式优化：手机默认 3 列，平板 4 列，超大屏 5 列 */
@media (min-width: 400px) {
  .fun-card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .fun-card { padding: 12px 8px; }
  .fun-card-icon { width: 50px; height: 50px; font-size: 24px; }
  .fun-card-name { font-size: 14px; }
  .fun-card-desc { font-size: 11px; }
  .fun-more-grid { gap: 10px; }
  .fun-more-card { padding: 14px 8px; }
  .fun-more-icon { font-size: 26px; }
  .fun-more-name { font-size: 13px; }
}

/* ===== 响应式：平板竖屏（>=768px） ===== */
@media (min-width: 768px) {
  /* 趣味玩法首页卡片网格：3列 -> 4列 */
  .fun-card-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .fun-card-icon { width: 54px; height: 54px; font-size: 26px; }
  /* 更多玩法：3列 -> 4列 */
  .fun-more-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

/* ===== 响应式：平板横屏（>=1024px） ===== */
@media (min-width: 1024px) {
  /* 趣味玩法首页卡片网格：4列 -> 5列 */
  .fun-card-grid { grid-template-columns: repeat(5, 1fr); }
  /* 更多玩法：4列 -> 6列 */
  .fun-more-grid { grid-template-columns: repeat(6, 1fr); }
}
