:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #ffffff;
  --muted: #bababa;
  --border: #000000;
  --accent: #0a66c2;
  --ok-bg: #ebfaf0;
  --ok-text: #0f6a35;
  --err-bg: #fff1f2;
  --err-text: #a3122e;
  --load-bg: #eef4ff;
  --load-text: #194e96;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: #000000;
  color: var(--text);
}

.site-header {
  width: min(1400px, calc(100% - 32px));
  margin: 20px auto 6px;
  display: flex;
  justify-content: center;
}

.site-logo {
  width: min(900px, 95vw);
  height: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.button {
  --stone-50: #fafaf9;
  --stone-800: #292524;
  --yellow-400: #ffbf00;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  font-family: "Rubik", sans-serif;
  font-weight: bold;
  line-height: 1;
  padding: 1px;
  transform: translate(-4px, -4px);
  outline: 2px solid transparent;
  outline-offset: 5px;
  border: 0;
  border-radius: 9999px;
  background-color: var(--stone-800);
  color: var(--stone-800);
  transition: transform 150ms ease, box-shadow 150ms ease;
  text-align: center;
  box-shadow:
    0.5px 0.5px 0 0 var(--stone-800),
    1px 1px 0 0 var(--stone-800),
    1.5px 1.5px 0 0 var(--stone-800),
    2px 2px 0 0 var(--stone-800),
    2.5px 2.5px 0 0 var(--stone-800),
    3px 3px 0 0 var(--stone-800),
    0 0 0 2px var(--stone-50),
    0.5px 0.5px 0 2px var(--stone-50),
    1px 1px 0 2px var(--stone-50),
    1.5px 1.5px 0 2px var(--stone-50),
    2px 2px 0 2px var(--stone-50),
    2.5px 2.5px 0 2px var(--stone-50),
    3px 3px 0 2px var(--stone-50),
    3.5px 3.5px 0 2px var(--stone-50),
    4px 4px 0 2px var(--stone-50);
}

.button:hover {
  transform: translate(0, 0);
  box-shadow: 0 0 0 2px var(--stone-50);
}

.button:active,
.button:focus-visible {
  outline-color: var(--yellow-400);
}

.button:focus-visible {
  outline-style: dashed;
}

.button > div {
  position: relative;
  pointer-events: none;
  background-color: var(--yellow-400);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
}

.button > div::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  opacity: 0.5;
  background-image:
    radial-gradient(rgb(255 255 255 / 80%) 20%, transparent 20%),
    radial-gradient(rgb(255 255 255 / 100%) 20%, transparent 20%);
  background-position: 0 0, 4px 4px;
  background-size: 8px 8px;
  mix-blend-mode: hard-light;
  animation: dots 0.5s infinite linear;
}

.button > div > span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  gap: 0.25rem;
  filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.25));
}

.button:active > div > span {
  transform: translateY(2px);
}

.top-banner {
  width: min(800px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 12px 14px;
  border-radius: 0px;
  color: #e5e7eb;
  text-align: center;
  font-size: 20px;
  font: inherit;
}

.top-banner a {
  color: #ffcc00;
  text-decoration: none;
}

.top-banner a:hover {
  color: #ffd84d;
}


.wrap {
  width: min(680px, calc(100% - 32px));
  margin: 20px auto 48px;
  background: linear-gradient(180deg, #252525 0%, #252525 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

h1 { margin: 0 0 6px; }
.source-word.source-youtube { color: #ff2b2b; }
.source-word.source-soundcloud { color: #ff6a00; }
.source-word.source-tiktok { color: #000000; }
.source-word.source-instagram { color: rgb(255, 41, 148); }
.source-word.source-twitch { color: rgb(132, 0, 255); }
.hint { margin: 0 0 20px; color: var(--muted); }

.source-picker {
  margin: 0 0 18px;
}

.source-label {
  margin: 0 0 8px;
  font-weight: 600;
  color: #f2f2f2;
}

.source-picker .links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-picker .icons-social-media {
  align-items: center;
  margin-top: 10px;
  width: 36px;
  height: 36px;
  padding: 5px;
  border-radius: 9px;
  cursor: pointer !important;
  transition: 300ms all ease-in-out;
  position: relative;
  fill: #ffffff;
}

.source-picker .icons-social-media:focus,
.source-picker .icons-social-media:focus-visible {
  outline: none;
  box-shadow: none;
}

.source-picker .icons-social-media.active-source {
  box-shadow: none;
}

.source-picker .icons-social-media:hover {
  translate: 0 -10px;
}

.source-picker #instagram,
.source-picker #soundcloud,
.source-picker #tiktok,
.source-picker #youtube,
.source-picker #twitch {
  transition: 300ms all ease-in-out;
  clip-path: circle(65%);
}

.source-picker #soundcloud:hover {
  background-color: #ff6a00;
}

.source-picker #soundcloud.active-source {
  background-color: #ff6a00;
}

.source-picker #instagram:hover {
  background-color: rgb(255, 41, 148);
}

.source-picker #instagram.active-source {
  background-color: rgb(255, 41, 148);
}

.source-picker #youtube:hover {
  background-color: rgb(255, 41, 41);
}

.source-picker #youtube.active-source {
  background-color: rgb(255, 41, 41);
}

.source-picker #tiktok:hover {
  background-color: rgb(0, 0, 0);
}

.source-picker #tiktok.active-source {
  background-color: rgb(0, 0, 0);
}

.source-picker #twitch:hover {
  background-color: rgb(132, 0, 255);
}

.source-picker #twitch.active-source {
  background-color: rgb(132, 0, 255);
}

form {
  display: grid;
  gap: 10px;
}

label { font-weight: 600; }

input, select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
}

.bitrate-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.format-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.format-option {
  display: none;
}

.bitrate-option {
  display: none;
}

.switch {
  position: relative;
  width: fit-content;
  min-width: 92px;
  padding: 10px 20px;
  background-color: rgb(46, 46, 46);
  border-radius: 50px;
  z-index: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  font-size: 0.9em;
  font-weight: 600;
  transition: all 0.3s;
}

.switch.switch-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.switch svg path {
  fill: white;
}

.bitrate-option:checked + .switch {
  background-color: #3c00ff;;
  box-shadow: 0px 0px 40px #3c00ff;
}

.format-option:checked + .switch {
  background-color: #3c00ff;
  box-shadow: 0px 0px 40px #3c00ff;
}

.cssbuttons-io {
  position: relative;
  width: 100%;
  margin-top: 4px;
  font-family: inherit;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.05em;
  border-radius: 0.8em;
  cursor: pointer;
  border: none;
  background: linear-gradient(to right, #8e2de2, #4a00e0);
  color: ghostwhite;
  overflow: hidden;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.cssbuttons-io .btn-label {
  position: relative;
  z-index: 10;
  transition: opacity 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
}

.cssbuttons-io .btn-loader {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  font-family: inherit;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.05em;
}

.cssbuttons-io .loader-prefix {
  color: #ffffff;
  opacity: 1;
  line-height: 1;
}

.cssbuttons-io .words {
  overflow: hidden;
  position: relative;
  height: 1.2em;
  line-height: 1.2em;
  width: 10.5ch;
  text-align: left;
  flex: 0 0 10.5ch;
}

.cssbuttons-io .words::after {
  content: none;
}

.cssbuttons-io .word {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
  padding-left: 0;
  background: linear-gradient(to right, #8e2de2, #4a00e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: spin_4991 4s infinite;
}

.cssbuttons-io::before,
.cssbuttons-io::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.cssbuttons-io::before {
  content: "";
  background: #000;
  width: 120%;
  left: -10%;
  transform: skew(30deg);
  transition: transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
}

.cssbuttons-io:hover::before {
  transform: translate3d(100%, 0, 0);
}

.cssbuttons-io:active {
  transform: scale(0.95);
  filter: brightness(0.98);
}

.cssbuttons-io.is-loading .btn-label {
  opacity: 0;
}

.cssbuttons-io.is-loading .btn-loader {
  display: inline-flex;
}

.cssbuttons-io:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: #000;
  color: ghostwhite;
}

.cssbuttons-io.is-loading {
  background: #000;
  color: ghostwhite;
}

@keyframes dots {
  0% {
    background-position: 0 0, 4px 4px;
  }
  100% {
    background-position: 8px 0, 12px 4px;
  }
}

@keyframes spin_4991 {
  10% { transform: translateY(-102%); }
  25% { transform: translateY(-100%); }
  35% { transform: translateY(-202%); }
  50% { transform: translateY(-200%); }
  60% { transform: translateY(-302%); }
  75% { transform: translateY(-300%); }
  85% { transform: translateY(-402%); }
  100% { transform: translateY(-400%); }
}

.status {
  margin: 16px 0 0;
  white-space: pre-wrap;
  border-radius: 10px;
  padding: 12px;
  min-height: 72px;
  border: 1px solid var(--border);
}

.status.idle {
  background: #f8fafc;
  color: #334155;
}

.status.loading {
  background: var(--load-bg);
  color: var(--load-text);
}

.status.success {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.status.error {
  background: var(--err-bg);
  color: var(--err-text);
}

.howto {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto 48px;
  color: #e8e8e8;
  line-height: 1.65;
}

.howto h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.howto h3 {
  margin: 20px 0 10px;
  font-size: 20px;
}

.howto p {
  margin: 0 0 14px;
  font-size: 17px;
}

.howto ol {
  margin: 0 0 14px 28px;
  padding: 0;
}

.howto li {
  margin: 0 0 8px;
  font-size: 17px;
}

.howto-note code {
  color: #ffffff;
}
