* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 600;
}

h2 {
    margin: 20px 0 15px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.converter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

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

input, select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
}

input[readonly] {
    background-color: #f9f9f9;
}

#swap-btn {
    background-color: #f1f1f1;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    margin: 0 10px;
}

#swap-btn:hover {
    background-color: #e0e0e0;
}

#swap-btn svg {
    color: #555;
}

.info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.info p {
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

#rate-value {
    font-weight: bold;
    color: #2c3e50;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.rate-card {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.rate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.rate-card .currency-code {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.rate-card .currency-name {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
}

.rate-card .rate-value {
    font-size: 18px;
    color: #2c3e50;
}

footer {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #777;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .container {
        margin: 20px;
        padding: 15px;
    }
    
    .converter {
        flex-direction: column;
    }
    
    #swap-btn {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .input-group {
        width: 100%;
    }
}