/* ===================================
   RESET
=================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* ===================================
   BODY
=================================== */

body{
    font-family:Arial, Helvetica, sans-serif;
    background:linear-gradient(135deg,#007BFF,#00C6FF);
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    transition:.4s;
    overflow:hidden;
}

/* ===================================
   CONTAINER
=================================== */

.container{
    width:450px;
    background:#ffffff;
    padding:30px;
    border-radius:15px;
    text-align:center;
    box-shadow:0 10px 30px rgba(0,0,0,.20);
    animation:fadeUp .8s ease;
    transition:.35s;
    position:relative;
    z-index:2;
}

/* ===================================
   HEADINGS
=================================== */

h1{
    color:#0056b3;
    margin-bottom:10px;
}

p{
    color:#555;
    margin-bottom:20px;
    line-height:1.6;
}

/* ===================================
   INPUT
=================================== */

input{
    width:90%;
    padding:12px;
    font-size:16px;
    border-radius:8px;
    border:1px solid #ccc;
    background:#fff;
    color:#222;
    transition:.3s;
}

input:focus{
    outline:none;
    border:2px solid #007BFF;
    box-shadow:0 0 15px rgba(0,123,255,.35);
}

/* ===================================
   BUTTON
=================================== */

button{
    margin-top:20px;
    padding:12px 25px;
    border:none;
    border-radius:8px;
    background:#007BFF;
    color:#fff;
    font-size:16px;
    cursor:pointer;
    transition:.3s;
}

button:hover{
    background:#0056b3;
    transform:translateY(-4px);
    box-shadow:0 10px 20px rgba(0,0,0,.25);
}
/* ===================================
   THEME SWITCH
=================================== */

.theme-switch{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    margin-bottom:20px;
}

.switch{
    position:relative;
    display:inline-block;
    width:55px;
    height:28px;
}

.switch input{
    display:none;
}

.slider{
    position:absolute;
    inset:0;
    background:#ccc;
    border-radius:30px;
    cursor:pointer;
    transition:.35s;
}

.slider::before{
    content:"";
    position:absolute;
    width:22px;
    height:22px;
    left:3px;
    bottom:3px;
    background:#fff;
    border-radius:50%;
    transition:.35s;
}

.switch input:checked + .slider{
    background:#007BFF;
}

.switch input:checked + .slider::before{
    transform:translateX(27px);
}

/* ===================================
   DARK MODE
=================================== */

body.dark-mode{
    background:linear-gradient(135deg,#0f172a,#1e293b);
}

body.dark-mode .container{
    background:#1f2937;
    color:#fff;
    box-shadow:0 15px 35px rgba(0,0,0,.45);
}

body.dark-mode h1{
    color:#60a5fa;
}

body.dark-mode p{
    color:#d1d5db;
}

body.dark-mode input{
    background:#111827;
    color:#fff;
    border:1px solid #374151;
}

body.dark-mode input::placeholder{
    color:#9ca3af;
}

body.dark-mode input:focus{
    border:2px solid #60a5fa;
    box-shadow:0 0 15px rgba(96,165,250,.35);
}

body.dark-mode button{
    background:#2563eb;
}

body.dark-mode button:hover{
    background:#1d4ed8;
}

/* ===================================
   FLOATING BACKGROUND
=================================== */

.background-animation{
    position:fixed;
    inset:0;
    overflow:hidden;
    z-index:-1;
}

.background-animation span{
    position:absolute;
    width:180px;
    height:180px;
    border-radius:50%;
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(6px);
    animation:floating 14s ease-in-out infinite;
}

.background-animation span:nth-child(1){
    top:10%;
    left:10%;
    animation-duration:10s;
}

.background-animation span:nth-child(2){
    top:65%;
    left:15%;
    animation-duration:14s;
}

.background-animation span:nth-child(3){
    top:20%;
    right:12%;
    animation-duration:18s;
}

.background-animation span:nth-child(4){
    bottom:15%;
    right:18%;
    animation-duration:12s;
}

.background-animation span:nth-child(5){
    top:40%;
    left:45%;
    animation-duration:16s;
}

.background-animation span:nth-child(6){
    bottom:8%;
    left:55%;
    animation-duration:20s;
}

@keyframes floating{

    0%{
        transform:translateY(0) rotate(0deg);
    }

    50%{
        transform:translateY(-40px) rotate(180deg);
    }

    100%{
        transform:translateY(0) rotate(360deg);
    }

}

@keyframes fadeUp{

    from{
        opacity:0;
        transform:translateY(40px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}
/* ===================================
   RESULT BOX
=================================== */

.result-box{
    margin-top:30px;
    padding:20px;
    border-radius:12px;
    border:2px solid #007BFF;
    transition:.35s ease;
}

/* ---------- Light Mode ---------- */

body:not(.dark-mode) .result-box{
    background:#f7f9fc;
    color:#222;
}

body:not(.dark-mode) .result-box h2{
    color:#007BFF;
}

body:not(.dark-mode) #result{
    color:#222;
    text-shadow:none;
}

/* ---------- Dark Mode ---------- */

body.dark-mode .result-box{
    background:#111827;
    color:#ffffff;
    border-color:#3b82f6;
}

body.dark-mode .result-box h2{
    color:#60a5fa;
}

body.dark-mode #result{
    color:#ffffff;
    text-shadow:0 0 10px rgba(255,255,255,.35);
}

/* ---------- Common ---------- */

#result{
    font-size:22px;
    font-weight:bold;
    transition:.35s;
}

.score{
    font-size:40px;
    font-weight:bold;
    color:#007BFF;
}

body.dark-mode .score{
    color:#60a5fa;
}

/* ===================================
   RESPONSIVE
=================================== */

@media(max-width:520px){

    .container{
        width:92%;
        padding:22px;
    }

    h1{
        font-size:26px;
    }

    input{
        width:100%;
    }

    button{
        width:100%;
    }

}

/* ===================================
   SCROLLBAR
=================================== */

::-webkit-scrollbar{
    width:8px;
}

::-webkit-scrollbar-thumb{
    background:#007BFF;
    border-radius:10px;
}

::-webkit-scrollbar-track{
    background:#e5e7eb;
}

body.dark-mode::-webkit-scrollbar-track{
    background:#111827;
}
