:root {
    --primary: #7c3aed;
    --glass: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --bg-dark: #0f172a;
    --dropdown-bg: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-dark);
    color: #fff;
    overflow: hidden; /* Prevent scrolling of body when dropdown opens */
}

/* Background Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: #4c1d95; border-radius: 50%; }
.blob-2 { bottom: -10%; right: -10%; width: 400px; height: 400px; background: #db2777; border-radius: 50%; }

.container {
    width: 420px;
    padding: 30px;
    border-radius: 20px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

header { text-align: center; margin-bottom: 30px; }
.logo-area { display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--primary); }
header h2 { font-size: 1.5rem; color: #fff; }
.last-updated { font-size: 0.8rem; opacity: 0.7; margin-top: 5px; }

form .amount-box p, form .drop-list p { font-size: 0.9rem; margin-bottom: 8px; opacity: 0.9; }

form input#amount-input {
    height: 50px;
    width: 100%;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    padding: 0 15px;
    font-size: 1.2rem;
    color: #fff;
    outline: none;
    transition: 0.3s;
}
form input#amount-input:focus { border-color: var(--primary); background: rgba(255,255,255,0.2); }

/* --- CUSTOM DROPDOWN STYLES --- */
.drop-list { display: flex; justify-content: space-between; align-items: center; margin-top: 25px; }
.from, .to { width: 45%; }

.select-menu { position: relative; width: 100%; }

.select-btn {
    display: flex;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    align-items: center;
    cursor: pointer;
    padding: 0 15px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.select-btn:hover { background: rgba(255,255,255,0.2); }
.select-btn img { width: 25px; margin-right: 10px; }
.select-btn .sBtn-text { font-size: 1.1rem; font-weight: 500; white-space: nowrap; }
.select-btn i { font-size: 1rem; transition: 0.3s; margin-left: auto; }

/* Rotate arrow when open */
.select-menu.active .select-btn i { transform: rotate(-180deg); }

/* The Dropdown List */
.options {
    position: absolute;
    top: 60px;
    width: 100%;
    background: var(--dropdown-bg);
    border-radius: 10px;
    padding: 10px;
    display: none; /* Hidden by default */
    z-index: 99;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

.select-menu.active .options { display: block; animation: fadeIn 0.2s ease; }

/* Search Box inside Dropdown */
.search-box {
    position: relative;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.search-box input {
    width: 100%;
    height: 40px;
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 0 10px 0 35px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}
.search-box i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%) translateY(-5px); /* Adjusting for padding */
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Scrollable List */
.options ul { max-height: 250px; overflow-y: auto; padding-top: 10px; }
.options li {
    display: flex;
    height: 45px;
    align-items: center;
    cursor: pointer;
    padding: 0 10px;
    border-radius: 5px;
    transition: 0.2s;
}
.options li:hover { background: var(--primary); }
.options li img { width: 25px; margin-right: 10px; }

/* Scrollbar Styling */
.options ul::-webkit-scrollbar { width: 5px; }
.options ul::-webkit-scrollbar-track { background: transparent; }
.options ul::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

/* --- ICON & RESULT --- */
.icon {
    font-size: 1.5rem;
    cursor: pointer;
    margin-top: 25px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: 0.3s;
}
.icon:hover { color: var(--primary); background: rgba(255,255,255,0.1); }
.rotate { transform: rotate(180deg); }

.result-box {
    margin-top: 30px;
    text-align: center;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 15px;
}
.final-result { font-size: 2.5rem; font-weight: 600; color: #fff; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }