:root {
    --color-bg: #f4f4f4;
    --color-bg-card: #ffffff;
    --color-text: #3D3D3D;
    --color-card-heading: #5A537B;
    --color-hero-bg: #6943fe;
    --border-radius: .5rem;
}

[data-theme="dark"] {
    --color-bg: #273549;
    --color-bg-card: #1F2937;
    --color-text: #e0e0e0;
    --color-card-heading: #CCC1FF;
}

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

body {
    font-family: "Inter", sans-serif;
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    background: var(--color-bg);
    color: var(--color-text);
}

body, .section, .hero, input, button, main {
    transition: background 0.3s ease,
    color 0.3s ease,
    border 0.3s ease;
}

h1 {
    color: white;
    font-size: 1.8rem;
}

h2 {
    color: var(--color-card-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

input {
    font-family: "Inter", sans-serif;
    height: 5rem;
    background-color: var(--color-hero-bg);
    border: #B295FF 2px solid;
    color: white;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 3.5rem;
    font-weight: bold;
}

input:hover {
    outline: #CCC1FF 2px solid;
}

input:focus {
    background-color: var(--color-hero-bg);
    color: white;
}

input::placeholder {
    color: white;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--color-hero-bg) inset !important;
    -webkit-text-fill-color: white !important;
}

input[type=number] {
    -moz-appearance: textfield;
}

button {
    padding: .5rem 1.4rem;
    background-color: white;
    border: 1px solid white;
    border-radius: var(--border-radius);
    color: #3D3D3D;
    cursor: pointer;
    font-family: "Inter", sans-serif;
}

button:hover {
    filter: brightness(1.2);
    border: 1px solid #273549;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-hero-bg);
    padding: 4rem 1rem 2rem 1rem;
    color: white;
    gap: 1rem;
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--color-bg);
    padding: 1.5rem 1rem;
}

.converter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 10rem;
}

.section {
    background: var(--color-bg-card);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 32rem;
    border-radius: var(--border-radius);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

#toggle-theme-btn {
    position: absolute;
    right: 1rem;
    top: 1rem;
}

#convert-btn {
    padding: .9rem 2rem;
    font-size: 1.2rem;
}
