/* Global Reset & Typography */
:root {
    --primary-color: #4a90e2;
    --text-color: #333;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --input-bg: rgba(255, 255, 255, 0.6);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Premium gradient background */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-color);
    padding: 20px;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: #f8fbff;
    /* Very light cool white base */
}

/* Create the centered gradient blob */
.bg-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1000px;
    height: 60vh;
    /* Leave top and bottom whitespace */
    background: linear-gradient(120deg,
            rgba(72, 187, 120, 0.4) 0%,
            /* Green */
            rgba(66, 153, 225, 0.5) 50%,
            /* Blue */
            rgba(159, 122, 234, 0.4) 100%
            /* Purple */
        );
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    filter: blur(80px);
    /* Strong blur for soft diffused look */
}


/* Main Container with Glassmorphism */
.container {
    width: 100%;
    max-width: 900px;
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 40px;
    text-align: center;
}

h1 {
    font-weight: 700;
    color: indigo;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Converter Layout */
.converter-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .converter-grid {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Glass Cards for Blocks */
.block {
    flex: 1;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.block h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #2d3748;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 10px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
}

input,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    background: var(--input-bg);
    font-size: 1rem;
    color: #2d3748;
    outline: none;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
    border-color: var(--primary-color);
}

/* Buttons with shiny glass effect */
button {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    filter: brightness(1.1);
}

button:active {
    transform: translateY(1px);
}

/* Utility */
.icon-arrow {
    display: none;
    /* Hidden on mobile by default */
}

@media (min-width: 768px) {
    .converter-grid {
        position: relative;
    }

    .spacer {
        width: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: white;
        opacity: 0.8;
    }
}