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

html {
    font-size: 16px;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background-color: #fef7e6;
    font-family: "Arial", sans-serif;
}

a {
    text-decoration: none;
    color: black;
    text-align: center;
    white-space: nowrap;
}

/* --- Header --- */
.header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: #fef7e6;
    width: 100vw;
    box-sizing: border-box;
    padding: 2rem 4rem;
    
}

h1 {
    color: black;
    font-size: 3rem;
    text-transform: lowercase;
}

.anchors {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.anchors > a {
    background-color: white;
    padding: 1rem 2rem;
    border-radius: 10rem;
    font-size: 1.5rem;
    margin-left: 0.5rem;
    transition: background-color 0.3s ease;
}

.anchors > a:hover {
    background-color: #F15B42;
    color: white;
}

/* --- Calculator Section --- */
.calculator-div {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    background-color: #fff8e8;
    border: 2px solid #ffe5a3;
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    font-size: 1.5rem;
}

.container-1 {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 2rem;
}

#incomes, #expenses {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#income-label, #expense-label, #profit-label {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

input {
    padding: 0.5rem;
    width: 12rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 1.2rem;
}

input:focus {
    outline: none;
    border-color: #FFD372;
}

button {
    width: 6rem;
    padding: 0.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 10rem;
    background-color: #FFD372;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0px 4px 0px #2C3D73
}

button:hover {
    background-color: #ffcf59;
}

#calculate, #clear {
    width: 10rem;
    margin: 1rem;
}

.results {
    margin: 1rem 0;
}

/* --- Mobile Friendly --- */
@media (max-width: 480px) {
    .header {
        flex-wrap: wrap;
        justify-content: center;
        padding: 1rem;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
    }

    .anchors > a {
        font-size: 1rem;
        padding: 0.7rem 1rem;
    }

    .calculator-div {
        width: 95%;
        font-size: 1rem;
        padding: 1rem;
    }

    .container-1 {
        flex-direction: column;
        gap: 1rem;
    }

    input {
        width: 10rem;
    }
}
