@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Handjet:wght@700&display=swap');

body {
    background-color: #ffd700;
    background-image: url('banana_texture.png');
    background-size: auto;
    background-repeat: repeat;
    font-family: 'Fredoka One', cursive;
    color: #3e2723;
    text-align: center;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    margin: 15px 0px 15px 0px;
    position: relative;
    display: flex;
    justify-content: center;
    margin: 0px 15px 0px 15px;
}

.logo {
    width: 100%;
    height: auto;
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

.tabs {
    display: flex;
    justify-content: space-between;
    margin: 0px 15px 0px 15px !important;
    background: linear-gradient(to top, #ffd966, #f7c14d);
    width: 100%;
    max-width: 600px;
    font-size: 1.1em;
    border-radius: 30px;
    box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.15), 0 6px 12px 0 rgba(0, 0, 0, 0.15);
    padding: 0.2rem;
    position: relative;
    overflow: hidden;
}

.glider {
    position: absolute;
    top: 2px;
    left: 4px;
    width: calc(33.33% - 8px);
    height: calc(100% - 4px);
    background: linear-gradient(to top, #2e7d32, #4caf50);
    border-radius: 30px;
    transition: left 0.4s ease-in-out;
    z-index: 1;
}

input[type="radio"] {
    display: none;
}

input[type="radio"]:nth-child(1):checked ~ .glider {
    left: 4px;
}

input[type="radio"]:nth-child(3):checked ~ .glider {
    left: calc(33.33% + 4px);
}

input[type="radio"]:nth-child(5):checked ~ .glider {
    left: calc(66.66% + 4px);
}

.tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 44px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
    color: #5d4037;
    text-transform: uppercase;
    background-color: transparent;
    position: relative;
    margin-left: 5px;
    z-index: 2;
}

input[type="radio"]:checked + label {
    color: #ffffff;
    transition: color 0.3s ease-in-out;
}

.content-container {
    margin-top: 1rem;
    text-align: center;
}

.content {
    display: none;
    margin: 0 auto 10px;
    text-align: left;
    max-width: 600px;
    padding-top: 0px;
}

.content.active {
    display: block;
}

input[type="number"],
select {
    width: calc(100% - 30px);
    height: 48px;
    padding: 12px;
    margin: 8px auto;
    border-radius: 30px;
    border: 2px solid #ffca28;
    background-color: #fff8e1;
    font-family: 'Fredoka One', cursive;
    font-size: 1em;
    color: #3e2723;
    display: block;
    box-sizing: border-box;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #ffc107;
    box-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
}

.convert-btn {
    background: linear-gradient(to bottom, #388e3c, #66bb6a);
    border: none;
    border-radius: 30px;
    color: white;
    padding: 12px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.3s;
    font-family: 'Fredoka One', cursive;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.convert-btn:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.convert-btn:active {
    transform: scale(0.95);
}

.result-display {
    background: linear-gradient(to bottom, #c8d6b9, #d4dbc3);
    border: 2px solid #a67c00;
    border-radius: 15px;
    padding: 15px;
    margin: 10px 15px 5px 15px !important;
    font-size: 1.4em;
    color: #1c1c1c;
    font-family: 'Fredoka One', cursive;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-number {
    font-size: 5em;
    font-weight: 700;
    font-family: 'Handjet', sans-serif;
    color: #233e2b;
    margin-bottom: 10px;
    text-align: center;
}

.result-details {
    font-size: 0.5em;
    font-weight: normal;
    color: #233e2b;
    text-align: center;
}

.footer-logo {
    width: auto;
    height: 25px;
    margin: 15px auto;
    display: block;
    fill: #388e3c;
}

h2 {
    margin: 20px 15px 0px 15px !important;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .tabs {
        padding: 0.2rem;
        max-width: 100%;
        margin: 0;
    }

    .tab {
        font-size: 1rem;
        height: 40px;
        width: auto;
        padding: 0 5px;
        margin-left: 5px;
    }

    .glider {
        width: calc(33.33% - 6px);
        left: 4px;
    }
}

label {
    display: block;
    margin-left: 15px;
    font-weight: bold;
    color: #32723;
    font-size: 1em;
}
