@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --primary: #7f00ff;
    --secondary: #e100ff;
    --bg-dark: #0f0c29;
    --glass: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: white;
    padding: 20px;
}

.glass-container {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
    letter-spacing: 1px;
}

header p {
    font-size: 0.8rem;
    opacity: 0.7;
}

.converter-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group label,
.select-box label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #ccc;
}

input,
select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
}

.selection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.select-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.select-container img {
    width: 30px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
}

.select-container select {
    border: none;
    background: transparent;
    cursor: pointer;
}

.reverse-icon {
    margin-top: 25px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
    color: var(--secondary);
}

.reverse-icon:hover {
    transform: rotate(180deg);
}

.result-section {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

/* Fix for the Dropdown List Visibility */
select option {
    background-color: #24243e;
    color: white;
    padding: 10px;
}

/* Improve Select Box Hover State */
.select-container:hover {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
}

/* Focus state for input */
input:focus,
select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(225, 0, 255, 0.2);
}

#exchange-rate-text {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #00d2ff;
}

#total-result {
    font-size: 2rem;
    font-weight: 600;
}

.main-btn {
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(127, 0, 255, 0.4);
}

footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.85rem;
}

.dev-credit span {
    display: block;
    opacity: 0.6;
}

.github-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    transition: 0.3s;
    padding: 5px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.github-link:hover {
    background: white;
    color: black;
}

/* Input Specifics - Fixes the vendorPrefix warning */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    /* Add this line to satisfy the standard */
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    /* For Firefox */
    appearance: textfield;
    /* Standard property */
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
}


@media (max-width: 400px) {
    .glass-container {
        padding: 20px;
    }
}