@import url(https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap);

@keyframes gradient-animation_2 {
  0% {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

:root {
  --primary: #212121;
  --secondary: #323232;
  --highlight: #ff1e1e;
  --light: #eeeeee;
  --transition-speed: 0.4s;
}

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

a,
body {
  color: var(--light);
}

body {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: var(--primary);
  padding: 30px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 10px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  text-align: center;
}

footer div {
  gap: 5px;
}

footer a {
  text-decoration: underline;
}

h1 {
  margin-bottom: 20px;
}

input[type="color"] {
  initial-value: #fff;
  border: 0;
  appearance: none;
  inline-size: 30px;
  block-size: 30px;
  background-color: transparent;
}

.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider,
.slider:before {
  position: absolute;
  transition: var(--transition-speed);
}

.slider {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--highlight);
  border-radius: 34px;
}

.slider:before {
  content: "";
  height: 12px;
  width: 12px;
  left: 4px;
  bottom: 4px;
  background-color: var(--light);
  border-radius: 50%;
}

input:checked+.slider:before {
  transform: translateX(12px);
}

#form {
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  max-width: 480px;
  width: 100%;
}

input[type="text"],
select {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 16px;
}

button,
input[type="text"],
select {
  width: 100%;
  display: inline-block;
  box-sizing: border-box;
}

input[type="text"]:focus,
select:focus {
  outline: 0;
}

button {
  font-size: 17px;
  padding: 0.5em 2em;
  border: transparent;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  background: var(--highlight);
  color: #fff;
  border-radius: 4px;
}

button:hover {
  cursor: pointer;
}

button:active {
  transform: translate(0, 0.2em);
}

#preview {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  margin-bottom: 40px;
}

#preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.color_picker_wrapper {
  display: flex;
  justify-content: flex-end;
  gap: 0;
}

.color_code {
  width: 80px !important;
  background-color: var(--primary);
  color: var(--light);
  border: 0;
  text-transform: uppercase;
}

.switcher {
  justify-content: center;
}

.switcher span[class^="text"] {
  margin: 0 10px;
}

#gh_stats {
  display: none;
}

.switcher,
div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

div {
  flex-direction: row;
  margin: 5px 0;
}

.checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--highlight);
  border-radius: 5px;
  background-color: transparent;
  display: inline-block;
  position: relative;
  cursor: pointer;
  margin: 0;
}

.checkbox:before {
  content: "";
  background-color: var(--highlight);
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 3px;
  transition: all 0.1s ease-in-out;
}

.checkbox:checked:before {
  transform: translate(-50%, -50%) scale(1);
}

div .loader {
  display: none;
  position: relative;
  width: 450px;
  height: 195px;
  margin-bottom: 10px;
  border: 1px solid #d3d3d3;
  padding: 15px;
  background-color: #e3e3e3;
  overflow: hidden;
}

div .loader:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(110deg,
      rgba(227, 227, 227, 0) 0,
      rgba(227, 227, 227, 0) 40%,
      rgba(227, 227, 227, 0.5) 50%,
      rgba(227, 227, 227, 0) 60%,
      rgba(227, 227, 227, 0) 100%);

  animation: gradient-animation_2 1.2s linear infinite;
}

div .loader .wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  align-items: baseline;
}

div .loader .wrapper>div {
  background-color: #cacaca;
}

div .loader .circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

div .loader .button {
  display: inline-block;
  height: 32px;
  width: 75px;
}

div .loader .line-1,
div .loader .line-2 {
  position: absolute;
  top: 11px;
  left: 58px;
  height: 10px;
  width: 100px;
}

div .loader .line-2 {
  top: 34px;
  width: 150px;
}

div .loader .line-3,
div .loader .line-4 {
  position: absolute;
  top: 57px;
  left: 0;
  height: 10px;
  width: 100%;
}

div .loader .line-4 {
  top: 80px;
  width: 92%;
}

.color-picker-wrapper {
  gap: 8px;
}

.color-picker-wrapper>div {
  gap: 10px;
}

.checkboxs-wrapper>div {
  display: flex;
  gap: 8px;
}

.select-wrapper,
.checkboxs-wrapper,
.inputs-container>div {
  display: flex;
  gap: 10px;
}

.buttons-wrapper {
  display: flex;
  gap: 10px;
}

@media (max-width: 900px) {
  .inputs-container {
    flex-direction: column;
    gap: 10px;
  }

  .inputs-container>div {
    width: 100%;
  }

  .buttons-wrapper {
    flex-direction: column;
  }

  .color-picker-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  .color-picker-wrapper>div {
    width: 100%;
    justify-content: initial;
  }
}

@media (max-width: 600px) {
  body {
    padding: 15px;
  }

  footer {
    flex-direction: column;
    font-size: 14px;
    gap: 5px;
  }

  footer div {
    flex-direction: row;
    gap: 2px;
  }

  h1 {
    font-size: 1.5em;
  }

  #form {
    max-width: 100%;
  }

  button,
  input[type="text"],
  select {
    font-size: 14px;
  }

  .switch {
    width: 24px;
    height: 15px;
  }

  .slider:before {
    height: 9px;
    width: 9px;
  }

  input:checked+.slider:before {
    transform: translateX(9px);
  }
}