:root {
    margin: 0;
    padding: 0;    
    box-sizing: border-box;
    font-family: JetBrainsMono, monospace;
    background: #242424;
    display: grid;
    place-items: center;
}

select:hover, button:hover { cursor: pointer; }

button:hover { 
text-decoration: underline;}

.header {
    color: white;
    text-align: center;
    padding: 4rem 0 3rem 0;
}

.header h1 { 
    display: none;
}

.header h2 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 500;
}

#hacked:hover { cursor: pointer; }

.selector {
    padding-bottom: 1rem;
}


.selector label {
    color: white;
    font-size: 0.875rem;
}

.selector select {
    font-family: JetBrainsMono, monospace;
    background: white;
    border: none;
    border-radius: 0.25rem;
}

.converter {
    padding: 2rem 4rem;
    width: 16rem;
    height: 26rem;
    background: white;
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media screen and (min-width: 768px){
    .converter {
        width: 32rem;
        height: 14rem;    
    }
}

.converter .inputs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media screen and (min-width: 768px){
    .converter .inputs {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
    }
}

.converter input, .converter button {
    font-family: JetBrainsMono, monospace;
    border: 1px solid gray;
    border-radius: 0.25rem;
    transition: 0.3s;
}

.converter input {
    height: 32px;
    width: 250px;
    padding: 0 0.5rem;
}

.converter input:focus {
    outline: none;
    border-color: royalblue;
}

@media screen and (min-width: 768px){
    .converter input {
        width: 400px;
    }
}

.converter .text-box label { display: none; }

.converter button {
    height: 34px;
    width: 100px;
    background-color: white;
}

#output {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
}

@media screen and (min-width: 768px){
    #output {
        flex-direction: row;
        justify-content: space-between;
    }
}

#output button {
    height: 24px;
    width: 48px;
    border: 1px solid gray;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: 0.3s;
}

#output button:hover, .converter button:hover {
    text-decoration: none;
}

#output button:active, .converter button:active {
    background-color: lightblue;
    border-color: royalblue ;
}

#color-preview {
    width: 100px;
    height: 100px;
    border: 1px solid gray;
    border-radius: 0.25rem;
}

@media screen and (min-width: 768px){
    #color-preview {
        width: 150px;
        height: 150px;
    }
}

.footer {
    padding-top: 1rem;
    font-size: 0.875rem;
    display: flex;
    justify-content: center;
}

.footer p {
    color: white;
}

.footer a, .footer a:visited {
    color: inherit;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.error {
    color: indianred;
}

@font-face {
    font-family: JetBrainsMono;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("./assets/fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype");
  }
  
  @font-face {
    font-family: JetBrainsMono;
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("./assets/fonts/JetBrainsMono-Italic-VariableFont_wght.ttf") format("truetype");
  }