* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

/* Modern Background with Overlay */
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(140, 170, 199, 0.65) 0%, rgba(172, 202, 207, 0.55) 100%),
        url('https://images.unsplash.com/photo-1647462659133-7126b04b52ba?q=80&w=1374&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center center/cover no-repeat;
    background-blend-mode: overlay;
}

/* Container Card */
.container {
    background: linear-gradient(115deg, rgba(240, 243, 246, 0.93) 60%, rgba(220, 227, 231, 0.95) 100%);
    padding: 2.2rem 2rem 1.6rem 2rem;
    border-radius: 18px;
    box-shadow: 0 8px 25px 0 rgba(44, 62, 80, 0.14), 0 1.5px 10px rgba(44, 62, 80, 0.09);
    width: 390px;
    max-width: 95vw;
    animation: fadeIn 0.8s cubic-bezier(.5, .2, .5, 1.3);
    backdrop-filter: blur(8px);
    position: relative;
    transition: box-shadow 0.3s;
}

/* Headings and Title */
.container h1 {
    text-align: center;
    color: #345;
    margin-bottom: 1.1rem;
    font-size: 2.08rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #6e8fa7, #6fa0a0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Info Bar */
.info {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: #6c6e72;
    padding: 0.5rem;
    background: rgba(215, 220, 240, 0.44);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Input Wrapper and Icon */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 11px;
    top: 43%;
    transform: translateY(-50%);
    color: #9fa5bc;
    font-size: 1.1rem;
    pointer-events: none;
}

form input {
    width: 100%;
    border: 2px solid #c5d5ec;
    border-radius: 10px;
    padding: 0.7rem 0.8rem 0.7rem 2.3rem;
    font-size: 1.15rem;
    transition: 0.3s;
    background: #ebf2fa;
    margin-bottom: 1rem;
}

form input:focus {
    border-color: #678ab7;
    box-shadow: 0 0 8px rgba(79, 172, 254, 0.16);
    outline: none;
}

/* Dropdown Styles */
.dropdown {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.1rem;
    margin-top: 1rem;
}

/* Swap Button */
.swap-btn {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 55%;
    padding: 0.42rem 0.51rem;
    border: none;
    margin-bottom: 1.6rem;
    cursor: pointer;
    box-shadow: 0 1.5px 8px rgba(120, 130, 180, 0.10);
    transition: background 0.2s, transform 0.3s;
}

.swap-btn:active,
.swap-btn:focus {
    background: #d0eafe;
    outline: none;
    transform: scale(1.08);
}

.exchange-icon {
    font-size: 1.7rem;
    color: #6e8fa7;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(.5, .2, .5, 1.3), color 0.3s;
    padding: 0.08rem;
}

.swap-btn:hover .exchange-icon {
    color: #4747a0;
    transform: rotate(180deg) scale(1.20);
}

/* Select Menus and Flags */
.select-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f6fbff;
    padding: 0.52rem 0.92rem;
    border-radius: 9px;
    box-shadow: 0 2px 3px rgba(79, 172, 254, 0.06);
}

.select-container img {
    width: 32px;
    height: 32px;
}

select {
    border: none;
    background: transparent;
    font-size: 1.11rem;
    cursor: pointer;
    outline: none;
    color: #506070;
    font-weight: 500;
}

select:focus {
    color: #345;
}

/* Conversion Result */
.msg {
    text-align: center;
    margin: 1.25rem 0;
    background: linear-gradient(135deg, #93aecd 33%, #b3cbba 100%);
    color: #fff;
    padding: 0.8rem;
    border-radius: 9px;
    font-weight: 500;
    font-size: 1.09rem;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.07);
    transition: background 0.3s;
}

.rate-label {
    letter-spacing: 0.5px;
    font-size: 1.13rem;
    font-weight: 600;
}

/* Button */
button[type="button"]:not(.swap-btn) {
    width: 100%;
    border: none;
    background: linear-gradient(99deg, #7fa2c5 29%, #9cccbc 87%);
    color: white;
    padding: 0.85rem;
    font-size: 1.16rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.22s, box-shadow 0.2s;
    font-weight: 600;
    margin-top: 1rem;
    box-shadow: 0 1.5px 7px rgba(44, 62, 80, 0.09);
}

button[type="button"]:not(.swap-btn):hover {
    background: linear-gradient(135deg, #7ea3a3 60%, #a4bbd3 100%);
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.13);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 500px) {
    .container {
        padding: 1.13rem 1.18rem 1.1rem 1.18rem;
        width: 98vw;
        border-radius: 11px;
    }

    .dropdown {
        flex-direction: column;
        gap: 0.6rem;
    }

    .swap-btn {
        margin: 0.6rem 0;
    }
}

/* Tooltip Styles for Swap Button */
.swap-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    top: 95%;
    transform: translate(-50%, 5px);
    background: #495ea7;
    color: #fff;
    font-size: 0.85rem;
    border-radius: 5px;
    padding: 0.28rem 0.7rem;
    opacity: 0.97;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 1.5px 8px rgba(120, 130, 180, 0.09);
    z-index: 2;
}