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

html {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #1a1d24;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    padding: 20px;
}

.converter-container {
    background-color: #2d333b;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
    max-width: 850px;
}

h1 {
    margin-bottom: 35px;
    color: #ffffff;
    font-weight: 600;
}

.converter {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

input[type="number"],
select {
    padding: 14px 16px;
    background-color: #22272e;
    border: 1px solid #444c56;
    border-radius: 6px;
    font-size: 1.05rem;
    width: 100%;
    margin-top: 8px;
    color: #e0e0e0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select {
     background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ADB5BD%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.75em;
    padding-right: 2.5em;
}

select:focus, input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}


input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input::placeholder {
    color: #8b949e;
}

#swap-button {
    padding: 0;
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
    cursor: pointer;
    background-color: #388bfd;
    color: white;
    border: none;
    border-radius: 50%;
    line-height: 50px;
    text-align: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    margin-bottom: 2px;
}

#swap-button:hover {
    background-color: #58a6ff;
}

#swap-button:active {
     background-color: #2c7dfa;
}


#output-value {
    background-color: #22272e;
    cursor: default;
}

.error {
    color: #f85149;
    margin-top: 20px;
    font-size: 0.95em;
    min-height: 1.3em;
    text-align: center;
    width: 100%;
}

@media (max-width: 650px) {
    .converter {
        flex-direction: column;
        align-items: stretch;
        gap: 25px;
    }
     #swap-button {
       margin: 0 auto;
       width: 45px;
       height: 45px;
       line-height: 45px;
       font-size: 1.6rem;
    }
    .input-group {
        width: 100%;
         min-width: unset;
    }
    .converter-container {
        padding: 30px 25px;
    }
}