// Mock data — placeholders for thumbnails, avatars, history

const PALETTES = [
  { bg: "linear-gradient(135deg, #FF3B30, #8B0000)", a: "#FFD700" },
  { bg: "linear-gradient(135deg, #1a1a2e, #16213e)", a: "#FF3B30" },
  { bg: "linear-gradient(135deg, #FF6B35, #C2185B)", a: "#FFEB3B" },
  { bg: "linear-gradient(135deg, #0F3460, #533483)", a: "#FF3B30" },
  { bg: "linear-gradient(135deg, #2E7D32, #004D40)", a: "#FFD700" },
  { bg: "linear-gradient(135deg, #4A148C, #311B92)", a: "#00E5FF" },
  { bg: "linear-gradient(135deg, #BF360C, #3E2723)", a: "#FFC107" },
  { bg: "linear-gradient(135deg, #006064, #00838F)", a: "#FF3B30" }
];

// Each tone is a "person" (consistent identity across emotions, simulating the avatar feature).
// Each emotion key is a real Unsplash portrait visibly expressing that emotion.
// Same tone+emotion = same photo every time (stable). Falls back to .photo if a key is missing.
const _u = (id) => `https://images.unsplash.com/photo-${id}?w=400&h=400&fit=crop&crop=faces`;

// Real-YouTuber portraits used in the landing animations (tones 0, 4, 6).
const _yt1 = "https://m.media-amazon.com/images/S/amzn-author-media-prod/9albp97vrnqisvn3ebc97oe237.jpg";
const _yt2 = "https://ric.com.br/wp-content/uploads/2024/01/youtuber-ishowspeed.jpg";
const _yt3 = {
  shock: "https://i.scdn.co/image/ab67616d0000b27390be575d447d89ba514bcf25",
  happy: "https://avatars.githubusercontent.com/u/183113?v=4",
  focus: { src: "https://substackcdn.com/image/fetch/$s_!tp7D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf7d916b-064e-449f-a998-99f5ce4adc5b_1280x720.png", pos: "78% center" },
  angry: { src: "https://substackcdn.com/image/youtube/w_728,c_limit/w3WAml7u9H8", pos: "20% center" }
};
const AVATAR_TONES = [
  {
    bg: "linear-gradient(135deg, #FFB199, #FF6F61)", initial: "M",
    photo: _yt1,
    photos: {
      shock: _yt1, happy: _yt1, serious: _yt1, thinking: _yt1, angry: _yt1
    }
  },
  {
    bg: "linear-gradient(135deg, #FFD89B, #19547B)", initial: "B",
    photo: _u("1494790108377-be9c29b29330"),
    photos: {
      shock:    _u("1488161628813-04466f872be2"),
      happy:    _u("1494790108377-be9c29b29330"),
      serious:  _u("1517841905240-472988babdf9"),
      thinking: _u("1521119989659-a83eee488004"),
      angry:    _u("1532170579297-281918c8ae72")
    }
  },
  {
    bg: "linear-gradient(135deg, #C2E59C, #64B3F4)", initial: "L",
    photo: _u("1438761681033-6461ffad8d80"),
    photos: {
      shock:    _u("1463453091185-61582044d556"),
      happy:    _u("1502685104226-ee32379fefbe"),
      serious:  _u("1507003211169-0a1dd7228f2d"),
      thinking: _u("1499996860823-5214fcc65f8f"),
      angry:    _u("1556157382-97eda2d62296")
    }
  },
  {
    bg: "linear-gradient(135deg, #F6D365, #FDA085)", initial: "R",
    photo: _u("1507003211169-0a1dd7228f2d"),
    photos: {
      shock:    _u("1502823403499-6ccfcf4fb453"),
      happy:    _u("1492562080023-ab3db95bfbce"),
      serious:  _u("1463453091185-61582044d556"),
      thinking: _u("1542178243-bc20204b769f"),
      angry:    _u("1488161628813-04466f872be2")
    }
  },
  {
    bg: "linear-gradient(135deg, #C471F5, #FA71CD)", initial: "J",
    photo: _yt2,
    photos: {
      shock: _yt2, happy: _yt2, serious: _yt2, thinking: _yt2, angry: _yt2
    }
  },
  {
    bg: "linear-gradient(135deg, #4FACFE, #00F2FE)", initial: "T",
    photo: _u("1531427186611-ecfd6d936c79"),
    photos: {
      shock:    _u("1488161628813-04466f872be2"),
      happy:    _u("1531123897727-8f129e1688ce"),
      serious:  _u("1531427186611-ecfd6d936c79"),
      thinking: _u("1546961342-1c5dd028c2bb"),
      angry:    _u("1556157382-97eda2d62296")
    }
  },
  {
    bg: "linear-gradient(135deg, #FA709A, #FEE140)", initial: "A",
    photo: _yt3.focus,
    photos: {
      shock:    _yt3.shock,
      happy:    _yt3.happy,
      focus:    _yt3.focus,
      serious:  _yt3.focus,
      thinking: _yt3.focus,
      angry:    _yt3.angry
    }
  },
  {
    bg: "linear-gradient(135deg, #30CFD0, #330867)", initial: "K",
    photo: _u("1539571696357-5a69c17a67c6"),
    photos: {
      shock:    _u("1502823403499-6ccfcf4fb453"),
      happy:    _u("1502685104226-ee32379fefbe"),
      serious:  _u("1539571696357-5a69c17a67c6"),
      thinking: _u("1542178243-bc20204b769f"),
      angry:    _u("1539571696357-5a69c17a67c6")
    }
  }
];

const SAVED_AVATARS = [
  { id: "av1", name: "Marcos Pro", meta: "usado 47x", tone: 0, emotion: "shock", style: "Realista" },
  { id: "av2", name: "Marcos Sério", meta: "usado 23x", tone: 0, emotion: "serious", style: "Realista" },
  { id: "av3", name: "Bia Casual", meta: "usado 12x", tone: 1, emotion: "happy", style: "Cartoon" },
  { id: "av4", name: "Lucas Tech", meta: "usado 8x", tone: 2, emotion: "thinking", style: "Realista" },
  { id: "av5", name: "Rafa News", meta: "usado 3x", tone: 3, emotion: "shock", style: "Editorial" }
];

const EMOTIONS = [
  { id: "shock", label: "Choque", glyph: "‼" },
  { id: "happy", label: "Feliz", glyph: "▲" },
  { id: "serious", label: "Sério", glyph: "—" },
  { id: "thinking", label: "Curioso", glyph: "?" },
  { id: "angry", label: "Bravo", glyph: "✕" }
];

const TEMPLATES = [
  { id: "split", label: "Split", desc: "Avatar à esquerda, texto à direita" },
  { id: "centered", label: "Foco", desc: "Texto sobre avatar" },
  { id: "bottom", label: "Manchete", desc: "Texto na base, avatar grande" },
  { id: "vs", label: "VS", desc: "Comparação dois avatares" },
  { id: "arrow", label: "Seta", desc: "Avatar com seta apontando" },
  { id: "number", label: "Número", desc: "Número grande em destaque" }
];

// Generated thumbnail variations — each is a recipe used by <Thumbnail />
const SAMPLE_THUMBS = [
  { id: "t1", template: "split", text: "EU ", hl: "PERDI", text2: " R$10K", palette: 0, avatar: 0, emotion: "shock", arrow: false, number: null },
  { id: "t2", template: "centered", text: "NINGUÉM TE", hl: "CONTOU", text2: " ISSO", palette: 1, avatar: 0, emotion: "serious", arrow: false, number: null },
  { id: "t3", template: "number", text: "FORMAS DE GANHAR", hl: "", text2: "", palette: 2, avatar: 0, emotion: "happy", arrow: false, number: "7" },
  { id: "t4", template: "arrow", text: "É ", hl: "AGORA", text2: " OU NUNCA", palette: 3, avatar: 0, emotion: "shock", arrow: true, number: null },
  { id: "t5", template: "bottom", text: "O FIM DO ", hl: "YOUTUBE", text2: "?", palette: 4, avatar: 0, emotion: "thinking", arrow: false, number: null },
  { id: "t6", template: "split", text: "FIZ R$50K", hl: "EM 30 DIAS", text2: "", palette: 5, avatar: 0, emotion: "happy", arrow: true, number: null }
];

const HISTORY = [
  { id: "h1", title: "Como ganhei R$10k em 7 dias (sem investir nada)", url: "youtube.com/watch?v=...", date: "08 mai 2026", thumbs: 6 },
  { id: "h2", title: "REAGINDO ao novo iPhone 17 Pro Max", url: "youtube.com/watch?v=...", date: "05 mai 2026", thumbs: 5 },
  { id: "h3", title: "Setup BARATO vs Setup CARO — qual vale a pena?", url: "youtube.com/watch?v=...", date: "02 mai 2026", thumbs: 8 },
  { id: "h4", title: "Por que ninguém fala SOBRE ISSO em 2026", url: "youtube.com/watch?v=...", date: "29 abr 2026", thumbs: 5 },
  { id: "h5", title: "Testei o GPT-7 por 30 dias — RESULTADO chocante", url: "youtube.com/watch?v=...", date: "26 abr 2026", thumbs: 6 }
];

const SAMPLE_VIDEO = {
  title: "Como ganhei R$10k em 7 dias (sem investir nada)",
  channel: "Marcos Pro",
  duration: "12:43",
  views: "248k visualizações",
  thumbnail: 0
};

window.GT_DATA = {
  PALETTES, AVATAR_TONES, SAVED_AVATARS, EMOTIONS, TEMPLATES,
  SAMPLE_THUMBS, HISTORY, SAMPLE_VIDEO
};
