.fun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.fun-module-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
}

.fun-module-icon {
  display: block;
  margin-bottom: 8px;
  font-size: 32px;
}

.fun-module-title {
  margin-bottom: 6px;
}

.fun-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}

.fun-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fun-filter-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 16px;
}

.fun-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fun-list {
  display: grid;
  gap: 12px;
}

.fun-card {
  border-radius: 16px;
}

.fun-card-title {
  margin: 8px 0;
}

.fun-card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13px;
}

.fun-card-content {
  white-space: pre-wrap;
  margin-bottom: 10px;
  line-height: 1.7;
}

.fun-card-source {
  margin-bottom: 10px;
  font-size: 13px;
}

.fun-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.reaction-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reaction-btn {
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
}

.fun-comment-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.fun-comment-item {
  border-radius: 12px;
}

html[data-section="fun"] {
  --fun-bg-1: #fff6e8;
  --fun-bg-2: #ffe3ba;
  --fun-card: #fffefb;
  --fun-ink: #2a1f0d;
  --fun-accent: #ff7a00;
  --fun-accent-2: #ffb347;
}

html[data-section="fun"] body {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 183, 71, 0.25), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(255, 122, 0, 0.18), transparent 35%),
    linear-gradient(145deg, var(--fun-bg-1), var(--fun-bg-2));
  color: var(--fun-ink);
}

html[data-section="fun"] .header {
  background: linear-gradient(135deg, #ff8f1f, #ff6400);
}

html[data-section="fun"] .footer {
  background: linear-gradient(135deg, #ff8f1f 0%, #ff6400 100%);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 -12px 24px rgba(255, 98, 0, 0.12);
}

html[data-section="fun"] .footer-link {
  color: #fff7ed;
}

html[data-section="fun"] .footer-link:hover {
  color: #fff;
}

html[data-section="fun"] .hero-section {
  background: linear-gradient(145deg, #ffae4f, #ff6a00);
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 24px rgba(255, 98, 0, 0.2);
}

html[data-section="fun"] .hero-section h2,
html[data-section="fun"] .hero-section p {
  color: #fff;
}

html[data-section="fun"] .fun-module-card,
html[data-section="fun"] .fun-card,
html[data-section="fun"] .fun-comment-item {
  background: var(--fun-card);
  border: 1px solid rgba(255, 122, 0, 0.25);
  box-shadow: 0 12px 24px rgba(255, 98, 0, 0.08);
}

html[data-section="fun"] .fun-module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(255, 98, 0, 0.12);
}

html[data-section="fun"] .fun-card-meta {
  color: #644f2e;
}

html[data-section="fun"] .btn {
  background: linear-gradient(140deg, var(--fun-accent), var(--fun-accent-2));
  color: #fff;
  border: none;
}

html[data-section="fun"] .btn-secondary {
  background: rgba(255, 122, 0, 0.1);
  color: var(--fun-ink);
}

html[data-section="fun"] .fun-filter-group .btn.active {
  background: linear-gradient(140deg, #f14b00, #ff9a2f);
  color: #fff;
}

html[data-section="fun"] .reaction-btn {
  border: 1px solid rgba(255, 122, 0, 0.35);
  background: #fff;
}

html[data-section="fun"] .reaction-btn.active {
  border-color: #f14b00;
  background: rgba(255, 122, 0, 0.15);
}

@media (max-width: 768px) {
  .fun-toolbar-actions,
  .fun-filter-group {
    width: 100%;
  }

  .fun-toolbar-actions .btn,
  .fun-filter-group .btn {
    flex: 1;
    min-width: 110px;
  }
}
