// level config — one entry per level
// x,y = center  w,h = dimensions
// bg        → put your PNG in public/backgrounds/levelN.png
// playerImg → put your PNG in public/assets/player_levelN.png

export const LEVELS = [

    // ── LEVEL 1: CRIMSON ──────────────────────────────────────────────────────
    {
        id: 1,
        name: 'A Burning Heart',
        color: '#970505',
        bg: '/backgrounds/level1.png',
        bgComplete: '/backgrounds/level1_complete.png',
        playerImg: '/assets/player_level1.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 170, y: 370, w: 160, h: 14 },
            { x: 390, y: 308, w: 150, h: 14 },
            { x: 610, y: 248, w: 150, h: 14 },
            { x: 395, y: 188, w: 140, h: 14 },
        ],
        fragments: [
            { x: 170, y: 338, color: '#970505' },
            { x: 390, y: 278, color: '#970505' },
            { x: 610, y: 216, color: '#970505' },
            { x: 395, y: 156, color: '#970505' },
        ],
        enemies: [
            { x: 390, y: 283, patrol: 50 },
        ],
        tar: [],
        fragmentQuotes: [
            'Red is the first color you learn to see.',
            'You felt it first, before you had words for it',
            'To feel intensely is not weakness. It is aliveness.',
            'The heart has always beaten in red.',
        ],
        completeQuote: 'Red is the color of being alive. It asks nothing of you except honesty. Red is rage, passion, urgency, and love; The most visceral emotion, it demands to be felt.',
    },

    // ── LEVEL 2: AMBER ────────────────────────────────────────────────────────
    {
        id: 2,
        name: 'Warm Hands',
        color: '#CF8917',
        bg: '/backgrounds/level2.png',
        bgComplete: '/backgrounds/level2_complete.png',
        playerImg: '/assets/player_level2.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 160, y: 375, w: 150, h: 14 },
            { x: 360, y: 318, w: 140, h: 14 },
            { x: 560, y: 260, w: 130, h: 14 },
            { x: 710, y: 330, w: 110, h: 14 },
            { x: 280, y: 238, w: 110, h: 14 },
            { x: 478, y: 188, w: 110, h: 14 },
        ],
        fragments: [
            { x: 160, y: 343, color: '#CF8917' },
            { x: 710, y: 298, color: '#CF8917' },
            { x: 280, y: 206, color: '#CF8917' },
            { x: 478, y: 156, color: '#CF8917' },
        ],
        enemies: [
            { x: 360, y: 293, patrol: 45 },
            { x: 560, y: 235, patrol: 40 },
        ],
        tar: [
            { x: 490, y: 432 },
        ],
        fragmentQuotes: [
            'Not every fire burns, some just keep you warm',
            'Warmth is a form of courage.',
            'You made something today. That matters.',
            'You were built to connect and create.',
        ],
        completeQuote: 'Orange reminds you that making things is an act of hope. It is the color of warmth, creativity, enthusiasm, and connection. It is a choice to stay open. Let yourself be warm.',
    },

    // ── LEVEL 3: YELLOW ───────────────────────────────────────────────────────
    {
        id: 3,
        name: 'A Bright Ache',
        color: '#E3D214',
        bg: '/backgrounds/level3.png',
        bgComplete: '/backgrounds/level3_complete.png',
        playerImg: '/assets/player_level3.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 140, y: 372, w: 150, h: 14 },
            { x: 575, y: 365, w: 150, h: 14 },
            { x: 280, y: 302, w: 120, h: 14 },
            { x: 510, y: 295, w: 120, h: 14 },
            { x: 140, y: 238, w: 130, h: 14 },
            { x: 420, y: 228, w: 130, h: 14 },
            { x: 660, y: 220, w: 110, h: 14 },
            { x: 290, y: 130, w: 120, h: 14 },
        ],
        fragments: [
            { x: 280, y: 270, color: '#E3D214' },
            { x: 660, y: 188, color: '#E3D214' },
            { x: 285, y: 90, color: '#E3D214' },
            { x: 420, y: 196, color: '#E3D214' },
        ],
        enemies: [
            { x: 575, y: 340, patrol: 52 },
            { x: 420, y: 203, patrol: 45 },
            { x: 140, y: 200, patrol: 45 },
        ],
        tar: [
            { x: 370, y: 432 },
            { x: 700, y: 432 },
        ],
        fragmentQuotes: [
            'Joy is allowed to be simple',
            'Clarity costs something, it asks you to really look.',
            'Anxiety and curiosity live in the same color.',
            'Your mind runs fast because it cares deeply',
        ],
        completeQuote: 'Yellow carries both hope and anxiety in equal measure. It is the color of joy but also of anxiety. Your nervous energy is not a flaw. It is the same thing as your intelligence, it goes hand in hand with your joy.',
    },

    // ── LEVEL 4: GREEN ────────────────────────────────────────────────────────
    {
        id: 4,
        name: 'Growth',
        color: '#39BD1C',
        bg: '/backgrounds/level4.png',
        bgComplete: '/backgrounds/level4_complete.png',
        playerImg: '/assets/player_level4.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 140, y: 372, w: 130, h: 14 },
            { x: 665, y: 365, w: 130, h: 14 },
            { x: 270, y: 305, w: 120, h: 14 },
            { x: 510, y: 298, w: 120, h: 14 },
            { x: 165, y: 242, w: 110, h: 14 },
            { x: 380, y: 232, w: 120, h: 14 },
            { x: 610, y: 225, w: 110, h: 14 },
            { x: 260, y: 175, w: 100, h: 14 },
            { x: 520, y: 168, w:  95, h: 14 },
        ],
        fragments: [
            { x: 270, y: 273, color: '#39BD1C' },
            { x: 510, y: 266, color: '#39BD1C' },
            { x: 260, y: 140, color: '#39BD1C' },
            { x: 520, y: 136, color: '#39BD1C' },
        ],
        enemies: [
            { x: 140, y: 347, patrol: 40 },
            { x: 270, y: 280, patrol: 38 },
            { x: 610, y: 200, patrol: 36 },
            { x: 665, y: 350, patrol: 38 },
            { x: 380, y: 200, patrol: 38},
            ],
        tar: [
            { x: 395, y: 432 },
            { x: 610, y: 432 },
        ],
        fragmentQuotes: [
            'Growth rarely feels like growth while it\'s happening.',
            'Green is the slowest and most stubborn color.',
            'Healing is not linear',
            'Every root is also a reach.',
        ],
        completeQuote: 'Green is the color of becoming. It does not rush, does not announce itself. It doesn\'t ask you to heal, only to keep growing. Green represents growth, healing, balance, the slow work of becoming. You are allowed to grow quietly, at your own pace.',
    },

    // ── LEVEL 5: CYAN ─────────────────────────────────────────────────────────
    {
        id: 5,
        name: 'Open Water',
        color: '#12B6C8',
        bg: '/backgrounds/level5.png',
        bgComplete: '/backgrounds/level5_complete.png',
        playerImg: '/assets/player_level5.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 145, y: 378, w: 140, h: 14 },
            { x: 145, y: 220, w: 140, h: 14 },
            { x: 355, y: 395, w: 115, h: 14 },
            { x: 540, y: 368, w: 125, h: 14 },
            { x: 235, y: 308, w: 110, h: 14 },
            { x: 445, y: 295, w: 110, h: 14 },
            { x: 640, y: 320, w: 115, h: 14 },
            { x: 50, y: 148, w:  95, h: 14 },
            { x: 365, y: 235, w:  90, h: 14 },
            { x: 590, y: 220, w:  90, h: 14 },
            { x: 755, y: 202, w:  100, h: 14 },
        ],
        fragments: [
            { x: 235, y: 276, color: '#12B6C8' },
            { x: 640, y: 280, color: '#12B6C8' },
            { x: 50, y: 100, color: '#12B6C8' },
            { x: 365, y: 203, color: '#12B6C8' },
            { x: 755, y: 170, color: '#12B6C8' },
        ],
        enemies: [
            { x: 355, y: 370, patrol: 35 },
            { x: 445, y: 270, patrol: 35 },
            { x: 590, y: 195, patrol: 28 },
            { x: 150, y: 350, patrol: 38 },
            { x: 145, y: 200, patrol: 38 },
        ],
        tar: [
            { x: 265, y: 432 },
            { x: 480, y: 432 },
            { x: 680, y: 432 },
        ],
        fragmentQuotes: [
            'Clarity comes after, not before',
            'Clear water still has a bottom.',
            'Calm is not the absence of feeling, it\'s feeling without drowning.',
            'To speak honestly is an act of trust.',
            'You can be still and still be powerful.',
        ],
        completeQuote: 'Cyan is the color of honest water, clear enough to see through, deep enough to matter, and standing at a calming still. Cyan sits between calmness and clarity. It asks you to say what you mean, and listen with clarity. ',
    },

    // ── LEVEL 6: DEEP BLUE ────────────────────────────────────────────────────
    {
        id: 6,
        name: 'A Long Quiet',
        color: '#170CB7',
        bg: '/backgrounds/level6.png',
        bgComplete: '/backgrounds/level6_complete.png',
        playerImg: '/assets/player_level6.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 130, y: 382, w: 125, h: 14 },
            { x: 675, y: 370, w: 130, h: 14 },
            { x: 308, y: 355, w: 108, h: 14 },
            { x: 510, y: 385, w: 105, h: 14 },
            { x: 220, y: 302, w: 100, h: 14 },
            { x: 455, y: 290, w: 100, h: 14 },
            { x: 660, y: 275, w: 120, h: 14 },
            { x: 105, y: 200, w: 90, h: 14 },
            { x: 358, y: 232, w: 90, h: 14 },
            //{ x: 580, y: 215, w: 85, h: 14 },
            { x: 745, y: 198, w: 80, h: 14 },
            { x: 268, y: 100, w: 100, h: 14 },
            { x: 480, y: 165, w: 80, h: 14 },
        ],
        fragments: [
            { x: 270, y: 70, color: '#170CB7' },
            { x: 220, y: 270, color: '#170CB7' },
            { x: 660, y: 243, color: '#170CB7' },
            { x: 358, y: 200, color: '#170CB7' },
            { x: 480, y: 133, color: '#170CB7' },
        ],
        enemies: [
            { x: 510, y: 360, patrol: 33 },
            { x: 455, y: 265, patrol: 30 },
            { x: 660, y: 250, patrol: 37 },
            { x: 358, y: 207, patrol: 25 },
            { x: 100, y: 180, patrol: 20 },
        ],
        tar: [
            { x: 230, y: 432 },
            { x: 460, y: 432 },
            { x: 640, y: 432 },
        ],
        fragmentQuotes: [
            'Some feelings don\'t have names, they just have weight',
            'There is beauty in melancholy, it means you loved something.',
            'Depth and darkness are not the same thing.',
            'You are allowed to sit with it.',
            'Some truths only surface in the quiet.',
        ],
        completeQuote: 'Blue is the color of depth, sadness, and introspection, the most universally felt emotions. It does not ask you to feel better. It asks you to feel, that is enough. Do not be afraid to go deep. That is where you find out who you actually are.',
    },

    // ── LEVEL 7: PURPLE ───────────────────────────────────────────────────────
    {
        id: 7,
        name: 'In-Between',
        color: '#6613BA',
        bg: '/backgrounds/level7.png',
        bgComplete: '/backgrounds/level7_complete.png',
        playerImg: '/assets/player_level7.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 130, y: 385, w: 115, h: 14 },
            { x: 245, y: 300, w:  115, h: 14 }, 
            { x: 370, y: 232, w:  115, h: 14 },
            { x: 500, y: 170, w:  115, h: 14 }, 
            { x: 650, y: 230, w:  150, h: 14 },
        ],
        fragments: [
            { x: 160, y: 340, color: '#6613BA' },
            { x: 220, y: 260, color: '#6613BA' },
            { x: 400, y: 190, color: '#6613BA' },
            { x: 470, y: 130, color: '#6613BA' },
            { x: 690, y: 180, color: '#6613BA' },
        ],
        enemies: [
            { x: 130, y: 380, patrol: 28 },
            { x: 240, y: 280, patrol: 28 },
            { x: 370, y: 210, patrol: 28 },
            { x: 500, y: 160, patrol: 28 },
            { x: 650, y: 220, patrol: 38 },
        ],
        tar: [
            { x: 200, y: 432 },
            { x: 408, y: 432 },
            { x: 618, y: 432 },
        ],
        fragmentQuotes: [
            'Not everything needs an explanation.',
            'Mystery is an invitation, not a threat.',
            'Your contradictions are not flaws, they are complexity.',
            'The unknown is not something to fix.',
            'Transformation is always a little uncomfortable.',
        ],
        completeQuote: 'Purple is the color of the in-betweens, it represents mystery and intuition. Purple lives in the questions. You do not need everything figured out. Some things are only ever felt, never fully explained.',
    },

    // ── LEVEL 8: MAGENTA ──────────────────────────────────────────────────────
    {
        id: 8,
        name: 'Tenderness',
        color: '#C71287',
        bg: '/backgrounds/level8.png',
        bgComplete: '/backgrounds/level8_complete.png',
        playerImg: '/assets/player_level8.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 155, y: 380, w: 130, h: 14 },
            { x: 300, y: 320, w: 120, h: 14 },
            { x: 480, y: 380, w: 110, h: 14 },
            { x: 680, y: 340, w: 120, h: 14 },
            { x: 540, y: 270, w: 110, h: 14 },
            { x: 720, y: 220, w:  100, h: 14 },
            { x: 180, y: 240, w:  110, h: 14 },
            { x: 360, y: 170, w:  110, h: 14 },
            { x: 553, y: 130, w:  150, h: 14 },
        ],
        fragments: [
            { x: 320, y: 280, color: '#C71287' },
            { x: 700, y: 300, color: '#C71287' },
            { x: 720, y: 180, color: '#C71287' },
            { x: 380, y: 130, color: '#C71287' },
            { x: 553, y: 90, color: '#C71287' },
        ],
        enemies: [
            { x: 300, y: 280, patrol: 38 },
            { x: 480, y: 370, patrol: 40 },
            { x: 540, y: 260, patrol: 32 },
            { x: 180, y: 230, patrol: 25 },
            { x: 553, y: 120, patrol: 50 },
        ],
        tar: [
            { x: 178, y: 432 },
            { x: 378, y: 432 },
            { x: 558, y: 432 },
            { x: 738, y: 432 },
        ],
        fragmentQuotes: [
            'Pink is strength dressed in softness.',
            'Compassion begins with yourself.',
            'You would never speak to a friend the way you speak to yourself.',
            'Playfulness is not childishness, it is aliveness.',
            'You are allowed to bloom loudly.',
        ],
        completeQuote: 'Magenta doesn\'t apologize for being bright. Magenta represents compassion, self-love, and softness. It asks you to be as gentle with yourself as you are with the people you love the most.',
    },

    // ── LEVEL 9: BROWN ────────────────────────────────────────────────────────
    {
        id: 9,
        name: 'What holds you',
        color: '#753F16',
        bg: '/backgrounds/level9.png',
        bgComplete: '/backgrounds/level9_complete.png',
        playerImg: '/assets/player_level9.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            //{ x: 135, y: 382, w: 128, h: 14 },
            { x: 315, y: 365, w: 120, h: 14 },
            { x: 496, y: 388, w: 110, h: 14 },
            { x: 660, y: 358, w: 120, h: 14 },
            { x: 180, y: 300, w: 100, h: 14 },
            { x: 400, y: 312, w:  100, h: 14 },
            { x: 660, y: 200, w: 110, h: 14 },
            { x: 550, y: 130, w:  100, h: 14 },
            { x: 290, y: 230, w:  100, h: 14 },
            { x: 420, y: 190, w:  100, h: 14 },
        ],
        fragments: [
            { x: 160, y: 260, color: '#753F16' },
            { x: 310, y: 190, color: '#753F16' },
            { x: 620, y: 320, color: '#753F16' },
            { x: 425, y: 153, color: '#753F16' },
            { x: 660, y: 160, color: '#753F16' },
        ],
        enemies: [
            { x: 315, y: 340, patrol: 35 },
            { x: 660, y: 333, patrol: 40 },
            { x: 400, y: 287, patrol: 28 },
            { x: 492, y: 360, patrol: 28 },
            { x: 550, y: 110, patrol: 28 },
        ],
        tar: [
            //{ x: 152, y: 432 },
            { x: 348, y: 432 },
            { x: 540, y: 432 },
            { x: 712, y: 432 },
        ],
        fragmentQuotes: [
            'Some things stay so that other things can move.',
            'Stability is essential.',
            'The earth holds everything without complaint.',
            'Steadiness is a kind of strength.',
            'Your roots are not holding you back.',
        ],
        completeQuote: 'Brown is groundedness and stability. It is the earth beneath everything, often overlooked but everything grows from it. It does not need to be seen to do its work.',
    },

    // ── LEVEL 10: THE COLOR REALM — final ─────────────────────────────────────
    {
        id: 10,
        name: 'The Whole of You',
        color: '#FFD700',
        bg: '/backgrounds/level10.png',
        bgComplete: '/backgrounds/level10_complete.png',
        playerImg: '/assets/player_level10.png',
        spawnX: 60,
        spawnY: 400,
        platforms: [
            { x: 400, y: 440, w: 800, h: 12 },
            { x: 120, y: 380, w: 140, h: 14 },
            { x: 310, y: 362, w: 120, h: 14 },
            { x: 510, y: 382, w: 120, h: 14 },
            { x: 700, y: 365, w: 130, h: 14 },
            { x: 210, y: 305, w: 120, h: 14 },
            { x: 420, y: 298, w: 110, h: 14 },
            { x: 628, y: 288, w: 120, h: 14 },
            { x: 115, y: 248, w: 100, h: 14 },
            { x: 315, y: 238, w:  100, h: 14 },
            { x: 515, y: 228, w:  100, h: 14 },
            { x: 715, y: 215, w:  100, h: 14 },
            { x: 215, y: 178, w:  100, h: 14 },
            { x: 615, y: 160, w:  100, h: 14 },
            { x: 415, y: 128, w:  100, h: 14 },
        ],
        fragments: [
            { x: 310, y: 330, color: '#970505' },
            { x: 700, y: 333, color: '#CF8917' },
            { x: 210, y: 273, color: '#E3D214' },
            { x: 628, y: 256, color: '#39BD1C' },
            { x: 335, y: 206, color: '#12B6C8' },
            { x: 715, y: 183, color: '#170CB7' },
            { x: 215, y: 146, color: '#6613BA' },
            { x: 630, y: 128, color: '#C71287' },
            { x: 415, y:  96, color: '#753F16' },
        ],
        enemies: [
            { x: 120, y: 355, patrol: 45 },
            { x: 510, y: 357, patrol: 40 },
            { x: 420, y: 273, patrol: 35 },
            { x: 628, y: 263, patrol: 42 },
            { x: 515, y: 203, patrol: 30 },
            { x: 110, y: 220, patrol: 30 },
            { x: 315, y: 200, patrol: 30 },
            { x: 615, y: 120, patrol: 30 },

        ],
        tar: [
            { x: 225, y: 432 },
            { x: 390, y: 432 },
            { x: 540, y: 432 },
            { x: 665, y: 432 },
            { x: 760, y: 432 },
        ],
        fragmentQuotes: [
            'you burned',
            'you created',
            'you hoped and worried',
            'you grew',
            'you let go',
            'you felt deeply',
            'you wondered',
            'you loved',
            'you stayed',
        ],
        completeQuote: 'Every emotion is a part of you. You needed all of it. The rage and the tenderness. The confusion and the clarity. The grief and the joy. A world with only one color is not a world at all. Neither are you. You are the whole spectrum. The full Hue.',
    },
];

export function getLevel(id) {
    return LEVELS.find(level => level.id === id);
}
