body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
}
.container {
    max-width: 800px;
    width: 100%;
}

.main-title {
    color: #008000;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: left;
}

.input-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 10px;
}

.input-group-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-group {
    margin-bottom: 10px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #000080;
    border-radius: 0;
    font-size: 16px;
    box-sizing: border-box;
    background-color: #fff;
}

.swap-button-container {
    margin-bottom: 10px;
}

#swapUnits {
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.2s;
}

#swapUnits:hover {
    background-color: #c0c0c0;
}

.unit-list-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.unit-list-wrapper {
    flex: 1;
}

.search-bar {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.unit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 300px;
    overflow-y: auto;
    border: 1px solid #999;
    background-color: #fff;
}

.unit-list::-webkit-scrollbar {
    width: 12px;
}

.unit-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.unit-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
    border: 3px solid #f1f1f1;
}

.unit-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.unit-list li {
    padding: 5px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
}

.unit-list li.selected {
    background-color: #000080;
    color: #fff;
    font-weight: bold;
}

.unit-list li.category-header {
    font-weight: bold;
    background-color: #e0e0e0;
    cursor: default;
    border-bottom: 1px solid #ccc;
    padding: 8px 10px;
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.5s linear;
}

.error-message.visible {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 600px) {
    .input-section {
        flex-direction: column;
        gap: 15px;
    }
    .unit-list-container {
        flex-direction: column;
        gap: 15px;
    }
    .unit-list {
        height: 200px;
    }
    .swap-button-container {
        text-align: center;
        margin-top: -15px;
    }
}

.popular-links-card {
    padding: 30px;
}

.popular-links-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

.popular-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.popular-link {
    text-decoration: none;
    color: #000080;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

.popular-link:hover {
    background-color: #000080;
    color: #fff;
}