body {
    font-family: 'Poppins', 'Roboto', sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
    line-height: 1.8;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

header .subtitle {
    font-size: 1.25rem;
    color: #6c757d;
}

/* Main Converter Card */
.converter-wrapper {
    background: #ffffff;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

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

.input-group {
    flex: 2;
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    color: #495057;
}

.input-group input[type="number"],
.input-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background-color: #f1f3f5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input[type="number"]:focus,
.input-group select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.swap-icon {
    flex-basis: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-top: 28px; /* Aligns with the input fields */
    transition: transform 0.3s ease, background-color 0.2s;
}

.swap-icon svg {
    width: 24px;
    height: 24px;
    color: #007bff;
}

.swap-icon:hover {
    transform: rotate(180deg);
    background-color: #e9ecef;
}

/* Result Display */
.result-wrapper {
    margin-top: 25px;
    padding: 20px;
    background-color: #e9f7ff;
    border-left: 5px solid #007bff;
    border-radius: 8px;
    text-align: center;
}

#result-text {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0056b3;
}

/* Content Section */
.content-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.content-section h2, .content-section h3, .content-section h4 {
    color: #212529;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 25px;
}

.content-section p,
.content-section li {
    color: #495057;
    font-size: 1.1rem;
}

.content-section ol {
    padding-left: 20px;
    margin-top: 15px;
}

.content-section a {
    color: #007bff;
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.content-section a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    color: #868e96;
}

/* Responsive Design */
@media (max-width: 600px) {
    .converter-card {
        flex-direction: column;
        align-items: stretch;
    }

    .swap-icon {
        margin: -10px auto 10px;
        transform: rotate(90deg);
    }

    .swap-icon:hover {
        transform: rotate(270deg);
    }

    header h1 {
        font-size: 2.2rem;
    }
}
