/*
 * Clans by game grid (1.2.5). Same tiles and game colors as the forum's
 * Clans by game page (copied from the Host Clan phpBB style and the Clan
 * owners extension). Keep the two in step when a game is added.
 */
.hcg-clan {
	--hcg-bg: #151816;
	--hcg-bg-2: #0d0f0e;
	--hcg-panel: rgba(0, 0, 0, 0.28);
	--hcg-text: #e8ece9;
	--hcg-muted: #c5ccc7;
	--hcg-accent: #e6c200;
	--hcg-accent-2: #0a863c;
	--hcg-link: #3dce73;
	--hcg-link-hover: #e6c200;
	--hcg-border: #2a2e2c;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 0;
	margin: 1.25rem 0;
	padding: 0 0 1.1rem;
	color: var(--hcg-text);
	background-color: var(--hcg-bg);
	background-image: linear-gradient(180deg, var(--hcg-bg) 0%, var(--hcg-bg-2) 100%);
	border: 1px solid var(--hcg-border);
	border-top: 4px solid var(--hcg-accent);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

/* Generic / default — Host Clan green and gold on the dark board canvas */
.hcg-clan.hcg-game-generic,
.hcg-clan.hcg-game-default {
	--hcg-bg: #151816;
	--hcg-bg-2: #0d0f0e;
	--hcg-accent: #e6c200;
	--hcg-accent-2: #0a863c;
	--hcg-link: #3dce73;
	--hcg-link-hover: #e6c200;
	--hcg-text: #e8ece9;
	--hcg-muted: #c5ccc7;
	--hcg-border: #2a2e2c;
}

/* World of Warcraft — deep brown, parchment text, gold trim */
.hcg-clan.hcg-game-wow,
.hcg-clan.hcg-game-warcraft,
.hcg-clan.hcg-game-worldofwarcraft {
	--hcg-bg: #2a1d10;
	--hcg-bg-2: #1a1208;
	--hcg-panel: rgba(12, 8, 4, 0.45);
	--hcg-text: #f4e6c8;
	--hcg-muted: #d4c4a0;
	--hcg-accent: #e8c547;
	--hcg-accent-2: #a67c2a;
	--hcg-link: #ffd866;
	--hcg-link-hover: #fff4c2;
	--hcg-border: #6b4e22;
	background-image:
		radial-gradient(ellipse at top, #3a2a16 0%, #1a1208 72%),
		repeating-linear-gradient(135deg, rgba(232, 197, 71, 0.05) 0 10px, transparent 10px 20px);
}

/* Call of Duty — charcoal, olive, muted amber */
.hcg-clan.hcg-game-cod,
.hcg-clan.hcg-game-callofduty {
	--hcg-bg: #141614;
	--hcg-bg-2: #0a0c0b;
	--hcg-panel: rgba(0, 0, 0, 0.4);
	--hcg-text: #e7eadf;
	--hcg-muted: #c2c8b6;
	--hcg-accent: #d4a017;
	--hcg-accent-2: #6b7c3a;
	--hcg-link: #e3c056;
	--hcg-link-hover: #ffe28a;
	--hcg-border: #3a4030;
	background-image:
		repeating-linear-gradient(45deg, rgba(80, 90, 50, 0.18) 0 12px, transparent 12px 24px),
		linear-gradient(180deg, #141614 0%, #0a0c0b 100%);
}

/* Minecraft — grass, dirt, sky; square edges and a faint grid */
.hcg-clan.hcg-game-minecraft,
.hcg-clan.hcg-game-mc {
	--hcg-bg: #1b3a18;
	--hcg-bg-2: #1a120b;
	--hcg-panel: rgba(20, 12, 6, 0.45);
	--hcg-text: #f3f0de;
	--hcg-muted: #d2c9a8;
	--hcg-accent: #5dba3a;
	--hcg-accent-2: #8a5a2b;
	--hcg-link: #8be36a;
	--hcg-link-hover: #c8f5b0;
	--hcg-border: #8a5a2b;
	background-image:
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(180deg, #1f4a1c 0%, #1a120b 100%);
	background-size: 8px 8px, 8px 8px, auto;
}

.hcg-clan.hcg-game-minecraft .hcg-clan-badge,
.hcg-clan.hcg-game-mc .hcg-clan-badge {
	border-radius: 0;
}

/* Rust — oxidized orange on dark metal */
.hcg-clan.hcg-game-rust {
	--hcg-bg: #2a1610;
	--hcg-bg-2: #140c0a;
	--hcg-panel: rgba(10, 6, 4, 0.45);
	--hcg-text: #f2e6d8;
	--hcg-muted: #d2c0b0;
	--hcg-accent: #e06a2e;
	--hcg-accent-2: #8a3e1c;
	--hcg-link: #ff9a5c;
	--hcg-link-hover: #ffd0b0;
	--hcg-border: #6b3a28;
	background-image:
		radial-gradient(ellipse at bottom right, rgba(224, 106, 46, 0.28) 0%, transparent 55%),
		linear-gradient(180deg, #2a1610 0%, #140c0a 100%);
}

/* ARK — jungle night, amber, volcanic stone */
.hcg-clan.hcg-game-ark {
	--hcg-bg: #163018;
	--hcg-bg-2: #0f1410;
	--hcg-panel: rgba(8, 12, 8, 0.5);
	--hcg-text: #efe7d2;
	--hcg-muted: #d0c6ab;
	--hcg-accent: #e0a106;
	--hcg-accent-2: #a33b1e;
	--hcg-link: #f0c24a;
	--hcg-link-hover: #ffe9a0;
	--hcg-border: #3a4e30;
	background-image:
		radial-gradient(ellipse at top left, rgba(47, 107, 58, 0.55) 0%, transparent 50%),
		radial-gradient(ellipse at bottom right, rgba(163, 59, 30, 0.35) 0%, transparent 48%),
		linear-gradient(180deg, #163018 0%, #0f1410 100%);
}

/* Valheim — fjord blue, pine, ember */
.hcg-clan.hcg-game-valheim {
	--hcg-bg: #132028;
	--hcg-bg-2: #0c1218;
	--hcg-panel: rgba(6, 10, 14, 0.5);
	--hcg-text: #efe6d2;
	--hcg-muted: #cfc3ab;
	--hcg-accent: #e07a2f;
	--hcg-accent-2: #2d5a3d;
	--hcg-link: #ffb078;
	--hcg-link-hover: #ffe0c4;
	--hcg-border: #3a4e55;
	background-image:
		linear-gradient(180deg, rgba(126, 160, 184, 0.12) 0%, transparent 42%),
		linear-gradient(180deg, #132028 0%, #0c1218 100%);
}

/* FiveM / GTA — night city, magenta and cyan neon */
.hcg-clan.hcg-game-fivem,
.hcg-clan.hcg-game-gta,
.hcg-clan.hcg-game-gtav {
	--hcg-bg: #14141f;
	--hcg-bg-2: #0a0a12;
	--hcg-panel: rgba(6, 4, 16, 0.55);
	--hcg-text: #f2f2f7;
	--hcg-muted: #c8c8d8;
	--hcg-accent: #32e6ff;
	--hcg-accent-2: #ff4fd0;
	--hcg-link: #7af0ff;
	--hcg-link-hover: #ffe56a;
	--hcg-border: #3a3060;
	background-image:
		linear-gradient(180deg, rgba(255, 79, 208, 0.16) 0%, transparent 40%),
		linear-gradient(0deg, rgba(50, 230, 255, 0.12) 0%, transparent 36%),
		linear-gradient(180deg, #14141f 0%, #0a0a12 100%);
	box-shadow: 0 0 0 1px rgba(50, 230, 255, 0.25), 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* Counter-Strike 2 — dark steel, orange accent */
.hcg-clan.hcg-game-cs2,
.hcg-clan.hcg-game-csgo,
.hcg-clan.hcg-game-counterstrike {
	--hcg-bg: #151a20;
	--hcg-bg-2: #0e1318;
	--hcg-panel: rgba(6, 8, 12, 0.5);
	--hcg-text: #e8ebe9;
	--hcg-muted: #c2c6c4;
	--hcg-accent: #de9b35;
	--hcg-accent-2: #4a7c9b;
	--hcg-link: #f0b84a;
	--hcg-link-hover: #ffe09a;
	--hcg-border: #2a333c;
	background-image: linear-gradient(180deg, #151a20 0%, #0e1318 100%);
}

/* Final Fantasy XIV — midnight blue, aether teal, gold */
.hcg-clan.hcg-game-ffxiv,
.hcg-clan.hcg-game-ff14,
.hcg-clan.hcg-game-finalfantasy {
	--hcg-bg: #141a33;
	--hcg-bg-2: #0b1020;
	--hcg-panel: rgba(8, 10, 24, 0.55);
	--hcg-text: #e8eef6;
	--hcg-muted: #c2c8d8;
	--hcg-accent: #d4b15a;
	--hcg-accent-2: #3ed0c8;
	--hcg-link: #6eefe8;
	--hcg-link-hover: #ffe6a0;
	--hcg-border: #2a3a7a;
	background-image:
		radial-gradient(ellipse at top, rgba(62, 208, 200, 0.16) 0%, transparent 52%),
		linear-gradient(180deg, #141a33 0%, #0b1020 100%);
}

/* The Elder Scrolls Online — burgundy, imperial gold, parchment */
.hcg-clan.hcg-game-eso,
.hcg-clan.hcg-game-elderscrolls {
	--hcg-bg: #2a1618;
	--hcg-bg-2: #16100c;
	--hcg-panel: rgba(12, 8, 6, 0.5);
	--hcg-text: #f3e6c8;
	--hcg-muted: #d4c4a0;
	--hcg-accent: #d4b15a;
	--hcg-accent-2: #6e1c28;
	--hcg-link: #f0d078;
	--hcg-link-hover: #fff0c0;
	--hcg-border: #5a5348;
	background-image:
		radial-gradient(ellipse at top, rgba(110, 28, 40, 0.45) 0%, transparent 58%),
		linear-gradient(180deg, #2a1618 0%, #16100c 100%);
}


/* RuneScape — parchment text, gold trim, deep brown and red stone */
.hcg-clan.hcg-game-runescape,
.hcg-clan.hcg-game-rs,
.hcg-clan.hcg-game-rs3,
.hcg-clan.hcg-game-osrs {
	--hcg-bg: #3a2a18;
	--hcg-bg-2: #1c120a;
	--hcg-panel: rgba(12, 8, 4, 0.42);
	--hcg-text: #f4e6c8;
	--hcg-muted: #d4c4a0;
	--hcg-accent: #e0b83a;
	--hcg-accent-2: #8a2a1e;
	--hcg-link: #f0d078;
	--hcg-link-hover: #fff4c8;
	--hcg-border: #6b4a22;
	background-image:
		radial-gradient(ellipse at top, rgba(224, 184, 58, 0.14) 0%, transparent 52%),
		radial-gradient(ellipse at bottom right, rgba(138, 42, 30, 0.28) 0%, transparent 50%),
		linear-gradient(180deg, #3a2a18 0%, #1c120a 100%);
}

/* Tiles */
.hostclan-store .chs-clan-games .hostclan-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile {
  display: block;
  margin: 0;
  padding: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a,
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:link,
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:visited {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 74px;
  padding: 0.9rem 1rem;
  color: var(--hcg-text, #e8ece9);
  text-decoration: none;
}
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:hover,
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:focus-visible {
  color: #ffffff;
  background: rgba(10, 134, 60, 0.55);
  outline: none;
  box-shadow: inset 0 0 0 2px #0a863c;
}
.hostclan-store .chs-clan-games .hostclan-game-tile__name,
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:hover .hostclan-game-tile__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hcg-text, #e8ece9);
}
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:hover .hostclan-game-tile__name,
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:focus-visible .hostclan-game-tile__name {
  color: #ffffff;
}
.hostclan-store .chs-clan-games .hostclan-game-tile__count {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hcg-accent, #e6c200);
}
.hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile.is-empty .hostclan-game-tile__count {
  opacity: 0.8;
}
.hostclan-store .chs-clan-games__more {
  margin: 16px 0 0;
  text-align: center;
}
@media (max-width: 600px) {
  .hostclan-store .chs-clan-games .hostclan-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a,
  .hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:link,
  .hostclan-store .chs-clan-games .hcg-clan.hostclan-game-tile a:visited {
    min-height: 64px;
    padding: 0.75rem;
  }
  .hostclan-store .chs-clan-games .hostclan-game-tile__name {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }
}
@media (min-width: 601px) and (max-width: 860px), (max-width: 1100px) and (max-height: 500px) {
  .hostclan-store .chs-clan-games .hostclan-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}
