* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;  /*  this property for 'footer' element */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background-color: #3498db;
    color: #fff;
    text-align: center;
    padding: 1rem;
}


/*-------------------------- footer ---------------------------*/
.foot{
    background-color: #3498db;
    position: sticky;          /* always in bottom footer property */
    top: 100%;                 /* always in bottom footer property */
    height: 60px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.foot span{
    color: white;
}

.foot a{
    color: white;
}

.foot a:hover{
    color: #2980b9;
    background: none;
    transition: 0.2s;
}

/*-------------------- footer responsive ------------------------------*/
@media(max-width: 495px){

    #connect{
        display: none;
    }

    #copy{
        font-size: 10px;
    }
}


main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

h1, h2 {
    margin-bottom: 1rem;
}

#popular-rates, #exchange-form {
    background-color: #fff;
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.rate-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    text-align: center;
}

.rate-card .rate {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

form {
    display: grid;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5rem;
}

input, select, button {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 3px;
}

button {
    background-color: #3498db;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#result {
    margin-top: 1rem;
    font-weight: bold;
}

.hidden {
    display: none;
}

@media (min-width: 768px) {
    form {
        grid-template-columns: repeat(3, 1fr);
    }

    button {
        grid-column: span 3;
    }
}
