* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333333;
}

.container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

h1 {
    font-size: 24px;
    margin: 0 0 8px;
    color: #333333;
}

h2 {
    font-size: 18px;
    margin: 0 0 20px;
    color: #333333;
}

.subtitle {
    margin: 0 0 20px;
    color: #555555;
    font-size: 14px;
}

.converter-card {
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #cccccc;
    font-family: inherit;
    font-size: 16px;
    background-color: #ffffff;
}

input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.form-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

.swap-btn-container {
    padding-bottom: 15px;
}

button {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
}

button:hover:not(:disabled) {
    background-color: #0056b3;
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.swap-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
}

.convert-btn {
    width: 100%;
    margin-top: 5px;
}

.result {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    text-align: center;
}

.result-amount {
    font-size: 24px;
    font-weight: bold;
    color: #333333;
    margin-bottom: 8px;
}

.result-rate {
    color: #555555;
    font-size: 14px;
}

.info-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: left;
}

.rate-info {
    padding: 12px;
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
    border-radius: 0 4px 4px 0;
}

.rate-info p {
    margin: 0 0 8px;
    color: #555555;
    font-size: 14px;
    line-height: 1.45;
}

.rate-info p:last-child {
    margin-bottom: 0;
}

.error {
    color: #b42318 !important;
}

footer {
    margin-top: 20px;
    text-align: center;
    color: #555555;
    font-size: 13px;
}

footer p {
    margin: 5px 0;
}

@media (max-width: 540px) {
    body {
        justify-content: flex-start;
        padding: 12px;
    }

    .container {
        padding: 16px;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .swap-btn-container {
        display: flex;
        justify-content: center;
        padding: 0 0 15px;
    }

    .swap-btn {
        transform: rotate(90deg);
    }
}