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

body{
    min-height:100vh;
    background: radial-gradient(circle at top,#0f2027,#000);
    display:flex;
    justify-content:center;
    align-items:center;
    color:#fff;
}

.grid{
    width:100%;
    padding:20px;
    display:grid;
    place-items:center;
}

.card{
    width:100%;
    max-width:420px;
    background: linear-gradient(145deg,
        rgba(255,255,255,0.08),
        rgba(255,255,255,0.02));
    backdrop-filter: blur(14px);
    border-radius:20px;
    padding:30px;
    box-shadow:
        0 0 30px rgba(0,255,255,0.15),
        inset 0 0 20px rgba(255,255,255,0.05);
    transition:transform .4s;
}

.card:hover{
    transform:translateY(-6px);
}

.card h2{
    text-align:center;
    margin-bottom:6px;
    letter-spacing:1px;
}

.card p{
    text-align:center;
    font-size:0.9rem;
    opacity:0.7;
}

.card input{
    width:100%;
    height:48px;
    margin:22px 0;
    padding:0 14px;
    border-radius:10px;
    background:#000;
    color:#0ff;
    border:1px solid rgba(0,255,255,0.4);
    outline:none;
}

.card input::placeholder{
    color:#0ff;
    opacity:.4;
}

#imgBox{
    max-height:0;
    overflow:hidden;
    transition:max-height .5s ease;
    display:flex;
    justify-content:center;
}

#imgBox.show-img{
    max-height:280px;
    margin-bottom:20px;
}

#imgBox img{
    width:180px;
    background:#fff;
    padding:12px;
    border-radius:14px;
    box-shadow:0 0 25px rgba(0,255,255,0.5);
}

.actions{
    display:flex;
    gap:12px;
}

button{
    height:48px;
    border:none;
    border-radius:12px;
    cursor:pointer;
    font-size:15px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    transition:.3s;
}

.generate{
    flex:1;
    background:linear-gradient(135deg,#00f5ff,#00ffa2);
    color:#000;
}

.generate:hover{
    box-shadow:0 0 20px rgba(0,255,255,.8);
}

.download{
    width:54px;
    background:#000;
    border:1px solid rgba(0,255,255,.5);
    color:#0ff;
}

.download:hover{
    background:#0ff;
    color:#000;
}

button:disabled{
    opacity:.4;
    cursor:not-allowed;
}

.error{
    animation:shake .1s linear 10;
}

@keyframes shake{
    0%{transform:translateX(0)}
    25%{transform:translateX(-3px)}
    50%{transform:translateX(0)}
    75%{transform:translateX(3px)}
    100%{transform:translateX(0)}
}

/* Responsive */
@media(max-width:480px){
    .card{padding:22px}
    #imgBox img{width:150px}
}
