<script>
    import {push} from 'svelte-spa-router';
    import {unlockedColors} from '../stores/colorStore.js';

    function startGame() {
        push('/levelselect');
    }
</script>

<div class="title-screen">
    <!--<img src="/backgrounds/title_bg.png" class="bg" alt="title background"/>-->

    <div class="content">
        <h1>The Full Hue</h1>
        <p>Bring back your color</p>
        <button on:click={startGame}>begin</button>
    </div>
</div>

<style>
    .title-screen{
        width: 800px;
        height: 450;
        margin: 0 auto;
        position: relative;
        overflow: hidden;
        background: #111;
        height: 450px;
    }
    .bg{
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.85;   
    }
    .content{
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        color: white;
    }
    h1{
        font-family:'Courier New', Courier, monospace;
        font-size: 64px;
        font-weight: 400;
        text-shadow: 0 2px 12px rgba(0,0,0,0.7);
        margin: 0;
    }
    p{
        font-family:'Courier New', Courier, monospace;
        font-size: 22px;
        opacity: 0.8;
        margin: 0;
    }
    button{
        margin-top: 20px;
        padding: 12px 40px;
        font-family:'Courier New', Courier, monospace;
        font-size: 22px;
        background: rgba(255,255,255,0.15);
        color: white;
        border: 1px solid rgba(255,255,255,0.4);
        border-radius: 30px;
        cursor: pointer; 
        transition: background 0.2s;
    }
    button:hover{background: rgba(255,255,255,0.3);}
</style>