/* Global Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

body,
h1,
p {
    margin-block-end: 0;
}

body {
    min-height: 100vh;
    line-height: 1.5;
}

h1,
button,
input,
label {
    line-height: 1.1;
}

input,
button {
    font-family: inherit;
}

/* Import Custom Fonts */
@font-face {
    font-display: swap;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: url('./assets/fonts/roboto-v51-latin-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    src: url('./assets/fonts/roboto-v51-latin-600.woff2') format('woff2');
}

/* Root Changes */
:root {
    /* Colors */
    --clr-black: hsl(0, 0%, 0%);
    --clr-white: hsl(0, 0%, 100%);

    --clr-btnBackground: hsl(0, 100%, 60%);
    --clr-btnBackground-Hover: hsl(0, 100%, 40%);

    --clr-title: hsl(223, 100%, 64%);
    --clr-formShadow: hsla(0, 0%, 0%, 0.3);

    --clr-bodyBG: hsl(0, 0%, 95%);

    /* Font */
    --FF: Roboto, sans-serif;

    --FS-16: 1rem;    /* 16px */
    --FS-18: 1.1rem;  /* 18px */
    --FS-24: 1.5rem;  /* 28px */

    --FW-normal: normal;
    --FW-600: 600;
}

/* Typography */
body {
    font-family: var(--FF);
    font-size: var(--FS-16);
}

body,
#form,
#tempInput {
    text-align: center;
}

.title,
#tempInput,
#result {
    font-size: var(--FS-24);
}

.title,
.toFahrenheit,
.toCelsius,
#result {
    font-weight: var(--FW-600);
}

.title {
    color: var(--clr-title);
}

.toFahrenheit,
.toCelsius,
.submitBtn {
    font-size: var(--FS-18);
}

.submitBtn {
    color: var(--clr-white);
}

/* General */
body {
    display: flex;
    background-color: var(--clr-bodyBG);
}

form {
    background-color: var(--clr-white);
    max-width: 350px;
    margin: auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 5px 5px 15px var(--clr-formShadow);
}

#tempInput {
    width: 50%;
    border-radius: 4px;
    margin: 15px auto 15px;
}

button {
    margin-top: 15px;
    background-color: var(--clr-btnBackground);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

button:hover {
    background-color: var(--clr-btnBackground-Hover);
}

#result {
    margin-top: 10px;
}