.converter-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.converter-header {
    text-align: center;
    margin-bottom: 30px;
}

.converter-header h2 {
    color: #1e3c72;
    font-size: 2em;
    margin-bottom: 10px;
}

.converter-header p {
    color: #666;
    font-size: 1.1em;
}

.converter-card {
    background: white;
    border-radius: 8px;
    padding: 10px;
    /* padding: 30px; */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    position: relative;
    padding-bottom: 70px;
}

.unit-section {
    margin-bottom: 1px;
    /* margin-bottom: 30px; */
    padding: 10px;
    /* padding: 20px; */
    background: #f8f9fa;
    border-radius: 8px;

    width: 100%;
}

.unit-section h3 {
    color: #1e3c72;
    margin-bottom: 10px;
    /* margin-bottom: 20px; */
    padding-bottom: 5px;
    /* padding-bottom: 10px; */
    border-bottom: 1px solid #dee2e6;
}

.input-group {
    margin-bottom: 5px;
    /* margin-bottom: 20px; */
}

.input-group label {
    display: block;
    margin-bottom: 1px;
    /* margin-bottom: 8px; */
    color: #333;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 5px;
    /* padding: 12px; */
    padding-right: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 5px rgba(30,60,114,0.2);
}

.input-wrapper .unit {
    position: absolute;
    right: 12px;
    color: #666;
    font-weight: 500;
    min-width: 25px;
    text-align: right;
}

.clear-button {
    background: #1e3c72;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    /* width: 100%; */
    margin-top: 20px;
    transition: background-color 0.3s;

    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
}

.clear-button:hover {
    background: #2a5298;
}

.formula-section {
    margin-top: 40px;
}

.formula-section h3 {
    color: #1e3c72;
    text-align: center;
    margin-bottom: 20px;
}

.formula-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.formula-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.formula-card h4 {
    color: #1e3c72;
    margin-bottom: 15px;
    text-align: center;
}

.formula-card p {
    color: #666;
    font-family: monospace;
    font-size: 1.1em;
    margin-bottom: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    .converter-container {
        padding: 15px;
    }

    .converter-header h2 {
        font-size: 1.8em;
    }

    .converter-card {
        padding: 20px;

        grid-template-columns: 1fr;
        padding-bottom: 90px;
    }

    .unit-section {
        padding: 15px;
    }

    .formula-cards {
        grid-template-columns: 1fr;
    }
    
    .clear-button {
        width: 80%;
    }
}