
@import url('https://fonts.googleapis.com/css2?family=Condiment&family=Ephesis&family=Griffy&family=Meow+Script&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Potta+One&family=Radley:ital@0;1&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');
/* Reset and Base */
:root {
    --blobX: 0px;
    --blobY: 0px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Newsreader', sans-serif;
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
    transition: background 0.4s ease, color 0.4s ease;
    cursor: url('https://cdn-icons-png.flaticon.com/512/892/892692.png'), auto;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Container & Layout*/
.container {
    max-width: 600px;
    width: 75%;
    margin: auto;
    background: pink;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    margin-top: 100px;
    margin-bottom: 50px;
}

nav {
    display: flex;
    flex-direction: column;
    padding: 10px 30px;
    background-color: rgb(241, 71, 136);
    color: rgb(238, 180, 190);
    justify-content: center;
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    text-decoration: rgb(247, 207, 214) wavy underline;
    font-size: 1.5rem;
    justify-content: space-evenly;
    font-style: italic;
    padding: 12px;
}

nav a {
    text-decoration: none;
    color: rgb(240, 217, 221);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    justify-content: center;
}

h2 {
    color: rgb(245, 106, 129);
    text-decoration: rgb(245, 152, 167) wavy underline;
    text-align: center;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 21px;
}

body.dark h2 {
    color: pink;
    text-decoration: pink wavy underline;
}

p {
    text-align: center;
    justify-content: center;
    align-items: center;
    color: rgb(250, 95, 121);
    font-size: 1.13rem;
    font-style: italic;
}

body.dark p {
    color: pink;
}

h1 {
    font-family: 'Newsreader', sans-serif;
    color: rgb(233, 40, 40);
    background-color: rgb(236, 217, 217);
    border-radius: 1.4rem;
    width: 70%;
    text-align: center;
}
/* Form Styles */
form {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2.1rem;
    background: rgb(252, 188, 188);
    border-radius: 9px;
    justify-content: center;
    text-align: center;
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
} 

input, select {
    padding: 0.7rem 1rem;
    font-size: 1rem;
    font-family: 'Newsreader', sans-serif;
    border-radius: 0.7rem;
    border: 1px solid rgb(170, 192, 136);
    background-color: rgb(172, 160, 160);
    color: rgb(102, 30, 42);
    transition: border 0.3s;
    width: 70%;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
    display: block;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--btn-bg);
}

label {
    margin-bottom: 0.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

/* Buttons */
button.btn {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 14rem;
    background: rgb(126, 114, 114);
    color: var(--btn-text);
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease;
    margin-top: 1.5rem;
    gap: 12px;
    margin: 0 auto;
    cursor: pointer;
    width: 50%;
    align-items: center;
}

button.btn:hover {
    background: #686497;
}

button.reset {
    background: #d43b4f;
    margin-top: 2rem;
    margin-bottom: 2rem;
    color: var(--btn-text);
    font-weight: 600;
    font-size: 1rem;
    width: 50%;
    padding: 0.7rem 1.2rem;
}

button.reset:hover {
    background: rgb(172, 9, 36);
    color: rgb(218, 134, 148);
}

body.dark {
    background-color: rgb(133, 5, 47);
}
body.dark .container {
    background: rgb(180, 28, 79);
}
body.dark form {
    background-color: rgb(221, 101, 141);
}
body.dark h1 {
    background-color: rgb(248, 171, 207);
    color: rgb(128, 38, 80);
}
/* Result */
#result {
    margin-top: 2rem;
    padding: 2rem 1rem;
    background: var(--input-bg);
    border-left: 6px solid rgb(151, 53, 70);
    border-radius: 1rem;
    animation: fadeIn 0.6s ease-in-out;
    min-height: 400px; /*ensures room for chart */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

#result.hidden {
    display: none;
}

#probOutput {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1rem 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme Toggle */
#themeToggle {
    position: relative;
    left: 0;
    background: rgb(202, 196, 196);
    border-radius: 12px;
    font-family: 'Newsreader', sans-serif;
    font-size: 1.2rem;
    width: 120px;
    padding: 3px 12px;
    margin-top: 30px;
    margin-right: 30px;
    margin-bottom: 30px;
    float: right;
    border: groove pink;
    cursor: pointer;
    margin-bottom: 120px;
    gap: 30px;
    color: var(--text);
    transition: transform 0.3s;
}

/* Tooltips */
.tooltip {
    font-size: 1rem;
    position: relative;
    display: inline-block;
    margin-left: 6px;
    cursor: help;
    font-size: 1rem;
}

.tooltip::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: 125%;
    transform: translateX(-50%);
    background: var(--tooltip-text);
    color: var(--tooltip-bg);
    padding: 0.4rem 0.7rem;
    border-radius: 0.4rem;
    white-space: nowrap;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.tooltip:hover::after {
    opacity: 1;
}


/* Enhanced Float + Rotate Keyframes */
@keyframes floatRotate {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(10px, -10px) rotate(180deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}



/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    margin-bottom: 0.3rem;
}

#probChart {
    width: 100% !important;
    max-width: 450px;
    height: 320px !important;
    margin: 2rem auto 0;
    display: block;
    border-radius: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
}

html, body {
    height: 100%;
}

footer {
    padding: 10px 30px;
    background: rgb(240, 32, 94);
    color: pink;
    text-align: center;
    font-size: 1.3rem;
    font-style: italic;
    width: 100%;
}

/* Responsive */
@media (max-width: 600px) {

    h1 {
        font-size: 1.5rem;
    }
    .container {
        padding: 1.5rem 1rem;
    }

    button.btn {
        font-size: 0.95rem;
    }

    input, select {
        font-size: 0.95rem;
    }
}

@media (max-width: 700px) {
    h1 {
        font-size: 1.54rem;
    }

    h2 {
        font-size: 1.54rem;
    }
    p {
        font-size: 1.12rem;
    }

    .container {
        padding: 1.6rem 1.1rem;
    }

    button.btn {
        font-size: 1.1rem;
    }

    input, select {
        font-size: 1.1rem;
    }
}