/**
 * PlayCoinKrazy Original Branded Slot Games
 * 10 unique themed games with custom symbol sets, bonus mechanics, and visual configs
 */

import { SymbolType, type Symbol, type GameConfig } from "./gameEngine.ts";

// ─── BRANDED GAME THEME CONFIG ──────────────────────────────────────────────

export interface BrandedGameTheme {
  slug: string;
  title: string;
  description: string;
  category: "slots" | "jackpot";
  rtp: number;
  volatility: "low" | "medium" | "high" | "very_high";
  reels: number;
  rows: number;
  paylines: number;
  minBetGc: number;
  maxBetGc: number;
  minBetSc: number;
  maxBetSc: number;
  symbols: Symbol[];
  features: GameConfig["features"];
  tags: string[];
  /** CSS gradient for card background */
  gradient: string;
  /** Primary accent color hex */
  accentColor: string;
  /** Theme emoji for lobby display */
  themeEmoji: string;
}

// ─── GAME 1: COIN KRAZY GOLD RUSH ──────────────────────────────────────────

const goldRush: BrandedGameTheme = {
  slug: "pck-gold-rush",
  title: "CoinKrazy Gold Rush",
  description: "Strike it rich in the wild west! Pan for gold nuggets, dynamite your way to bonus rounds, and hit the mother lode jackpot. Features expanding wilds and a pick-and-click gold mine bonus game.",
  category: "jackpot",
  rtp: 96.5,
  volatility: "high",
  reels: 5,
  rows: 3,
  paylines: 25,
  minBetGc: 10,
  maxBetGc: 5000,
  minBetSc: 0.10,
  maxBetSc: 50,
  symbols: [
    { id: "pickaxe", name: "Pickaxe", type: SymbolType.REGULAR, value: 2, emoji: "⛏️", rarity: 0.15 },
    { id: "nugget", name: "Gold Nugget", type: SymbolType.REGULAR, value: 3, emoji: "🪨", rarity: 0.14 },
    { id: "lantern", name: "Lantern", type: SymbolType.REGULAR, value: 4, emoji: "🏮", rarity: 0.13 },
    { id: "dynamite", name: "Dynamite", type: SymbolType.REGULAR, value: 5, emoji: "🧨", rarity: 0.11 },
    { id: "goldbar", name: "Gold Bar", type: SymbolType.REGULAR, value: 8, emoji: "🥇", rarity: 0.09 },
    { id: "diamond", name: "Diamond", type: SymbolType.REGULAR, value: 12, emoji: "💎", rarity: 0.07 },
    { id: "safe", name: "Safe", type: SymbolType.REGULAR, value: 20, emoji: "🔐", rarity: 0.04 },
    { id: "train", name: "Gold Train", type: SymbolType.REGULAR, value: 30, emoji: "🚂", rarity: 0.03 },
    { id: "wild", name: "Sheriff Wild", type: SymbolType.WILD, value: 50, emoji: "🤠", rarity: 0.08 },
    { id: "scatter", name: "Mine Cart", type: SymbolType.SCATTER, value: 0, emoji: "⛏️", rarity: 0.06 },
    { id: "bonus", name: "TNT Bonus", type: SymbolType.BONUS, value: 0, emoji: "💣", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 12, multiplier: 3 },
    wildExpand: true,
    wildSticky: false,
    bonusGame: true,
    progressiveJackpot: true,
  },
  tags: ["Western", "Gold", "Jackpot", "Free Spins", "Expanding Wilds"],
  gradient: "linear-gradient(135deg, #B8860B, #DAA520, #FFD700)",
  accentColor: "#FFD700",
  themeEmoji: "🤠",
};

// ─── GAME 2: PHARAOH'S FORTUNE ──────────────────────────────────────────────

const pharaohsFortune: BrandedGameTheme = {
  slug: "pck-pharaohs-fortune",
  title: "Pharaoh's Fortune",
  description: "Explore ancient Egyptian tombs filled with treasures! Unlock the Pharaoh's Chamber bonus for massive multipliers. Sticky wilds and cascading wins make every spin an adventure.",
  category: "slots",
  rtp: 96.2,
  volatility: "medium",
  reels: 5,
  rows: 3,
  paylines: 20,
  minBetGc: 10,
  maxBetGc: 3000,
  minBetSc: 0.10,
  maxBetSc: 30,
  symbols: [
    { id: "ankh", name: "Ankh", type: SymbolType.REGULAR, value: 2, emoji: "☥", rarity: 0.15 },
    { id: "scarab", name: "Scarab", type: SymbolType.REGULAR, value: 3, emoji: "🪲", rarity: 0.14 },
    { id: "eye", name: "Eye of Ra", type: SymbolType.REGULAR, value: 4, emoji: "👁️", rarity: 0.13 },
    { id: "cat", name: "Sacred Cat", type: SymbolType.REGULAR, value: 6, emoji: "🐈", rarity: 0.11 },
    { id: "cobra", name: "Cobra", type: SymbolType.REGULAR, value: 8, emoji: "🐍", rarity: 0.09 },
    { id: "mask", name: "Gold Mask", type: SymbolType.REGULAR, value: 15, emoji: "🎭", rarity: 0.06 },
    { id: "scepter", name: "Scepter", type: SymbolType.REGULAR, value: 20, emoji: "🔱", rarity: 0.04 },
    { id: "pyramid", name: "Pyramid", type: SymbolType.REGULAR, value: 25, emoji: "🔺", rarity: 0.03 },
    { id: "wild", name: "Pharaoh Wild", type: SymbolType.WILD, value: 50, emoji: "👑", rarity: 0.08 },
    { id: "scatter", name: "Sphinx", type: SymbolType.SCATTER, value: 0, emoji: "🦁", rarity: 0.06 },
    { id: "bonus", name: "Tomb Bonus", type: SymbolType.BONUS, value: 0, emoji: "🏺", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 10, multiplier: 2 },
    wildExpand: false,
    wildSticky: true,
    bonusGame: true,
    progressiveJackpot: false,
  },
  tags: ["Egyptian", "Ancient", "Sticky Wilds", "Free Spins", "Bonus Game"],
  gradient: "linear-gradient(135deg, #1a0a2e, #3d1c6e, #c49b3c)",
  accentColor: "#c49b3c",
  themeEmoji: "👑",
};

// ─── GAME 3: DRAGON'S TREASURE ──────────────────────────────────────────────

const dragonsTreasure: BrandedGameTheme = {
  slug: "pck-dragons-treasure",
  title: "Dragon's Treasure",
  description: "Face the mighty dragon and claim its hoard! Cascading reels with increasing multipliers and a dragon's breath free spins feature that can retrigger up to 50 free spins.",
  category: "slots",
  rtp: 95.8,
  volatility: "very_high",
  reels: 5,
  rows: 4,
  paylines: 30,
  minBetGc: 20,
  maxBetGc: 5000,
  minBetSc: 0.20,
  maxBetSc: 50,
  symbols: [
    { id: "gem_red", name: "Ruby", type: SymbolType.REGULAR, value: 2, emoji: "🔴", rarity: 0.15 },
    { id: "gem_blue", name: "Sapphire", type: SymbolType.REGULAR, value: 3, emoji: "🔵", rarity: 0.14 },
    { id: "gem_green", name: "Emerald", type: SymbolType.REGULAR, value: 4, emoji: "🟢", rarity: 0.12 },
    { id: "shield", name: "Shield", type: SymbolType.REGULAR, value: 6, emoji: "🛡️", rarity: 0.10 },
    { id: "sword", name: "Sword", type: SymbolType.REGULAR, value: 8, emoji: "⚔️", rarity: 0.09 },
    { id: "crown", name: "Crown", type: SymbolType.REGULAR, value: 12, emoji: "👑", rarity: 0.07 },
    { id: "chest", name: "Treasure Chest", type: SymbolType.REGULAR, value: 20, emoji: "🧳", rarity: 0.04 },
    { id: "egg", name: "Dragon Egg", type: SymbolType.REGULAR, value: 30, emoji: "🥚", rarity: 0.03 },
    { id: "wild", name: "Dragon Wild", type: SymbolType.WILD, value: 50, emoji: "🐉", rarity: 0.08 },
    { id: "scatter", name: "Fire Scatter", type: SymbolType.SCATTER, value: 0, emoji: "🔥", rarity: 0.06 },
    { id: "bonus", name: "Hoard Bonus", type: SymbolType.BONUS, value: 0, emoji: "💰", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 15, multiplier: 3 },
    wildExpand: true,
    wildSticky: false,
    bonusGame: true,
    progressiveJackpot: true,
  },
  tags: ["Fantasy", "Dragon", "Cascading", "High Volatility", "Expanding Wilds"],
  gradient: "linear-gradient(135deg, #1a0000, #8B0000, #FF4500)",
  accentColor: "#FF4500",
  themeEmoji: "🐉",
};

// ─── GAME 4: OCEAN GEMS ────────────────────────────────────────────────────

const oceanGems: BrandedGameTheme = {
  slug: "pck-ocean-gems",
  title: "Ocean Gems",
  description: "Dive deep into the crystal-clear ocean and discover hidden treasures! Collect pearls for the Hold & Win feature and unlock the Mermaid's Grotto bonus for up to 100x multipliers.",
  category: "slots",
  rtp: 96.8,
  volatility: "medium",
  reels: 5,
  rows: 3,
  paylines: 20,
  minBetGc: 5,
  maxBetGc: 2000,
  minBetSc: 0.05,
  maxBetSc: 25,
  symbols: [
    { id: "shell", name: "Shell", type: SymbolType.REGULAR, value: 2, emoji: "🐚", rarity: 0.15 },
    { id: "starfish", name: "Starfish", type: SymbolType.REGULAR, value: 3, emoji: "⭐", rarity: 0.14 },
    { id: "seahorse", name: "Seahorse", type: SymbolType.REGULAR, value: 4, emoji: "🦑", rarity: 0.12 },
    { id: "fish", name: "Tropical Fish", type: SymbolType.REGULAR, value: 5, emoji: "🐠", rarity: 0.11 },
    { id: "turtle", name: "Sea Turtle", type: SymbolType.REGULAR, value: 8, emoji: "🐢", rarity: 0.09 },
    { id: "dolphin", name: "Dolphin", type: SymbolType.REGULAR, value: 12, emoji: "🐬", rarity: 0.07 },
    { id: "pearl", name: "Pearl", type: SymbolType.REGULAR, value: 20, emoji: "🫧", rarity: 0.04 },
    { id: "trident", name: "Trident", type: SymbolType.REGULAR, value: 25, emoji: "🔱", rarity: 0.03 },
    { id: "wild", name: "Mermaid Wild", type: SymbolType.WILD, value: 50, emoji: "🧜‍♀️", rarity: 0.08 },
    { id: "scatter", name: "Treasure Map", type: SymbolType.SCATTER, value: 0, emoji: "🗺️", rarity: 0.06 },
    { id: "bonus", name: "Chest Bonus", type: SymbolType.BONUS, value: 0, emoji: "📦", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 10, multiplier: 2 },
    wildExpand: false,
    wildSticky: true,
    bonusGame: true,
    progressiveJackpot: false,
  },
  tags: ["Ocean", "Underwater", "Hold & Win", "Sticky Wilds", "Bonus Game"],
  gradient: "linear-gradient(135deg, #001f3f, #0074D9, #7FDBFF)",
  accentColor: "#7FDBFF",
  themeEmoji: "🧜‍♀️",
};

// ─── GAME 5: LUCKY LEPRECHAUN ──────────────────────────────────────────────

const luckyLeprechaun: BrandedGameTheme = {
  slug: "pck-lucky-leprechaun",
  title: "Lucky Leprechaun",
  description: "Follow the rainbow to the pot of gold! Lucky clovers trigger free spins with guaranteed wilds, and the Rainbow Road bonus lets you pick pots for instant prizes up to 500x your bet.",
  category: "slots",
  rtp: 97.0,
  volatility: "low",
  reels: 5,
  rows: 3,
  paylines: 15,
  minBetGc: 5,
  maxBetGc: 2000,
  minBetSc: 0.05,
  maxBetSc: 20,
  symbols: [
    { id: "clover", name: "Clover", type: SymbolType.REGULAR, value: 2, emoji: "🍀", rarity: 0.16 },
    { id: "horseshoe", name: "Horseshoe", type: SymbolType.REGULAR, value: 3, emoji: "🧲", rarity: 0.14 },
    { id: "mushroom", name: "Mushroom", type: SymbolType.REGULAR, value: 4, emoji: "🍄", rarity: 0.13 },
    { id: "harp", name: "Harp", type: SymbolType.REGULAR, value: 5, emoji: "🎵", rarity: 0.11 },
    { id: "beer", name: "Beer", type: SymbolType.REGULAR, value: 8, emoji: "🍺", rarity: 0.09 },
    { id: "pot", name: "Pot of Gold", type: SymbolType.REGULAR, value: 15, emoji: "🪙", rarity: 0.06 },
    { id: "rainbow", name: "Rainbow", type: SymbolType.REGULAR, value: 20, emoji: "🌈", rarity: 0.04 },
    { id: "hat", name: "Leprechaun Hat", type: SymbolType.REGULAR, value: 25, emoji: "🎩", rarity: 0.03 },
    { id: "wild", name: "Leprechaun Wild", type: SymbolType.WILD, value: 50, emoji: "☘️", rarity: 0.09 },
    { id: "scatter", name: "Gold Coin", type: SymbolType.SCATTER, value: 0, emoji: "🪙", rarity: 0.07 },
    { id: "bonus", name: "Rainbow Bonus", type: SymbolType.BONUS, value: 0, emoji: "🌈", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 15, multiplier: 2 },
    wildExpand: false,
    wildSticky: false,
    bonusGame: true,
    progressiveJackpot: false,
  },
  tags: ["Irish", "Lucky", "Low Volatility", "Free Spins", "Bonus Game"],
  gradient: "linear-gradient(135deg, #004d00, #228B22, #90EE90)",
  accentColor: "#228B22",
  themeEmoji: "☘️",
};

// ─── GAME 6: NEON NIGHTS ───────────────────────────────────────────────────

const neonNights: BrandedGameTheme = {
  slug: "pck-neon-nights",
  title: "Neon Nights",
  description: "Hit the Vegas strip in this electrifying neon-themed slot! Stacked wilds light up the reels, and the Club VIP bonus awards escalating multipliers up to 25x. Features a unique respin mechanic.",
  category: "slots",
  rtp: 96.0,
  volatility: "medium",
  reels: 5,
  rows: 3,
  paylines: 25,
  minBetGc: 10,
  maxBetGc: 3000,
  minBetSc: 0.10,
  maxBetSc: 30,
  symbols: [
    { id: "cherry", name: "Neon Cherry", type: SymbolType.REGULAR, value: 2, emoji: "🍒", rarity: 0.15 },
    { id: "lemon", name: "Neon Lemon", type: SymbolType.REGULAR, value: 3, emoji: "🍋", rarity: 0.14 },
    { id: "dice", name: "Neon Dice", type: SymbolType.REGULAR, value: 4, emoji: "🎲", rarity: 0.12 },
    { id: "cocktail", name: "Cocktail", type: SymbolType.REGULAR, value: 6, emoji: "🍸", rarity: 0.10 },
    { id: "music", name: "Music", type: SymbolType.REGULAR, value: 8, emoji: "🎶", rarity: 0.09 },
    { id: "diamond", name: "Neon Diamond", type: SymbolType.REGULAR, value: 15, emoji: "💎", rarity: 0.06 },
    { id: "seven", name: "Lucky 7", type: SymbolType.REGULAR, value: 20, emoji: "7️⃣", rarity: 0.04 },
    { id: "bar", name: "BAR", type: SymbolType.REGULAR, value: 25, emoji: "🏷️", rarity: 0.03 },
    { id: "wild", name: "Neon Wild", type: SymbolType.WILD, value: 50, emoji: "⚡", rarity: 0.08 },
    { id: "scatter", name: "Disco Ball", type: SymbolType.SCATTER, value: 0, emoji: "🪩", rarity: 0.06 },
    { id: "bonus", name: "VIP Bonus", type: SymbolType.BONUS, value: 0, emoji: "🎰", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 10, multiplier: 2 },
    wildExpand: true,
    wildSticky: false,
    bonusGame: true,
    progressiveJackpot: false,
  },
  tags: ["Vegas", "Neon", "Classic", "Expanding Wilds", "Respin"],
  gradient: "linear-gradient(135deg, #0d0221, #ff00ff, #00ffff)",
  accentColor: "#ff00ff",
  themeEmoji: "⚡",
};

// ─── GAME 7: SAMURAI SPINS ─────────────────────────────────────────────────

const samuraiSpins: BrandedGameTheme = {
  slug: "pck-samurai-spins",
  title: "Samurai Spins",
  description: "Enter the dojo of the legendary samurai! Katana wilds slice across reels for guaranteed wins, and the Shogun's Challenge bonus awards up to 20 free spins with 5x multiplier.",
  category: "slots",
  rtp: 96.3,
  volatility: "high",
  reels: 5,
  rows: 3,
  paylines: 25,
  minBetGc: 10,
  maxBetGc: 4000,
  minBetSc: 0.10,
  maxBetSc: 40,
  symbols: [
    { id: "fan", name: "Fan", type: SymbolType.REGULAR, value: 2, emoji: "🪭", rarity: 0.15 },
    { id: "lantern", name: "Lantern", type: SymbolType.REGULAR, value: 3, emoji: "🏮", rarity: 0.14 },
    { id: "bonsai", name: "Bonsai", type: SymbolType.REGULAR, value: 4, emoji: "🌳", rarity: 0.12 },
    { id: "koi", name: "Koi Fish", type: SymbolType.REGULAR, value: 6, emoji: "🐟", rarity: 0.10 },
    { id: "pagoda", name: "Pagoda", type: SymbolType.REGULAR, value: 8, emoji: "🏯", rarity: 0.09 },
    { id: "katana", name: "Katana", type: SymbolType.REGULAR, value: 15, emoji: "⚔️", rarity: 0.06 },
    { id: "mask", name: "Oni Mask", type: SymbolType.REGULAR, value: 20, emoji: "👹", rarity: 0.04 },
    { id: "dragon", name: "Dragon", type: SymbolType.REGULAR, value: 30, emoji: "🐲", rarity: 0.03 },
    { id: "wild", name: "Samurai Wild", type: SymbolType.WILD, value: 50, emoji: "🥷", rarity: 0.08 },
    { id: "scatter", name: "Shuriken", type: SymbolType.SCATTER, value: 0, emoji: "✴️", rarity: 0.06 },
    { id: "bonus", name: "Dojo Bonus", type: SymbolType.BONUS, value: 0, emoji: "⛩️", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 20, multiplier: 5 },
    wildExpand: true,
    wildSticky: false,
    bonusGame: true,
    progressiveJackpot: false,
  },
  tags: ["Asian", "Samurai", "High Volatility", "Free Spins", "Expanding Wilds"],
  gradient: "linear-gradient(135deg, #1a0000, #8B0000, #FF6347)",
  accentColor: "#FF6347",
  themeEmoji: "🥷",
};

// ─── GAME 8: COSMIC JACKPOT ────────────────────────────────────────────────

const cosmicJackpot: BrandedGameTheme = {
  slug: "pck-cosmic-jackpot",
  title: "Cosmic Jackpot",
  description: "Blast off into the cosmos for astronomical wins! Black hole wilds absorb adjacent symbols for mega combinations, and the Supernova Jackpot can award up to 10,000x your bet.",
  category: "jackpot",
  rtp: 95.5,
  volatility: "very_high",
  reels: 5,
  rows: 4,
  paylines: 40,
  minBetGc: 25,
  maxBetGc: 10000,
  minBetSc: 0.25,
  maxBetSc: 100,
  symbols: [
    { id: "star", name: "Star", type: SymbolType.REGULAR, value: 2, emoji: "⭐", rarity: 0.15 },
    { id: "moon", name: "Moon", type: SymbolType.REGULAR, value: 3, emoji: "🌙", rarity: 0.14 },
    { id: "comet", name: "Comet", type: SymbolType.REGULAR, value: 4, emoji: "☄️", rarity: 0.12 },
    { id: "planet", name: "Planet", type: SymbolType.REGULAR, value: 6, emoji: "🪐", rarity: 0.10 },
    { id: "rocket", name: "Rocket", type: SymbolType.REGULAR, value: 8, emoji: "🚀", rarity: 0.09 },
    { id: "ufo", name: "UFO", type: SymbolType.REGULAR, value: 15, emoji: "🛸", rarity: 0.06 },
    { id: "astronaut", name: "Astronaut", type: SymbolType.REGULAR, value: 25, emoji: "👨‍🚀", rarity: 0.04 },
    { id: "galaxy", name: "Galaxy", type: SymbolType.REGULAR, value: 40, emoji: "🌌", rarity: 0.02 },
    { id: "wild", name: "Black Hole Wild", type: SymbolType.WILD, value: 50, emoji: "🕳️", rarity: 0.07 },
    { id: "scatter", name: "Nebula", type: SymbolType.SCATTER, value: 0, emoji: "🌀", rarity: 0.06 },
    { id: "bonus", name: "Supernova", type: SymbolType.BONUS, value: 0, emoji: "💥", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 12, multiplier: 4 },
    wildExpand: true,
    wildSticky: true,
    bonusGame: true,
    progressiveJackpot: true,
  },
  tags: ["Space", "Cosmic", "Progressive Jackpot", "Very High Volatility", "Mega Wins"],
  gradient: "linear-gradient(135deg, #0a0020, #1a0050, #4B0082, #9400D3)",
  accentColor: "#9400D3",
  themeEmoji: "🚀",
};

// ─── GAME 9: FRUIT FRENZY DELUXE ───────────────────────────────────────────

const fruitFrenzy: BrandedGameTheme = {
  slug: "pck-fruit-frenzy",
  title: "Fruit Frenzy Deluxe",
  description: "A modern twist on the classic fruit machine! Juicy multipliers, cascading wins that keep paying, and a Smoothie Bonus that blends your wins for up to 10x multiplier. Simple, fun, rewarding.",
  category: "slots",
  rtp: 97.2,
  volatility: "low",
  reels: 5,
  rows: 3,
  paylines: 10,
  minBetGc: 1,
  maxBetGc: 1000,
  minBetSc: 0.01,
  maxBetSc: 10,
  symbols: [
    { id: "cherry", name: "Cherry", type: SymbolType.REGULAR, value: 2, emoji: "🍒", rarity: 0.16 },
    { id: "lemon", name: "Lemon", type: SymbolType.REGULAR, value: 3, emoji: "🍋", rarity: 0.15 },
    { id: "orange", name: "Orange", type: SymbolType.REGULAR, value: 4, emoji: "🍊", rarity: 0.13 },
    { id: "grape", name: "Grape", type: SymbolType.REGULAR, value: 5, emoji: "🍇", rarity: 0.12 },
    { id: "watermelon", name: "Watermelon", type: SymbolType.REGULAR, value: 8, emoji: "🍉", rarity: 0.09 },
    { id: "pineapple", name: "Pineapple", type: SymbolType.REGULAR, value: 12, emoji: "🍍", rarity: 0.07 },
    { id: "strawberry", name: "Strawberry", type: SymbolType.REGULAR, value: 15, emoji: "🍓", rarity: 0.05 },
    { id: "banana", name: "Golden Banana", type: SymbolType.REGULAR, value: 20, emoji: "🍌", rarity: 0.03 },
    { id: "wild", name: "Blender Wild", type: SymbolType.WILD, value: 50, emoji: "🥤", rarity: 0.09 },
    { id: "scatter", name: "Fruit Bowl", type: SymbolType.SCATTER, value: 0, emoji: "🍑", rarity: 0.07 },
    { id: "bonus", name: "Smoothie Bonus", type: SymbolType.BONUS, value: 0, emoji: "🧃", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 20, multiplier: 2 },
    wildExpand: false,
    wildSticky: false,
    bonusGame: true,
    progressiveJackpot: false,
  },
  tags: ["Classic", "Fruit", "Low Volatility", "Cascading Wins", "High RTP"],
  gradient: "linear-gradient(135deg, #FF6B35, #FF1493, #FFD700)",
  accentColor: "#FF6B35",
  themeEmoji: "🍒",
};

// ─── GAME 10: PIRATE'S PLUNDER ─────────────────────────────────────────────

const piratesPlunder: BrandedGameTheme = {
  slug: "pck-pirates-plunder",
  title: "Pirate's Plunder",
  description: "Set sail on the seven seas for buried treasure! Navigate through storms for multiplier wilds, and the Treasure Island bonus lets you dig for hidden chests with prizes up to 1000x.",
  category: "slots",
  rtp: 96.0,
  volatility: "high",
  reels: 5,
  rows: 3,
  paylines: 25,
  minBetGc: 10,
  maxBetGc: 5000,
  minBetSc: 0.10,
  maxBetSc: 50,
  symbols: [
    { id: "compass", name: "Compass", type: SymbolType.REGULAR, value: 2, emoji: "🧭", rarity: 0.15 },
    { id: "anchor", name: "Anchor", type: SymbolType.REGULAR, value: 3, emoji: "⚓", rarity: 0.14 },
    { id: "map", name: "Treasure Map", type: SymbolType.REGULAR, value: 4, emoji: "🗺️", rarity: 0.12 },
    { id: "parrot", name: "Parrot", type: SymbolType.REGULAR, value: 6, emoji: "🦜", rarity: 0.10 },
    { id: "cannon", name: "Cannon", type: SymbolType.REGULAR, value: 8, emoji: "💣", rarity: 0.09 },
    { id: "rum", name: "Rum Bottle", type: SymbolType.REGULAR, value: 15, emoji: "🍾", rarity: 0.06 },
    { id: "ship", name: "Pirate Ship", type: SymbolType.REGULAR, value: 20, emoji: "🏴‍☠️", rarity: 0.04 },
    { id: "chest", name: "Treasure Chest", type: SymbolType.REGULAR, value: 30, emoji: "💰", rarity: 0.03 },
    { id: "wild", name: "Captain Wild", type: SymbolType.WILD, value: 50, emoji: "🏴‍☠️", rarity: 0.08 },
    { id: "scatter", name: "Skull", type: SymbolType.SCATTER, value: 0, emoji: "☠️", rarity: 0.06 },
    { id: "bonus", name: "Island Bonus", type: SymbolType.BONUS, value: 0, emoji: "🏝️", rarity: 0.02 },
  ],
  features: {
    freeSpinsOnScatter: { scatterCount: 3, freeSpins: 12, multiplier: 3 },
    wildExpand: true,
    wildSticky: false,
    bonusGame: true,
    progressiveJackpot: true,
  },
  tags: ["Pirate", "Adventure", "High Volatility", "Expanding Wilds", "Treasure Hunt"],
  gradient: "linear-gradient(135deg, #1a0a00, #8B4513, #DAA520)",
  accentColor: "#DAA520",
  themeEmoji: "🏴‍☠️",
};

// ─── EXPORT ALL BRANDED GAMES ───────────────────────────────────────────────

export const BRANDED_GAMES: BrandedGameTheme[] = [
  goldRush,
  pharaohsFortune,
  dragonsTreasure,
  oceanGems,
  luckyLeprechaun,
  neonNights,
  samuraiSpins,
  cosmicJackpot,
  fruitFrenzy,
  piratesPlunder,
];

/**
 * Get a branded game config by slug
 */
export function getBrandedGameBySlug(slug: string): BrandedGameTheme | undefined {
  return BRANDED_GAMES.find((g) => g.slug === slug);
}

/**
 * Convert a BrandedGameTheme to a GameConfig for the slot engine
 */
export function brandedToGameConfig(branded: BrandedGameTheme, gameId: number): GameConfig {
  return {
    gameId,
    reels: branded.reels,
    rows: branded.rows,
    paylines: branded.paylines,
    symbols: branded.symbols,
    minBet: branded.minBetSc,
    maxBet: branded.maxBetSc,
    rtp: branded.rtp,
    volatility: branded.volatility,
    features: branded.features,
  };
}
