*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;}

    body{
    margin:0;
    padding:0;
    min-height:100vh;

    background:linear-gradient(
        135deg,
        #ffffff,
        #f8fbff,
        #eef7ff,
        #dbeafe,
        #bfdbfe,
        #93c5fd,
        #60a5fa
    );

    background-size:350% 350%;
    animation:gradientBG 18s ease infinite;
}

@keyframes gradientBG{
    0%{
        background-position:0% 50%;
    }
    25%{
        background-position:50% 100%;
    }
    50%{
        background-position:100% 50%;
    }
    75%{
        background-position:50% 0%;
    }
    100%{
        background-position:0% 50%;
    }
}

/* ===========================
   HEADER
=========================== */

header{
    text-align:center;
    padding:40px 20px;
}

header h1{
    front-size:48px;
    font-weight:700;
    margin-bottom:10px
}
    

/* ===========================
   MAIN CONTAINER
=========================== */

.container{
    width:90%;
    max-width:1300px;
    margin:auto;
    padding-bottom:40px;
}
/* ===========================
   SEARCH SECTION
=========================== */

.search-box{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    justify-content:center;
    align-items:center;

    background:rgba(255,255,255,0.12);
    backdrop-filter:blur(15px);

    padding:20px;
    border-radius:20px;
    margin-top:20px;
}
.search-box button{
    padding:14px 20px;
    border:none;
    border-radius:15px;
    cursor:pointer;

    font-size:15px;
    font-weight:600;
    color:#7a3b5d;

    background:linear-gradient(
        135deg,
        #fff5f8,
        #ffeaf1,
        #ffdce8,
        #ffd1e2,
        #ffc6dc
    );

    background-size:300% 300%;
    animation:pinkGradient 8s ease infinite;

    box-shadow:
        0 6px 15px rgba(255,192,203,0.35),
        0 0 12px rgba(255,182,193,0.25);

    transition:all 0.3s ease;
}

/* ===========================
   SEARCH INPUT
=========================== */

.search-box input{

    flex:1;
    min-width:300px;

    padding:15px;

    border:none;
    outline:none;

    border-radius:12px;

    font-size:16px;

    background:linear-gradient(to right, white, #60a5fa);
    color:#111827;
}

/* ===========================
   BUTTONS
=========================== */

.search-box button:hover{
    transform:translateY(-3px) scale(1.04);

    background:linear-gradient(
        135deg,
        #fff8fa,
        #ffeef5,
        #ffe2ec,
        #ffd7e6,
        #ffcddd
    );

    box-shadow:
        0 10px 25px rgba(255,182,193,0.45),
        0 0 20px rgba(255,192,203,0.4);
}

/* ===========================
   LANGUAGE SELECT
=========================== */

.options{

    margin-top:25px;

    display:flex;

    justify-content:center;

}

#language{

    width:250px;

    padding:12px;

    border:none;

    border-radius:12px;

    font-size:16px;

    background:white;

    color:#111827;

    cursor:pointer;

}
/* ===========================
   FEATURE CARDS
=========================== */

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-top:30px;
}

.card,
#answer,
.imageBox,
.modelBox,
.animationBox,
.downloadSection{
    background:rgba(255,255,255,0.18);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);

    border:1px solid rgba(255,255,255,.3);

    box-shadow:
        0 8px 32px rgba(0,0,0,.18);

    border-radius:22px;
}

.card:hover{
    transform:translateY(-10px) scale(1.04);

    box-shadow:
        0 0 25px #ff8fc7,
        0 0 45px #ff69b4,
        0 0 70px rgba(255,105,180,.5);

    transition:.4s;
}

.card h3{
    margin:15px 0 10px;
    font-size:22px;
    color:#ffffff;
}

.card p{
    font-size:15px;
    color:#dbeafe;
}

/* ===========================
   CARD ICONS
=========================== */

.card{
    background:rgba(255,255,255,0.12);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,0.25);
    border-radius:20px;
    padding:25px;
    color:white;
    transition:0.4s;
}

.card:hover{
    transform:translateY(-10px) scale(1.03);
    box-shadow:0 0 30px rgba(59,130,246,.5);
    background:rgba(255,255,255,0.18);
}

/* ===========================
   SMOOTH ANIMATION
=========================== */

.card{

animation:floatCard 4s ease-in-out infinite;

}

@keyframes pinkGradient{
    0%{
        background-position:0% 50%;
    }
    50%{
        background-position:100% 50%;
    }
    100%{
        background-position:0% 50%;
    }
}
/* ===========================
   AI ANSWER
=========================== */

#answer{
    margin-top:30px;
    background:rgba(255,255,255,0.12);
    backdrop-filter:blur(12px);
    border-radius:20px;
    padding:25px;
    color:white;
    border:1px solid rgba(255,255,255,0.15);
    box-shadow:0 10px 30px rgba(0,0,0,0.2);
}

#answer h2{
    margin-bottom:15px;
    color:#ffffff;
    font-size:28px;
}

#response{
    line-height:1.8;
    font-size:16px;
    color:#e5e7eb;
}

#response ul{
    margin-top:10px;
    margin-left:20px;
}

#response li{
    margin-bottom:8px;
}

/* ===========================
   IMAGE BOX
=========================== */

.imageBox{
    margin-top:30px;
    background:rgba(255,255,255,0.12);
    backdrop-filter:blur(12px);
    border-radius:20px;
    padding:20px;
    border:1px solid rgba(255,255,255,0.15);
}

.imageBox h2{
    margin-bottom:15px;
    color:#ffffff;
}

#topicImage{
    width:100%;
    max-height:500px;
    object-fit:cover;
    border-radius:15px;
    border:2px solid rgba(255,255,255,0.2);
}

/* ===========================
   3D MODEL
=========================== */

.modelBox{
    margin-top:30px;
    background:rgba(255,255,255,0.12);
    backdrop-filter:blur(12px);
    border-radius:20px;
    padding:20px;
    border:1px solid rgba(255,255,255,0.15);
}

.modelBox h2{
    margin-bottom:15px;
    color:#ffffff;
}

model-viewer{
    width:100%;
    height:500px;
    border-radius:15px;
    background:#ffffff;
}

/* ===========================
   ANIMATION
=========================== */

.animationBox{
    margin-top:30px;
    background:rgba(255,255,255,0.12);
    backdrop-filter:blur(12px);
    border-radius:20px;
    padding:20px;
    border:1px solid rgba(255,255,255,0.15);
}

.animationBox h2{
    margin-bottom:15px;
    color:#ffffff;
}

#animation{
    width:100%;
    border-radius:15px;
}
/* ===========================
   DOWNLOAD SECTION
=========================== */

.downloadSection{
    margin-top:30px;
    padding:25px;
    background:rgba(255,255,255,0.12);
    backdrop-filter:blur(15px);
    border-radius:20px;
    border:1px solid rgba(255,255,255,.2);
    text-align:center;
}

.downloadSection h2{
    margin-bottom:20px;
    color:#ffffff;
}

.downloadSection button{
    margin:8px;
    padding:12px 22px;
    border:none;
    border-radius:14px;
    cursor:pointer;

    color:white;
    font-size:15px;
    font-weight:600;

    background:linear-gradient(
        135deg,
        #ffd6e8,
        #ffc2dc,
        #ffb3d9,
        #ff9ecf,
        #ffb6d5
    );

    background-size:300% 300%;
    animation:pinkGradient 6s ease infinite;

    box-shadow:0 6px 20px rgba(255,182,213,0.5);
}

/* ===========================
   FOOTER
=========================== */

footer{
    text-align:center;
    padding:30px 20px;
    color:#dbeafe;
    font-size:15px;
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */

header h1{

font-size:60px;
font-weight:700;

background:linear-gradient(
90deg,
#2563eb,
#7c3aed,
#ff69b4,
#2563eb,
#7c3aed);

background-size:400%;

-webkit-background-clip:text;
-webkit-text-fill-color:transparent;

animation:titleMove 8s linear infinite;

}

@keyframes titleMove{

0%{
background-position:0%;
}

100%{
background-position:400%;
}

}
@media (max-width:768px){

    header p{
        font-size:16px;
    }

    .container{
        width:95%;
    }

    .search-box{

display:flex;
flex-wrap:wrap;
gap:15px;

padding:25px;

background:rgba(255,255,255,.18);

backdrop-filter:blur(25px);

border-radius:25px;

border:1px solid rgba(255,255,255,.3);

box-shadow:

0 8px 30px rgba(0,0,0,.2);

}

    .search-box input{
        min-width:100%;
    }

    .search-box button:active,
.downloadSection button:active{

transform:scale(.9);

}

    .card{

position:relative;
overflow:hidden;

}

.card::before{

content:"";

position:absolute;

top:-100%;

left:-100%;

width:300%;

height:300%;

background:

linear-gradient(

45deg,

transparent,

rgba(255,255,255,.25),

transparent);

animation:shine 5s infinite;

}

    model-viewer{
        height:300px;
    }

    #topicImage{
        max-height:300px;
    }

}

@media (max-width:768px){

    header h1{
    font-size:48px;
}

    #answer,
    .imageBox,
    .modelBox,
    .animationBox,
    .downloadSection{
        padding:15px;
    }

    footer{
        font-size:13px;
    }

}

/* ===========================
   GLOBAL FADE ANIMATION
=========================== */

#answer,
.imageBox,
.modelBox,
.animationBox,
.downloadSection{
    animation:fadeUp .7s ease;
}

@keyframes fadeUp{

    from{
        opacity:0;
        transform:translateY(20px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}                                                                                                                                                                                        

/* ===========================
   ANIMATED BACKGROUND
=========================== */

.background{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    overflow:hidden;
    z-index:-1;
}

.background span{
    position:absolute;
    display:block;
    width:180px;
    height:180px;
    border-radius:50%;
    background:rgba(255,255,255,0.08);
    bottom:-200px;
    animation:float 18s linear infinite;
}

.background span:nth-child(1){
    left:5%;
    animation-duration:15s;
}

.background span:nth-child(2){
    left:25%;
    width:250px;
    height:250px;
    animation-duration:20s;
}

.background span:nth-child(3){
    left:50%;
    animation-duration:18s;
}

.background span:nth-child(4){
    left:70%;
    width:220px;
    height:220px;
    animation-duration:22s;
}

.background span:nth-child(5){
    left:90%;
    animation-duration:16s;
}

@keyframes floatCard{

0%{
transform:translateY(0px);
}

50%{
transform:translateY(-8px);
}

100%{
transform:translateY(0px);
}

}
/* ===========================
   CURSOR
=========================== */

input,
textarea{
    cursor: text;
}
/* ===========================
   MOUSE GLOW
=========================== */

body::before{
    content:"";
    position:fixed;
    width:500px;
    height:500px;
    background:radial-gradient(circle,
        rgba(255,255,255,.15),
        transparent 70%);
    pointer-events:none;
    left:var(--x);
    top:var(--y);
    transform:translate(-50%,-50%);
    z-index:-1;
}
/* ===========================
   SHINE EFFECT
=========================== */

.card{
    position:relative;
    overflow:hidden;
}

.card::before{
    content:"";
    position:absolute;
    top:-100%;
    left:-100%;
    width:300%;
    height:300%;

    background:linear-gradient(
        45deg,
        transparent,
        rgba(255,255,255,.25),
        transparent
    );

    animation:shine 5s infinite;
}

@keyframes shine{
    100%{
        transform:translate(50%,50%);
    }
}
/* ===========================
   DARK TEXT
=========================== */

header h1{
    color:#0F172A;
}

header p{
    color:#334155;
}

.card h3{
    color:#0F172A;
}

.card p{
    color:#475569;
}

#answer h2{
    color:#0F172A;
}

#response{
    color:#334155;
}

.imageBox h2,
.modelBox h2,
.animationBox h2,
.downloadSection h2{
    color:#0F172A;
}

footer{
    color:#475569;
}
.ai-loading{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    padding:20px;
}

.loader{
    width:40px;
    height:40px;
    border:4px solid #dbeafe;
    border-top:4px solid #2563eb;
    border-radius:50%;
    animation:spin 1s linear infinite;
}

@keyframes spin{
    100%{
        transform:rotate(360deg);
    }
}

.error-box{
    background:#ffe5e5;
    color:#b91c1c;
    padding:15px;
    border-radius:12px;
    margin-top:15px;
    font-weight:600;
}
/* ===========================
   TOOLBAR (action buttons)
=========================== */

.toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    justify-content:center;
    margin-top:18px;
}

.toolbar button{
    padding:12px 18px;
    border:none;
    border-radius:14px;
    cursor:pointer;

    font-size:14px;
    font-weight:600;
    color:#7a3b5d;

    background:linear-gradient(135deg,#fff5f8,#ffeaf1,#ffdce8,#ffd1e2,#ffc6dc);
    background-size:300% 300%;
    animation:pinkGradient 8s ease infinite;

    box-shadow:0 6px 15px rgba(255,192,203,.35),0 0 12px rgba(255,182,193,.25);
    transition:all .3s ease;
}

.toolbar button:hover{
    transform:translateY(-3px) scale(1.04);
    box-shadow:0 10px 25px rgba(255,182,193,.45),0 0 20px rgba(255,192,203,.4);
}

.toolbar button:active{
    transform:scale(.95);
}

/* Primary Ask AI button */
.primary-btn{
    padding:15px 28px !important;
    font-size:16px !important;
    color:#ffffff !important;
    background:linear-gradient(135deg,#2563eb,#7c3aed) !important;
    animation:none !important;
    box-shadow:0 8px 20px rgba(37,99,235,.4) !important;
}

.primary-btn:hover{
    background:linear-gradient(135deg,#1d4ed8,#6d28d9) !important;
}

/* ===========================
   NOTES AREA
=========================== */

.notes-area{
    width:100%;
    min-height:140px;
    margin-top:20px;
    padding:18px;
    border:1px solid rgba(255,255,255,.4);
    border-radius:18px;
    resize:vertical;
    font-size:15px;
    line-height:1.6;
    color:#0f172a;
    background:rgba(255,255,255,.65);
    backdrop-filter:blur(12px);
    outline:none;
    box-shadow:0 8px 24px rgba(0,0,0,.12);
}

/* ===========================
   HISTORY BOX
=========================== */

.historyBox{
    margin-top:20px;
    padding:22px;
    border-radius:20px;
    background:rgba(255,255,255,.18);
    backdrop-filter:blur(15px);
    border:1px solid rgba(255,255,255,.3);
    box-shadow:0 8px 32px rgba(0,0,0,.15);
}

.historyBox h2{
    margin-bottom:15px;
    color:#0f172a;
}

.history-item{
    padding:10px 0;
    color:#334155;
    font-size:15px;
    line-height:1.6;
}

.history-item hr{
    margin-top:10px;
    border:none;
    border-top:1px solid rgba(0,0,0,.1);
}

/* ===========================
   GENERATED IMAGE
=========================== */

#generatedImage{
    width:100%;
    max-height:500px;
    object-fit:contain;
    border-radius:15px;
    border:2px solid rgba(255,255,255,.3);
    margin-top:10px;
}
