@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
    background:linear-gradient(
        -45deg,
        #0f172a,
        #1e1b4b,
        #312e81,
        #111827
    );
    background-size:400% 400%;
    animation:gradientMove 15s ease infinite;
}

@keyframes gradientMove{
    0%{background-position:0% 50%;}
    50%{background-position:100% 50%;}
    100%{background-position:0% 50%;}
}

.blob{
    position:absolute;
    border-radius:50%;
    filter:blur(100px);
    opacity:.5;
    animation:float 10s ease-in-out infinite;
}

.blob1{
    width:300px;
    height:300px;
    background:#8b5cf6;
    top:-100px;
    left:-100px;
}

.blob2{
    width:280px;
    height:280px;
    background:#06b6d4;
    bottom:-100px;
    right:-50px;
}

.blob3{
    width:250px;
    height:250px;
    background:#ec4899;
    top:40%;
    left:60%;
}

@keyframes float{
    0%,100%{
        transform:translateY(0);
    }
    50%{
        transform:translateY(-40px);
    }
}

.wrapper{
    position:relative;
    z-index:10;
    display:flex;
    gap:25px;
    flex-wrap:wrap;
    justify-content:center;
}

.calculator{
    width:380px;
    backdrop-filter:blur(20px);
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.15);
    border-radius:30px;
    padding:25px;
    box-shadow:
    0 8px 32px rgba(0,0,0,.4),
    inset 0 1px 1px rgba(255,255,255,.1);
}

.header{
    display:flex;
    justify-content:space-between;
    color:white;
    margin-bottom:15px;
}

.logo{
    font-size:1.2rem;
    font-weight:600;
}

.clock{
    font-size:.9rem;
    opacity:.8;
}

.display{
    margin-bottom:20px;
}

#display{
    width:100%;
    height:90px;
    border:none;
    outline:none;
    border-radius:20px;
    background:rgba(255,255,255,.05);
    color:white;
    text-align:right;
    padding:20px;
    font-size:2.2rem;
}

.buttons{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
}

button{
    height:70px;
    border:none;
    border-radius:18px;
    background:rgba(255,255,255,.08);
    color:white;
    font-size:1.2rem;
    cursor:pointer;
    transition:.3s;
}

button:hover{
    transform:translateY(-4px);
    background:rgba(255,255,255,.15);
}

button:active{
    transform:scale(.95);
}

.operator{
    background:linear-gradient(
    135deg,
    #f97316,
    #fb923c);
}

.equal{
    background:linear-gradient(
    135deg,
    #22c55e,
    #16a34a);
    grid-column:span 2;
}

.history{
    width:280px;
    backdrop-filter:blur(20px);
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.15);
    border-radius:30px;
    padding:20px;
    color:white;
}

.history h3{
    text-align:center;
    margin-bottom:15px;
}

#historyList{
    list-style:none;
    max-height:400px;
    overflow:auto;
}

#historyList li{
    margin-bottom:10px;
    padding:10px;
    background:rgba(255,255,255,.06);
    border-radius:12px;
}

@media(max-width:768px){

    .wrapper{
        flex-direction:column;
        align-items:center;
    }

    .calculator{
        width:95%;
        max-width:380px;
    }

    .history{
        width:95%;
        max-width:380px;
    }
}