:root {
    --bg-color: #0f172a;
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --text-primary: #ffffff;
    --text-muted: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --input-bg: rgba(15, 23, 42, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --focus-glow: rgba(59, 130, 246, 0.5);
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    color: var(--text-primary);
    position: relative;
}

/* Background animated gradient */
.background-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15), transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15), transparent 50%);
    transform: translate(-50%, -50%);
    animation: pulse 15s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    100% { transform: translate(-50%, -50%) rotate(180deg) scale(1.1); }
}

/* Glassmorphism Card */
.glass-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (hover: hover) {
    .glass-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.2);
    }
}

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

header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Converter Box */
.converter-box {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.25rem;
}

.field input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.field input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.field input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-glow), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.icon-swap {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    padding: 0.5rem 0;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.icon-swap:hover {
    opacity: 1;
    transform: rotate(180deg);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

.field-row {
    display: flex;
    gap: 1rem;
}

.field-row input {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 300;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

footer a:hover {
    color: #facc15;
    text-shadow: 0 0 12px rgba(250, 204, 21, 0.4);
}

/* Scrollbar and Selection styling */
::selection {
    background: var(--primary-color);
    color: white;
}
