*{
    box-sizing:border-box;
}

body{
    margin:0;
    padding:0;
    background:#09090b;
    color:white;
    font-family:Arial,sans-serif;
    overflow-x:hidden;
}

a{
    text-decoration:none;
}

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-thumb{
    background:#8b5cf6;
    border-radius:20px;
}

/* NAVBAR */

.navbar{
    position:sticky;
    top:0;
    z-index:999;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:18px 6%;
    background:rgba(10,10,10,0.78);
    backdrop-filter:blur(18px);
    border-bottom:1px solid rgba(255,255,255,0.06);
}

.logo{
    font-size:34px;
    font-weight:800;
    color:#8b5cf6;
    white-space:nowrap;
}

.search-box{
    display:flex;
    align-items:center;
    gap:10px;
}

.search-box input{
    width:280px;
    height:50px;
    border:none;
    border-radius:16px;
    background:#131316;
    padding:0 18px;
    color:white;
    outline:none;
    border:1px solid rgba(255,255,255,0.06);
    transition:.3s;
}

.search-box input:focus{
    border-color:#8b5cf6;
    box-shadow:0 0 25px rgba(139,92,246,.2);
}

.nav-search-btn{
    width:50px;
    height:50px;
    border:none;
    border-radius:16px;
    background:#8b5cf6;
    color:white;
    cursor:pointer;
    transition:.3s;
}

/* HERO */

.hero{
    width:90%;
    max-width:980px;
    margin:60px auto;
    padding-top:20px;
    text-align:center;
}

.hero h1{
    font-size:64px;
    line-height:1.08;
    margin:0 0 16px;
    background:linear-gradient(to right,#fff,#8b5cf6);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.hero p{
    color:#a1a1aa;
    font-size:20px;
    margin-bottom:34px;
}

/* HERO STATS */

.hero-stats{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:35px;
}

.hero-stat{
    background:#121216;
    border:1px solid rgba(255,255,255,0.06);
    padding:12px 18px;
    border-radius:40px;
    color:#bbb;
    font-size:14px;
}

/* CATEGORIES */

.categories{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:14px;
    margin-bottom:32px;
}

.cat-btn{
    padding:14px 26px;
    border:none;
    border-radius:18px;
    background:#18181b;
    color:white;
    cursor:pointer;
    transition:.3s;
}

.cat-btn:hover,
.active-cat{
    background:#8b5cf6;
    box-shadow:0 0 24px rgba(139,92,246,.35);
}

/* GENERATE AREA */

.search-area{
    display:flex;
    align-items:stretch;
    gap:16px;
    width:100%;
}

.search-area input,
.search-area textarea{
    flex:1;
    height:72px;
    border:none;
    border-radius:28px;
    background:#131316;
    color:white;
    padding:0 26px;
    font-size:18px;
    outline:none;
    border:1px solid rgba(255,255,255,.06);
}

.generate-btn{
    height:72px;
    padding:0 34px;
    border:none;
    border-radius:24px;
    background:linear-gradient(135deg,#7c3aed,#8b5cf6);
    color:white;
    font-size:18px;
    font-weight:700;
    cursor:pointer;
    transition:.3s;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin:8px;
    box-shadow:0 10px 30px rgba(124,58,237,.30);
}

.search-area .generate-btn{
    width:220px;
    margin:0;
}

.generate-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 36px rgba(124,58,237,.45);
}

/* SHORTCUTS */

.prompt-shortcuts{
    max-width:1100px;
    margin:24px auto 0;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
}

.shortcut-btn{
    background:#18181b;
    border:1px solid rgba(255,255,255,.06);
    color:white;
    padding:11px 17px;
    border-radius:40px;
    cursor:pointer;
    transition:.3s;
}

.shortcut-btn:hover{
    background:#8b5cf6;
    transform:translateY(-2px);
}

/* LOADING */

#loading{
    display:none;
    margin-top:45px;
}

.loader{
    width:64px;
    height:64px;
    border-radius:50%;
    border:6px solid rgba(255,255,255,.08);
    border-top:6px solid #8b5cf6;
    animation:spin 1s linear infinite;
    margin:auto;
}

@keyframes spin{
    100%{
        transform:rotate(360deg);
    }
}

#loading p{
    color:#999;
}

/* RESULT / IMAGE PAGE */

#result{
    margin-top:45px;
}

.preview-card{
    background:#121216;
    border:1px solid rgba(255,255,255,.06);
    border-radius:28px;
    padding:22px;
    max-width:850px;
    margin:0 auto;
}

.preview-image{
    width:100%;
    border-radius:22px;
    display:block;
}

.image-page{
    max-width:900px;
}

.prompt-box{
    margin-top:25px;
    background:#121216;
    border:1px solid rgba(255,255,255,.06);
    padding:20px;
    border-radius:22px;
    font-size:17px;
    line-height:1.6;
    color:#ddd;
    text-align:left;
    word-break:break-word;
}

.image-stats{
    margin-top:20px;
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:14px;
}

.stat-item{
    background:#121216;
    border:1px solid rgba(255,255,255,.06);
    padding:12px 18px;
    border-radius:16px;
    color:#aaa;
    font-size:14px;
}

.image-actions{
    margin-top:28px;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:12px;
}

.image-actions .generate-btn{
    min-width:190px;
}

/* SECTIONS */

.section{
    width:90%;
    max-width:1450px;
    margin:90px auto;
}

.section h2{
    font-size:40px;
    margin-bottom:28px;
}

/* QUICK TOOLS / STEPS */

.tools-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
}

.steps-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px;
}

.tool-card,
.step-card{
    background:#121216;
    border:1px solid rgba(255,255,255,.06);
    border-radius:26px;
    padding:32px 22px;
    text-align:center;
    transition:.3s;
}

.tool-card:hover,
.step-card:hover{
    transform:translateY(-5px);
    border-color:#8b5cf6;
}

.tool-icon{
    font-size:44px;
    margin-bottom:15px;
}

.step-number{
    width:60px;
    height:60px;
    border-radius:50%;
    background:#8b5cf6;
    display:flex;
    justify-content:center;
    align-items:center;
    margin:0 auto 18px;
    font-size:24px;
    font-weight:bold;
}

.tool-card h3,
.step-card h3{
    font-size:22px;
    margin:10px 0;
}

.tool-card p,
.step-card p{
    color:#999;
    line-height:1.6;
}

/* IMAGE GRID */

.image-grid{
    column-count:4;
    column-gap:20px;
}

.image-grid img{
    width:100%;
    margin-bottom:20px;
    border-radius:22px;
    break-inside:avoid;
    transition:.3s;
    cursor:pointer;
}

.image-grid img:hover{
    transform:translateY(-4px) scale(1.02);
    box-shadow:0 0 35px rgba(139,92,246,.35);
}

/* ADS */

#adPopup,
#downloadAdPopup{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;
    background:rgba(0,0,0,.82);
    backdrop-filter:blur(12px);
    z-index:99999;
    padding:20px;
}

.ad-box{
    width:100%;
    max-width:500px;
    background:#121216;
    border:1px solid rgba(255,255,255,.08);
    border-radius:28px;
    padding:34px;
    text-align:center;
}

.ad-placeholder{
    height:220px;
    border-radius:22px;
    overflow:hidden;
    margin:24px 0;
}

.fake-ad{
    height:100%;
    background:linear-gradient(135deg,#7c3aed,#8b5cf6);
    border-radius:22px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    position:relative;
    padding:20px;
}

.ad-tag{
    position:absolute;
    top:14px;
    left:14px;
    background:white;
    color:black;
    padding:6px 12px;
    border-radius:30px;
    font-size:12px;
    font-weight:bold;
}

.fake-ad h3{
    font-size:28px;
    margin:8px 0;
}

.fake-ad p{
    color:rgba(255,255,255,.85);
}

.fake-ad-btn{
    padding:12px 24px;
    border:none;
    border-radius:14px;
    background:white;
    color:#7c3aed;
    font-weight:bold;
}

.countdown{
    font-size:22px;
    color:#8b5cf6;
    font-weight:bold;
}

/* FOOTER */

.footer{
    margin-top:80px;
    padding:60px 20px;
    text-align:center;
    color:#777;
    border-top:1px solid rgba(255,255,255,.05);
}

/* TABLET */

@media(max-width:1100px){

    .hero h1{
        font-size:52px;
    }

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

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

    .image-grid{
        column-count:3;
    }

}

/* MOBILE */

@media(max-width:768px){

    body{
        background:#08080b;
    }

    .navbar{
        flex-direction:column;
        padding:14px;
        gap:14px;
    }

    .logo{
        font-size:30px;
    }

    .search-box{
        width:100%;
    }

    .search-box input{
        width:100%;
        height:56px;
        border-radius:18px;
        font-size:16px;
    }

    .nav-search-btn{
        width:56px;
        height:56px;
        border-radius:18px;
    }

    .hero{
        width:92%;
        margin:30px auto 50px;
        padding-top:0;
    }

    .hero h1{
        font-size:40px;
        line-height:1.12;
        margin-bottom:14px;
    }

    .hero p{
        font-size:16px;
        margin-bottom:24px;
    }

    .hero-stats{
        gap:10px;
        margin-bottom:26px;
    }

    .hero-stat{
        font-size:13px;
        padding:10px 14px;
    }

    .categories{
        display:grid;
        grid-template-columns:repeat(3,1fr);
        gap:10px;
        margin-bottom:24px;
    }

    .cat-btn{
        width:100%;
        min-width:0;
        padding:15px 10px;
        font-size:14px;
        border-radius:18px;
    }

    .search-area{
        flex-direction:column;
        gap:16px;
    }

    .search-area input,
    .search-area textarea{
    min-height:82px;
    padding-top:24px;
    resize:none;
        width:100%;
        height:82px;
        border-radius:30px;
        font-size:20px;
        padding:0 28px;
        background:#15151a;
    }

    .search-area .generate-btn{
        width:100%;
        height:82px;
        border-radius:30px;
        font-size:24px;
        margin:0;
    }

    .prompt-shortcuts{
        justify-content:flex-start;
        flex-wrap:nowrap;
        overflow-x:auto;
        padding-bottom:8px;
        margin-top:22px;
        gap:10px;
    }

    .shortcut-btn{
        white-space:nowrap;
        font-size:13px;
        padding:11px 16px;
    }

    .section{
        width:92%;
        margin:55px auto;
    }

    .section h2{
        font-size:32px;
        margin-bottom:22px;
    }

    .tools-grid,
    .steps-grid{
        grid-template-columns:1fr;
        gap:18px;
    }

    .tool-card,
    .step-card{
        padding:24px 18px;
        border-radius:22px;
    }

    .image-grid{
        column-count:2;
        column-gap:12px;
    }

    .image-grid img{
        border-radius:18px;
        margin-bottom:12px;
    }

    .preview-card{
        padding:14px;
        border-radius:22px;
    }

    .preview-image{
        border-radius:18px;
    }

    .image-actions{
        flex-direction:column;
    }

    .image-actions a,
    .image-actions .generate-btn{
        width:100%;
    }

    .prompt-box{
        font-size:15px;
        padding:16px;
    }

    .ad-box{
        padding:24px;
    }

}

/* SMALL MOBILE */

@media(max-width:480px){

    .hero h1{
        font-size:34px;
    }

    .image-grid{
        column-count:1;
    }

}