/* === HOME PAGE — Forum/Mod Site Theme === */

/* Hero Section */
.home-hero {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: var(--radius-2xl);
  padding: var(--space-10) var(--space-8);
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-8);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow-primary);
}

.home-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero__content { flex: 1; z-index: 1; }

.home-hero__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-3);
}

.home-hero__accent {
  color: rgba(255, 255, 255, 0.85);
}

.home-hero__subtitle {
  font-size: var(--fs-base);
  opacity: 0.85;
  margin-bottom: var(--space-6);
  max-width: 480px;
}

.home-hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.home-hero__actions .btn--primary {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.home-hero__actions .btn--primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.home-hero__actions .btn--outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.home-hero__actions .btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.home-hero__stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  z-index: 1;
}

.home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  min-width: 110px;
  backdrop-filter: blur(8px);
}

.home-stat__value {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
}

.home-stat__label {
  font-size: var(--fs-xs);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================
   GAME CARDS — Screenshot backgrounds
   ========================================== */
.home-game-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.game-card {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  cursor: pointer;
  height: 260px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow: var(--shadow-md);
}

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

.game-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease, filter 0.4s ease;
}

.game-card:hover .game-card__bg {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.game-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(0, 0, 0, 0.15) 70%,
    rgba(0, 0, 0, 0.08) 100%
  );
  z-index: 1;
  transition: background 0.35s ease;
}

.game-card:hover .game-card__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.1) 70%,
    rgba(0, 0, 0, 0.05) 100%
  );
}

.game-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-6);
  z-index: 2;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.game-card__badge {
  align-self: flex-start;
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.85);
  backdrop-filter: blur(8px);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.game-card__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  line-height: var(--lh-tight);
}

.game-card__desc {
  font-size: var(--fs-sm);
  opacity: 0.85;
  line-height: var(--lh-normal);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.game-card__cta {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-primary-lighter);
  margin-top: var(--space-1);
  transition: color 0.2s ease;
}

.game-card:hover .game-card__cta {
  color: #fff;
}

/* ==========================================
   QUICK LINKS
   ========================================== */
.home-quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-bg-pure);
  border: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.06);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-xs);
}

.quick-link-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.15);
  transform: translateY(-3px);
}

.quick-link-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-ghost);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.quick-link-card:hover .quick-link-card__icon {
  background: var(--color-primary);
  color: #fff;
}

.quick-link-card__text h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: 2px;
}

.quick-link-card__text p {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

.quick-link-card__arrow {
  margin-left: auto;
  font-size: var(--fs-lg);
  color: var(--color-text-tertiary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.quick-link-card:hover .quick-link-card__arrow {
  transform: translateX(4px);
  color: var(--color-primary);
}

/* ==========================================
   SECTIONS HEADER
   ========================================== */
.home-sections-header {
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-sections-header__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
}

.home-sections-header__link {
  background: none;
  border: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.home-sections-header__link:hover {
  background: var(--color-primary-ghost);
}

/* ==========================================
   POPULAR MODS PER GAME
   ========================================== */
.home-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.game-mods-section {
  background: var(--color-bg-pure);
  border: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.game-mods-section:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.12);
}

.game-mods-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.06);
}

.game-mods-section__thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.game-mods-section__info {
  display: flex;
  flex-direction: column;
}

.game-mods-section__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

.game-mods-section__count {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

.game-mods-section__all {
  margin-left: auto;
  background: none;
  border: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.game-mods-section__all:hover {
  background: var(--color-primary-ghost);
}

.game-mods-section__list {
  padding: var(--space-3) var(--space-5);
}

.game-mods-section__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.game-mods-section__item:hover {
  background: var(--color-primary-ghost);
  transform: translateX(6px);
}

.game-mods-section__rank {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-ghost);
  border: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.10);
  border-radius: 50%;
  flex-shrink: 0;
}

.game-mods-section__mod-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
}

.game-mods-section__mod-stats {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--color-star);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

/* ==========================================
   RECENT FORUM TOPICS
   ========================================== */
.home-recent-topics {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--color-bg-pure);
  border: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-8);
}

.recent-topic {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.04);
}

.recent-topic:last-child {
  border-bottom: none;
}

.recent-topic:hover {
  background: var(--color-primary-ghost);
}

.recent-topic__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-ghost);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.recent-topic__content {
  flex: 1;
  min-width: 0;
}

.recent-topic__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-topic__meta {
  display: flex;
  gap: var(--space-3);
  margin-top: 2px;
}

.recent-topic__author {
  font-size: var(--fs-xs);
  color: var(--color-primary);
  font-weight: var(--fw-medium);
}

.recent-topic__cat {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

.recent-topic__stats {
  display: flex;
  gap: var(--space-4);
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.recent-topic__replies,
.recent-topic__views {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.recent-topic__date {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

/* ==========================================
   TOP MODS GRID
   ========================================== */
.home-top-mods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-5);
}

.home-top-mod {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-bg-pure);
  border: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.06);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.home-top-mod:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.12);
}

.home-top-mod__cover {
  height: 100px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: var(--space-3);
  position: relative;
}

.home-top-mod__game {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

.home-top-mod__info {
  padding: var(--space-4);
}

.home-top-mod__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-top-mod__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-top-mod__rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--color-star);
}

.home-top-mod__downloads {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 900px) {
  .home-game-cards {
    grid-template-columns: 1fr;
  }
  .game-card {
    height: 200px;
  }
  .home-quick-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .home-hero {
    flex-direction: column;
    padding: var(--space-6);
  }
  .home-hero__stats {
    flex-direction: row;
    width: 100%;
    justify-content: center;
  }
  .home-hero__title { font-size: var(--fs-2xl); }
  .home-quick-links {
    grid-template-columns: 1fr;
  }
  .recent-topic__stats,
  .recent-topic__date {
    display: none;
  }
}

@media (max-width: 480px) {
  .home-hero {
    padding: var(--space-5) var(--space-4);
    margin-bottom: var(--space-5);
    border-radius: var(--radius-xl);
  }
  .home-hero__title { font-size: var(--fs-xl); }
  .home-hero__subtitle { font-size: var(--fs-sm); }
  .home-hero__actions .btn {
    font-size: var(--fs-xs);
    padding: var(--space-2) var(--space-4);
  }
  .home-hero__stats {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .home-stat {
    padding: var(--space-2) var(--space-3);
    min-width: 80px;
  }
  .home-stat__value { font-size: var(--fs-base); }

  .game-card { height: 160px; }
  .game-card__content { padding: var(--space-4); }
  .game-card__title { font-size: var(--fs-base); }
  .game-card__desc { display: none; }

  .home-top-mods {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-3);
  }
  .home-top-mod__cover { height: 80px; }

  .quick-link-card {
    padding: var(--space-4);
    gap: var(--space-3);
  }
  .quick-link-card__icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .quick-link-card__arrow { display: none; }

  .home-game-cards { gap: var(--space-3); }

  .game-mods-section__header { padding: var(--space-3) var(--space-4); }
  .game-mods-section__list { padding: var(--space-2) var(--space-3); }
  .game-mods-section__thumb { width: 36px; height: 36px; }
}

/* ==========================================
   GLOBAL: Particles & Main
   ========================================== */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

.main { position: relative; z-index: var(--z-base); }

/* ==========================================
   LATEST NEWS (Home Page)
   ========================================== */
.home-latest-news {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.home-news-item {
  display: flex;
  background: var(--color-bg-pure);
  border: 1px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-xs);
}

.home-news-item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.15);
  transform: translateY(-2px);
}

.home-news-item__accent {
  width: 5px;
  flex-shrink: 0;
}

.home-news-item__body {
  padding: var(--space-4);
  flex: 1;
  min-width: 0;
}

.home-news-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.home-news-item__author {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
}

.home-news-item__date {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

.home-news-item__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-news-item__text {
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  line-height: var(--lh-normal);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-news-item__mod {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
  margin-top: var(--space-2);
}

@media (max-width: 700px) {
  .home-latest-news {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   AUTH-REQUIRED BUTTON
   ========================================== */
.btn--auth-required {
  opacity: 0.65;
  position: relative;
}

.btn--auth-required:hover {
  opacity: 0.8;
}

/* ============================================================
   DARK THEME — Home Page Overrides
   ============================================================ */

/* --- Quick link cards --- */
[data-theme="dark"] .quick-link-card {
  background: var(--color-surface);
  border-color: rgba(129, 140, 248, 0.14);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .quick-link-card:hover {
  border-color: rgba(129, 140, 248, 0.22);
}

/* --- Game mods sections --- */
[data-theme="dark"] .game-mods-section {
  background: var(--color-surface);
  border-color: rgba(129, 140, 248, 0.14);
}
[data-theme="dark"] .game-mods-section:hover {
  border-color: rgba(129, 140, 248, 0.22);
}
[data-theme="dark"] .game-mods-section__header {
  border-bottom-color: rgba(129, 140, 248, 0.10);
}
[data-theme="dark"] .game-mods-section__rank {
  border-color: rgba(129, 140, 248, 0.16);
}

/* --- Recent topics --- */
[data-theme="dark"] .home-recent-topics {
  background: var(--color-surface);
  border-color: rgba(129, 140, 248, 0.14);
}
[data-theme="dark"] .recent-topic {
  border-bottom-color: rgba(129, 140, 248, 0.08);
}

/* --- Top mods --- */
[data-theme="dark"] .home-top-mod {
  background: var(--color-surface);
  border-color: rgba(129, 140, 248, 0.14);
}
[data-theme="dark"] .home-top-mod:hover {
  border-color: rgba(129, 140, 248, 0.22);
}
[data-theme="dark"] .home-top-mod__game {
  background: rgba(26, 31, 46, 0.92);
  color: var(--color-primary-light);
}

/* --- News items --- */
[data-theme="dark"] .home-news-item {
  background: var(--color-surface);
  border-color: rgba(129, 140, 248, 0.14);
}
[data-theme="dark"] .home-news-item:hover {
  border-color: rgba(129, 140, 248, 0.22);
}
