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

body{
    min-height:100vh;
    background:linear-gradient(135deg,#6a11cb,#2575fc);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:40px 20px;
    transition:.5s;
}

.container{
    width:100%;
    max-width:700px;
    background:rgba(255,255,255,.18);
    backdrop-filter:blur(15px);
    -webkit-backdrop-filter:blur(15px);
    border-radius:25px;
    padding:35px;
    box-shadow:0 20px 40px rgba(0,0,0,.25);
    text-align:center;
    animation:fadeIn .8s ease;
}

@keyframes fadeIn{

    from{
        opacity:0;
        transform:translateY(30px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}


h1{
    font-size:2rem;
    color:white;
    margin-bottom:10px;
}

.subtitle{
    color:white;
    opacity:.9;
    margin-bottom:30px;
}

.color-card{
    background:white;
    border-radius:20px;
    padding:25px;
    box-shadow:0 10px 25px rgba(0,0,0,.15);
    transition:.4s;
}

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


.color-box{
    width:100%;
    height:220px;
    background:white;
    border-radius:18px;
    border:3px solid #eee;
    transition:.5s;
}


.color-info{
    margin-top:20px;
}

.color-info h2{
    margin-bottom:10px;
    color:#222;
    word-break:break-word;
}

.color-info h3{
    margin-bottom:10px;
    color:#555;
}

.color-info p{
    color:#777;
    font-weight:500;
}


.buttons{
    margin-top:30px;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:15px;
}

button{

    border:none;
    outline:none;
    cursor:pointer;
    padding:14px 25px;
    border-radius:12px;
    font-size:16px;
    font-weight:600;
    transition:.3s;
}

button:hover{

    transform:translateY(-3px);
}

button:active{

    transform:scale(.95);
}


#generateBtn{
    background:#4CAF50;
    color:white;
}

/* Copy */

#copyBtn{
    background:#2196F3;
    color:white;
}


#favBtn{
    background:#ff4d6d;
    color:white;
}


.theme-btn{

    position:fixed;
    top:20px;
    right:20px;
    width:55px;
    height:55px;
    border-radius:50%;
    background:white;
    font-size:22px;
    box-shadow:0 8px 20px rgba(0,0,0,.2);
    z-index:100;
}


.history-section,
.favorite-section{

    margin-top:35px;
    text-align:left;
}

.history-section h2,
.favorite-section h2{

    color:white;
    margin-bottom:15px;
}

.history-list,
.favorite-list{

    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.color-item{

    width:70px;
    height:70px;
    border-radius:12px;
    cursor:pointer;
    border:3px solid white;
    transition:.3s;
    box-shadow:0 5px 12px rgba(0,0,0,.2);
}

.color-item:hover{

    transform:scale(1.08);
}

.toast{

    position:fixed;
    bottom:30px;
    right:30px;
    background:#333;
    color:white;
    padding:14px 20px;
    border-radius:10px;
    opacity:0;
    pointer-events:none;
    transition:.4s;
}

.toast.show{

    opacity:1;
}

footer{

    margin-top:35px;
    text-align:center;
    color:white;
    opacity:.9;
}

footer p{

    margin:5px;
}


body.dark{

    background:linear-gradient(135deg,#0f172a,#1e293b);
}

body.dark .container{

    background:rgba(0,0,0,.28);
}

body.dark .color-card{

    background:#1e293b;
}

body.dark .color-info h2,
body.dark .color-info h3,
body.dark .color-info p{

    color:white;
}

body.dark .theme-btn{

    background:#222;
    color:white;
}

/* =========================
      RESPONSIVE
========================= */

@media(max-width:768px){

.container{

    padding:25px;
}

.color-box{

    height:180px;
}

.buttons{

    flex-direction:column;
}

button{

    width:100%;
}

.color-item{

    width:60px;
    height:60px;
}

h1{

    font-size:1.7rem;
}

}