:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --transition: all 0.3s ease;
    --error-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.amount-container {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.currency-selectors {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align items to the bottom so inputs line up */
    margin-bottom: 1.5rem;
    gap: 10px;
}

.currency-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.select-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.select-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.select-wrapper img {
    width: 24px;
    margin-right: 8px;
}

.select-wrapper select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    -webkit-appearance: none; /* Remove default arrow in some browsers if desired, but here we keep it simple */
}

.swap-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding-bottom: 10px; /* Align visually with inputs */
    transition: var(--transition);
}

.swap-icon:hover {
    transform: rotate(180deg);
    color: var(--primary-hover);
}

button {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.message-area {
    min-height: 24px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--error-color);
    font-weight: 500;
    text-align: left;
}

.result-container {
    margin-top: 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.result-container.active {
    opacity: 1;
    transform: translateY(0);
}

.rate-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Scrollbar styling for selects */
select {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}
