
@import url('https://fonts.googleapis.com/css2?family=Ballet:opsz@16..72&family=Bitcount+Prop+Single:wght@100..900&family=Bitcount:wght@100..900&family=DM+Serif+Text:ital@0;1&family=Griffy&family=Kings&family=Nosifer&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Playwrite+AU+NSW:wght@100..400&family=Quintessential&family=Rouge+Script&display=swap');

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

body {
    font-family: 'Playwrite AU NSW', sans-serif;
    background-color: rgb(139, 180, 204);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    top: 0;
    left: 0;
    padding: 10px 30px;
    background: rgb(128, 143, 207);
    color: pink;
    width: 100%;
}

body.dark nav {
    background: rgb(136, 136, 190);
}
nav ul {
    list-style: none;
    flex-direction: column;
    display: flex;
    flex-direction: row;
    gap: 70px;
    margin: auto;
    font-size: 1.5rem;
    font-style: italic;
    justify-content: space-between;
    text-decoration: rgb(192, 235, 255) wavy underline;
}
nav a {
    text-decoration: none;
    color: rgb(16, 16, 99);
}

h2 {
    text-align: center;
    text-decoration: rgb(32, 32, 128) wavy underline;
    margin-top: 75.1px;
    color: rgb(36, 36, 161);
    font-size: 1.7rem;
}

body.dark h2 {
    color: rgb(136, 136, 182);
    text-decoration: rgb(136, 136, 182) wavy underline;
}

p {
    color: blue;
    text-align: center;
    justify-content: center;
    align-items: center;
    margin-top: 21px;
    font-size: 1.1rem;
    font-style: italic;
}

body.dark p {
    color: rgb(148, 148, 241);
}
/* Main Layout */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: 100vh;
    margin-top: 50px;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: visible;
}

.calculator-card {
    background-color: rgb(132, 132, 228);
    padding: 2rem;
    border-radius: 0px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    max-width: 480px;
    position: relative;
    justify-content: center;
    z-index: 6;
}

.title {
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.25rem;
    color: rgb(4, 4, 102);
}

.subtitle {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: #426ea8;
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

form input, form select, form button {
    width: 90%;
    max-width: 300px;
    margin: 9px 1px;
    text-align: center;
}
.form-group label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

input,
select {
    padding: 0.9rem 1.75rem;
    border: 1px solid #104b7c;
    border-radius: 20px;
    font-size: 1rem;
    width: 70%;
    text-align: center;
    align-items: center;
    color: blue;
    background: rgb(219, 219, 224);
}

.calculate-btn {
    background-color: rgb(66, 66, 124);
    color: #a6c1ce;
    padding: 0.9rem 1.75rem;
    font-weight: 400;
    font-size: 1.1rem;
    font-family: 'Playwrite AU NSW', sans-serif;
    border-radius: 0px;
    cursor: pointer;
    width: 50%;
    transition: background 0.3s ease;
    border: dotted;
}

.calculate-btn:hover {
    background-color: #3a4c99;
}

/* Result Box */
.result-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e9f8ee;
    border-left: 6px solid rgb(39, 10, 117);
    border-radius: 8px;
    display: none;
}

.result-box h2 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.subtitle {
    color: #444;
}

body.dark .subtitle {
    color: #93d0db;
}

.result-box .result-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.result-box.show {
    display: block;
}



/* Dark Mode Support */
body.dark {
    --bg: #1a1a1a;
    --card-bg: #262626;
    --text: #f5f5f5;
    --primary: #3734d3;
}

.toggle-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

#themeToggle {
    background-color: transparent;
    border: 2px solid rgb(59, 59, 143);
    border: rgb(59, 59, 143) dotted;
    border-radius: 0;
    margin-top: 30px;
    float: right;
    margin: 15px 40px 0 auto;
    font-size: 0.9rem;
    font-family: 'Playwrite AU NSW', sans-serif;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    color: blue;
    padding: 10px 10px;
}

#themeToggle:hover {
    background-color: rgb(130, 130, 233);
    color: #e3eef7;
}

body.dark #themeToggle {
    border: rgb(0, 183, 255) dotted;
}

/* Dark mode basics */
body.dark {
    background-color: #271b5c;
    color: #e0e0e0;
}

body.dark .result {
    color: #cae3ec;
}
/* To hide and show results */
#result {
    display: none;
    transition: all 0.4s ease;
}

#result.show {
    display: block;
}

.result-box {
    background-color: var(--card);
    color: #140441;
}

footer {
    background: rgb(128, 143, 207);
    color: rgb(8, 37, 75);
    padding: 10px 30px;
    margin-top: 50px;
    text-align: center;
    font-size: 1.1rem;
    font-style: italic;
}

body.dark footer {
    background: rgb(136, 136, 190);
}

/* Responsive */
@media (max-width: 500px) {
    .calculate-card {
        padding: 1.5rem;
    }
    .title {
        font-size: 1.5rem;
    }
    .result-box {
        font-size: 0.95rem;
    }
}

@media (max-width: 700px) {
    form {
        width: 90%;
        padding: 21px;
    }

    input, select {
        width: 71%;
        font-size: 0.91rem;
    }

    .btn {
        width: 100%;
        font-size: 1.13rem;
    }

    #themeToggle {
        margin: 13px auto;
        padding: 9px 21px;
        font-size: 0.9rem;
    }

    h1 {
        font-size: 2.1rem;
    }

    h2 {
        font-size: 1.53rem;
    }

    p {
        font-size: 1.3rem;
        padding: 10px 0;
    }

    .container {
        width: 85%;
        margin: 20px auto;
        padding: 20px;
    }

    nav {
        flex-direction: column;
        display: flex;
        gap: 21px;
        padding: 12px 1px;
    }

    nav ul {
        flex-direction: column;
        gap: 13px;
        font-size: 1.3rem;
    }
}