:root {
    --bg-color: #0f0c29;
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #7b4397;
    --accent-gradient: linear-gradient(135deg, #7b4397, #dc2430);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: float 10s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #7b4397;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: #dc2430;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: #24243e;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

/* Glass Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--card-shadow);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-weight: 700;
    font-size: 2rem;
}

.accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    /* Vendor prefix for Saf/Chrome */
    background-clip: text;
    /* Standard property */
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label,
.currency-select-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input[type="number"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-size: 1.2rem;
    font-family: var(--font-family);
    transition: 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #dc2430;
    background: rgba(255, 255, 255, 0.1);
}

.currency-row {
    display: flex;
    align-items: flex-end;
    /* Align bottom to match button with inputs */
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: space-between;
}

.currency-select-group {
    flex: 1;
    min-width: 0;
    /* Prevent overflow */
}

.currency-flag {
    width: 24px;
    height: 16px;
    margin-right: 8px;
    object-fit: cover;
    border-radius: 2px;
}

.combobox-container {
    position: relative;
    width: 100%;
}

.combobox-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem 0.8rem;
    cursor: text;
    transition: 0.3s;
}

.combobox-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.currency-input {
    background: transparent;
    border: none;
    color: white;
    font-family: var(--font-family);
    font-size: 1rem;
    width: 100%;
    margin-left: 8px;
    font-weight: 500;
    text-transform: uppercase;
}

.currency-input:focus {
    outline: none;
}

.chevron {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 8px;
    pointer-events: none;
}

/* Options List (Dropdown) */
.options-list {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    max-height: 250px;
    background: #1a1a2e;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow-y: auto;
    z-index: 100;
    list-style: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    padding: 5px;
}

.options-list.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.options-list li {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    color: #e0e0e0;
}

.options-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.options-list li img {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

/* Scrollbar */
.options-list::-webkit-scrollbar {
    width: 6px;
}

.options-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Swap Button */
#swap-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s all ease;
    flex-shrink: 0;
    margin-bottom: 4px;
    /* Slight adjustment */
}

#swap-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg);
}

/* Result Display */
.result-display {
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

#result-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.sub-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Chart */
.chart-box {
    margin-top: 1rem;
    position: relative;
    height: 200px;
    width: 100%;
}