@import url("https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono&display=swap");
:root {
  --background-color: hsl(228, 8%, 12%);
  --text-color: hsl(0, 0%, 85%);
  --border-color: hsl(228, 8%, 20%);
  --transparency-bg: url(data:image/gif;base64,R0lGODlhDAAMAHAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQICgAAACwAAAAADAAMAIDX19f///8CFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==);
  --border-radius: .3rem;
  --regular-font: Roboto, sans-serif;
  --monospace-font: 'Roboto Mono', monospace;
  --form-field-bg: hsl(0, 0%, 95%);
  --form-field-color: hsl(228, 8%, 12%);
  --link-color: hsl(206, 89%, 45%);
}



input, textarea, pre, select, [data-preview] {
  background: var(--form-field-bg);
  color: var(--form-field-color);

}

code, input, textarea, pre, select, [data-preview] {
  font-family: var(--monospace-font);
}

input, textarea, pre, select, fieldset, [data-preview] {
  border: 0.1rem var(--border-color) solid;
}

pre {
  color: #262626;
  background: #d9d9d9;
  padding: 1rem;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

[data-preview] {
  height: 10rem;
  margin-bottom: 0.5rem;
  border-radius: var(--border-radius);
}
[data-preview]::before {
  border-right: 15rem solid white;
}

[data-color-form] {
  width: 30rem;
  margin-right: 2rem;
}
[data-color-form] .row {
  margin-bottom: 10px;
  line-height: 1.5;
}

[data-control-type="sliders"] {
  border: none;
  padding: 0;
  margin-top: 2rem;
}
[data-control-type="sliders"] .slider-control {
  position: relative;
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
}
[data-control-type="sliders"] label {
  width: 2rem;
  display: inline-block;
}
[data-control-type="sliders"] .unit {
  padding-left: .3rem;
}
[data-control-type="sliders"] input {
  border-radius: var(--border-radius);
}
[data-control-type="sliders"] input[type="number"] {
  font-family: var(--regular-font);
  height: 2.2rem;
  width: calc(5ch + 1.7rem);
  margin-left: 1rem;
  text-align: right;
  position: relative;
}
[data-control-type="sliders"] input[type="number"]::-webkit-inner-spin-button {
  opacity: 1;
}
[data-control-type="sliders"] input[type="range"] {
  -webkit-box-flex: 2;
          flex-grow: 2;
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  background: none;
  height: .6rem;
  padding: 0;
  outline: none;
}
[data-control-type="sliders"] input[type="range"][data-channel="cyan"] {
  background: #0ff;
}
[data-control-type="sliders"] input[type="range"][data-channel="magenta"] {
  background: #f0f;
}
[data-control-type="sliders"] input[type="range"][data-channel="yellow"] {
  background: #ff0;
}
[data-control-type="sliders"] input[type="range"][data-channel="key"] {
  background: #000;
}
[data-control-type="sliders"] input[type="range"][data-channel="alpha"] {
  z-index: 3;
}

.alpha-bg {
  position: relative;
  border-bottom: 2px solid #000;
  border-left: 2px solid #000;
  border-right: 2px solid #FFF;
  border-top: 2px solid #FFF;
}
.alpha-bg::before {
  content: "";
  display: block;
  z-index: -1;
  width: calc(100% - 0.2rem);
  height: calc(100% - 0.2rem);
  position: absolute;
  left: 0.1rem;
  top: 0.1rem;
  border-radius: inherit;
  background: var(--transparency-bg);
  background-size: 1rem;
}
.alpha-bg::after {
  content: "";
  display: block;
  z-index: -1;
  width: 100%;
  height: 100%;
  position: absolute;
  border: 1px var(--border-color) solid;
  border-radius: inherit;
  background: inherit;
}

main {
  display: -webkit-box;
  display: flex;
  padding: 2rem;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justify-content: center;
}
/*---------------------------------------------------------------------------------------------*/
#color2
{
  width: 100%;
  height: 200px;
}
/*----------------------------------------Rgba Converter-------------------------------------------*/
input[type="radio"]:focus + label {
  outline: 2px dashed #dd8800;
  outline-offset: 2px;
}

.sr, #app #swatch-container #dark-mode-toggle input[type="radio"] {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  left: -100vh;
  opacity: 0;
}


#mains {
  display: grid;
  place-items: center;
  min-height: 100vh;
  font-family: 'Spartan';
  font-size: 18px;
  box-sizing: border-box;
  color: #333;
  background: #ddd;
  text-align: left;
}

#app {
  width: 100%;
  max-width: 26rem;
  padding: 4rem 1rem;
  border: 2px solid;
  box-shadow: 0.5rem 0.5rem 0 rgba(0, 0, 0, 0.25);
  position: relative;
  background: #f8f8e8;
  margin: 3rem auto 0;
}
#app h1 {
  font-size: 1.8rem;
}
#app #swatch-container #dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .5rem;
  position: relative;
  z-index: 2;
  background: transparent;
}
#app #swatch-container #dark-mode-toggle input[type="radio"] + label {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  border-radius: 1.25rem;
  border: 2px solid;
  background: #f8f8e8;
  position: relative;
}
#app #swatch-container #dark-mode-toggle input[type="radio"] + label[for="dark"] {
  background: #333;
}
#app #swatch-container #dark-mode-toggle input[type="radio"] + label:not(:last-child) {
  margin-right: .5rem;
}
#app #swatch-container #dark-mode-toggle input[type="radio"]:checked + label:after {
  content: '';
  border-radius: 2rem;
  width: calc(1.5rem + 4px);
  height: calc(1.5rem + 4px);
  border: 2px solid;
  display: block;
  background: transparent;
  left: -6px;
  top: -6px;
  position: absolute;
}
#app #swatch {
  width: 8rem;
  height: 8rem;
  border-radius: 8rem;
  border: 2px solid;
  position: absolute;
  top: -4rem;
  left: calc(50% - 4rem);
  background-color: #f8f8e8;
}
#app ul {
  padding: 0;
  list-style-type: none;
}
#app ul li + li {
  margin-top: .5rem;
}
#app #app-form {
  margin: auto;
}
#app #app-form input, #app #app-form button {
  padding: .5em;
  border-radius: .25em;
  border: 2px solid;
  font-size: 1rem;
}
#app #app-form input, #app #app-form button {
  font-family: 'Fira Code', monospace;
}
#app #app-form button {
  padding: .5em 1em;
  font-weight: bold;
}
#app #app-form button:disabled {
  opacity: .4;
}
#app #app-form label, #app #app-form input, #app #app-form .label {
  display: block;
  width: 100%;
}
#app #app-form input {
  padding: .75em;
}
#app #app-form label, #app #app-form .label {
  margin: .25em 0;
  font-weight: bold;
}
#app #app-form #result {
  border: none;
  border-radius: 0;
  padding-left: 0;
  border-bottom: 2px solid;
}
#app #app-form .flex {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
@media (min-width: 440px) {
  #app #app-form .flex {
    flex-wrap: nowrap;
  }
  #app #app-form .flex > *:not(:last-child) {
    margin-right: 1rem;
  }
}
#app #app-form .group {
  margin-top: 3rem;
  text-align: left;
}
#app #app-form .method {
  font-weight: bold;
}
@media (min-width: 440px) {
  #app {
    padding: 4rem 3rem;
  }
}
@media (min-width: 768px) {
  #app {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-gap: 3rem;
    max-width: 768px;
    align-items: center;
    text-align: left;
    margin: 0 auto;
  }
  #app #swatch {
    position: relative;
    left: unset;
    top: unset;
    width: 12rem;
    height: 12rem;
    border-radius: 12rem;
  }
  #app #app-form {
    padding: 2rem 0 2rem 3rem;
    border-left: 2px dashed;
  }
}

.fade-enter-active, .fade-leave-active {
  transition: opacity .8s;
}

.fade-enter, .fade-leave-to {
  opacity: 0;
  transform: translateY(2rem);
}

#dark-mode-switch {
  position: absolute;
  z-index: 3;
  width: 3rem;
  height: 2rem;
  border: 2px solid;
  left: .5rem;
  top: .5rem;
  border-radius: 3rem;
}

#mains.dark {
  color: #fff;
  background: transparent;
}

#mains.dark #app {
  background: transparent;
  box-shadow: 0.5rem 0.5rem 0 rgba(0, 0, 0, 0.7);
}
#mains.dark #app #swatch-container #dark-mode-toggle input[type="radio"]:checked + label:after {
  border: 2px solid #fff;
}
#mains.dark #app #swatch-container #swatch {
  background-color: #333;
}