/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #1a1a1a;
    color: #fff;
}

header {
    background: #333;
    color: #fff;
    padding: 10px 20px;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1em;
    font-weight: bold;
}

header ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

header ul li {
    margin-left: 20px;
}

header ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

header ul li a:hover {
    color: #e600ff;
}

main {
    flex: 1;
    padding: 20px;
    text-align: center;
}

.converters-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.converters-list button {
    margin: 10px;
    padding: 15px 20px;
    font-size: 16px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    /* transition: background 0.3s, color 0.3s, border 0.3s, transform 0.3s; */
    transition: all 0.3s;
}

.converters-list button:hover {
    transform: translateY(-5px);
    box-shadow: 5px 5px 10px rgba(230, 0, 255, .5);
}

.converters-list button:active{
    background-color: #000;
}

.converter {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.converter .inputs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.converter select, .converter input, .converter button {
    padding: 15px;
    margin-bottom: 1.5rem;
    font-size: 16px;
    background: #333;
    color: #fff;
    outline: none;
    border: none;
    /* border: 2px solid #e600ff; */
    border-radius: 5px;
    transition: background 0.3s, color 0.3s, border 0.3s;
}

#result {
    margin-top: 20px;
    padding: 15px;
    font-size: 16px;
    background: #333;
    color: #fff;
    border: 2px solid #e600ff;
    border-radius: 5px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    display: none; /* Initially hide the result box */
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

.back-btn {
    position: absolute;
    top: 60px;
    left: 16px;
    color: #fff;
    padding: 0px 28px;
    background: #333;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, border 0.3s;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    transform: rotateY(180deg);
}

.back-btn:hover {
    background: #555;
    /* border: 2px solid #e600ff; */
}

@media (max-width: 768px) {
    .converters-list button {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    .converter .inputs {
        flex-direction: column;
    }
}
