*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Inter",sans-serif;
}

:root{
    --bg:#070b14;
    --card:rgba(18,25,40,.72);
    --border:rgba(255,255,255,.08);
    --text:#ffffff;
    --sub:#a6b1c5;
    --blue:#3b82f6;
    --purple:#7c3aed;
}

html{
    scroll-behavior:smooth;
}

body{
    background:var(--bg);
    color:var(--text);
    min-height:100vh;
    overflow-x:hidden;
    overflow-y:auto;
    padding:40px 20px;
    position:relative;
}

.background{
    position:fixed;
    inset:0;
    overflow:hidden;
    z-index:-2;
}

.blur{
    position:absolute;
    border-radius:50%;
    filter:blur(150px);
    opacity:.45;
}

.blur.one{
    width:500px;
    height:500px;
    background:#2563eb;
    top:-180px;
    left:-150px;
}

.blur.two{
    width:450px;
    height:450px;
    background:#8b5cf6;
    bottom:-180px;
    right:-120px;
}

.container{
    max-width:1250px;
    margin:auto;
    display:grid;
    grid-template-columns:1fr 420px;
    gap:35px;
    align-items:start;
}

.card,
.preview{
    background:var(--card);
    backdrop-filter:blur(30px);
    border:1px solid var(--border);
    border-radius:28px;
    padding:35px;
    box-shadow:0 20px 60px rgba(0,0,0,.35);
}

h1{
    font-size:48px;
    font-weight:800;
    margin-bottom:12px;
}

.subtitle{
    color:var(--sub);
    font-size:18px;
    margin-bottom:30px;
    line-height:1.5;
}

select,
textarea{
    width:100%;
    background:#0e1119;
    color:white;
    border:1px solid rgba(255,255,255,.05);
    border-radius:18px;
    padding:18px;
    font-size:16px;
    outline:none;
    transition:.25s;
    margin-bottom:20px;
}

select:hover,
textarea:hover,
select:focus,
textarea:focus{
    border-color:var(--blue);
    box-shadow:0 0 20px rgba(59,130,246,.2);
}

textarea{
    resize:none;
    min-height:180px;
}

.colors{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    margin-bottom:30px;
}

.colors label{
    display:block;
    margin-bottom:10px;
    color:var(--sub);
    font-weight:600;
}

input[type=color]{
    width:100%;
    height:60px;
    border:none;
    background:none;
    cursor:pointer;
}

button{
    width:100%;
    border:none;
    border-radius:18px;
    padding:18px;
    font-size:17px;
    font-weight:700;
    cursor:pointer;
    transition:.3s;
}

#generate{
    background:linear-gradient(135deg,var(--blue),var(--purple));
    color:white;
}

#generate:hover{
    transform:translateY(-3px);
    box-shadow:0 15px 35px rgba(59,130,246,.35);
}

.preview{
    position:sticky;
    top:25px;
    display:flex;
    flex-direction:column;
    align-items:center;
}
#canvas{
    width:320px;
    height:320px;
    background:#ffffff;
    border-radius:24px;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:18px;
    overflow:hidden;
    box-shadow:
        0 20px 45px rgba(0,0,0,.35),
        inset 0 0 0 1px rgba(255,255,255,.08);
    margin-bottom:28px;
}

#canvas canvas,
#canvas svg{
    max-width:100%;
    max-height:100%;
}

#download{
    background:rgba(255,255,255,.08);
    color:white;
}

#download:hover{
    background:rgba(255,255,255,.14);
    transform:translateY(-2px);
}

button:active{
    transform:scale(.98);
}

@media (max-width:1000px){

    .container{
        grid-template-columns:1fr;
        gap:25px;
    }

    .preview{
        position:static;
        order:-1;
    }

}

@media (max-width:700px){

    body{
        padding:18px;
    }

    .card,
    .preview{
        padding:24px;
        border-radius:24px;
    }

    h1{
        font-size:38px;
    }

    .subtitle{
        font-size:16px;
    }

    .colors{
        grid-template-columns:1fr;
        gap:18px;
    }

    #canvas{
        width:260px;
        height:260px;
    }

    button{
        font-size:16px;
        padding:16px;
    }

}

@media (max-width:420px){

    h1{
        font-size:32px;
    }

    .card,
    .preview{
        padding:20px;
    }

    #canvas{
        width:220px;
        height:220px;
    }

}
