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

body{
    background:#0f1115;
    color:#fff;
}

.container{
    width:95%;
    max-width:1300px;
    margin:auto;
    padding:20px;
}

header{
    text-align:center;
    margin-bottom:25px;
}

header h1{
    font-size:32px;
    color:#00c8ff;
}

header p{
    color:#aaa;
    margin-top:8px;
}

.search-bar{
    display:flex;
    gap:10px;
    margin-bottom:25px;
}

.search-bar input{
    flex:1;
    padding:14px;
    border:none;
    outline:none;
    border-radius:10px;
    background:#1d2027;
    color:#fff;
    font-size:16px;
}

.search-bar button{
    padding:14px 28px;
    border:none;
    border-radius:10px;
    background:#00c8ff;
    color:#000;
    cursor:pointer;
    font-weight:bold;
}

.search-bar button:hover{
    opacity:.9;
}

.results-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:20px;
    margin-bottom:25px;
}

.card{
    background:#1b1e25;
    border-radius:12px;
    overflow:hidden;
    cursor:pointer;
    transition:.2s;
}

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

.card img{
    width:100%;
    display:block;
}

.card-body{
    padding:10px;
}

.card-title{
    font-size:15px;
    font-weight:bold;
}

.card-sub{
    color:#aaa;
    font-size:13px;
    margin-top:4px;
}

.option{
    margin:15px 0;
}

.option label{
    display:block;
    margin-bottom:6px;
}

.option select,
.option input{
    width:100%;
    padding:12px;
    background:#1d2027;
    color:#fff;
    border:none;
    border-radius:10px;
}

.hidden{
    display:none;
}

.preview{
    margin:25px 0;
    text-align:center;
}

#canvas{
    width:100%;
    max-width:1000px;
    aspect-ratio:16/9;
    background:#000;
    border:2px solid #2d323c;
    border-radius:12px;
}

.buttons{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:12px;
    margin:20px 0;
}

.buttons button{
    padding:14px 22px;
    border:none;
    border-radius:10px;
    background:#00c8ff;
    color:#000;
    font-weight:bold;
    cursor:pointer;
    transition:.2s;
}

.buttons button:hover{
    transform:translateY(-2px);
    opacity:.9;
}

h2{
    margin:20px 0 10px;
}

#caption{
    width:100%;
    min-height:220px;
    background:#1d2027;
    color:#fff;
    border:none;
    border-radius:10px;
    padding:15px;
    resize:vertical;
    font-size:14px;
    line-height:1.5;
}

#status{
    margin-top:20px;
    text-align:center;
    font-weight:bold;
    color:#00c8ff;
}

.loading{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.75);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.spinner{
    width:60px;
    height:60px;
    border:6px solid #333;
    border-top:6px solid #00c8ff;
    border-radius:50%;
    animation:spin 1s linear infinite;
}

.loading p{
    margin-top:15px;
    font-size:18px;
}

@keyframes spin{
    from{
        transform:rotate(0deg);
    }
    to{
        transform:rotate(360deg);
    }
}

@media (max-width:768px){

    header h1{
        font-size:26px;
    }

    .search-bar{
        flex-direction:column;
    }

    .search-bar button{
        width:100%;
    }

    .buttons{
        flex-direction:column;
    }

    .buttons button{
        width:100%;
    }

    .results-grid{
        grid-template-columns:repeat(2,1fr);
    }

}

@media (max-width:480px){

    .results-grid{
        grid-template-columns:1fr;
    }

    #caption{
        min-height:180px;
    }

}

