:root {
  --color-bg: rgb(10, 1, 17);
  --color-black: #000000;
  --color-white: #ffffff;
  --color-purple: #6a0dad;
  --color-purple-dark: #4a0a7a;
  --color-panel: #1a1224;
}

main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

body {
  background-color: var(--color-bg);
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

}

h1 {
  font-size: 40px;
}

.progress-bar.pulsing {
  width: 30%;
  animation: pulseLoading 1.2s ease-in-out infinite;
}

@keyframes pulseLoading {
  0%{
    margin-left: 0%;
  }
  50% {
    margin-left: 70%;
  }

  100% {
    margin-left: 0%;
  }
}

.button-27 {
  appearance: none;
  background-color: var(--color-black);
  border: 2px solid var(--color-purple);
  border-radius: 15px;
  box-sizing: border-box;
  color: var(--color-white);
  cursor: pointer;
  display: inline-block;
  font-family: Roobert,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  margin: 0px;
  min-height: 60px;
  min-width: 0;
  outline: none;
  padding: 16px 24px;
  text-align: center;
  text-decoration: none;
  transition: all 300ms cubic-bezier(.23, 1, 0.32, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  width: 200px;
  will-change: transform;
}

.button-27:disabled {
  pointer-events: none;
}

.button-27:hover {
  box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
  transform: translateY(-2px);
}

.button-27:active {
  box-shadow: none;
  transform: translateY(0);
}

.button-27[hidden] {
display: none;
}

.infobox {
  display: flex;
  background-color: var(--color-black);
  border: 2px solid var(--color-purple-dark);
  border-radius: 15px;
  color: var(--color-white); 
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 12px;
  padding: 12px 12px; 
  margin: 10px 40px 0;
  width: 350px;
  height: 30px;
  text-align: center;
  justify-content: center;
  align-items: center;
  display: none;
}

.progress-container {
  width: 400px;
  max-width: 90%;
  background-color: #333;
  height: 20px;
  border-radius: 10px;
  margin: 20px auto 0;
  display: none;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: rgb(12, 223, 12);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 600  ;
}

/* From Uiverse.io by SpatexDEV */ 
.inputbutton {
  border: none;
  display: flex;
  padding: 0.75rem 1.5rem;
  background-color: #488aec;
  color: var(--color-white);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  vertical-align: middle;
  align-items: center;
  border-radius: 0.5rem;
  user-select: none;
  gap: 0.75rem;
  box-shadow:
    0 4px 6px -1px #488aec31,
    0 2px 4px -1px #488aec17;
  transition: all 0.6s ease;
}

.inputbutton:hover {
  box-shadow:
    0 10px 15px -3px #488aec4f,
    0 4px 6px -2px #488aec17;
}

.inputbutton:focus,
.inputbutton:active {
  opacity: 0.85;
  box-shadow: none;
}

.inputbutton svg {
  width: 1.25rem;
  height: 1.25rem;
}

.select-style {
  appearance: none;
  background-color: var(--color-black);
  border: 2px solid var(--color-purple-dark);
  border-radius: 15px;
  color: var(--color-white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 16px 24px;
  min-height: 60px;
  box-sizing: border-box;
  text-align: center;
  cursor: pointer;
  outline: none;
}

.dropzone {
  width: 500px;
  max-width: 90%;
  height: 400px;
  margin: 50px 20px 0;
  background-color: var(--color-panel);
  border: 2px dashed #666666;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--color-white);
  cursor: pointer;
  transition: border-color 0.2s ease;
  color: var(--color-white);
  perspective: 500px;
}

.dropzone:hover {
  border-color: var(--color-purple);
}

.dropzone-sub {
  font-size: 16px;
  color: var(--color-purple);
  font-weight: bold;
}

.dropzone-sub[hidden] {
  display: none;
}

#dropzone-sub {
  animation: anim 3s ease-in-out infinite;
}

#dropzone-clickordrag {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  min-width: 0;
  animation: typing 5s steps(40, end) infinite;
}

@keyframes typing{
  from { width: 0;}
  to { width: 100%}
}

@keyframes anim {
    0% {
      transform: translateY(0px) translateZ(0px);
      color: var(--color-white);
    }
    50% {
      transform: translateY(10px) translateZ(50px);
      color: var(--color-purple);
    }

    100% {
      transform: translateY(0px) translateZ(0px);
      color: var(--color-white);
    }
}

#ffvert_panel {
  display: grid;
  grid-template-columns: 500px 1fr;
  grid-template-rows: min-content 1fr;
  align-items: center;
  grid-template-areas:
    "dropzone title"
    "dropzone options";
  gap: 20px;
  background-color: rgb(211, 166, 253);
  width: 1000px;
  min-height: 500px;
  border-radius: 50px;
  margin: 100px 60px;
  border: 3px dashed var(--color-purple);
  padding: 20px;
}

#FFvert_text { grid-area: title; }
#dropzone { grid-area: dropzone; }
#optionsPanel { grid-area: options; }

#FFvert_text {
  color: var(--color-white);
  text-shadow: 0 0 10px var(--color-purple);
  font-size: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 0;
  color: var(--color-purple);
  margin-top: 30px;
}

#FFvert_text.glitch {
  animation: glitchEffect 0.3s steps(2, end);
}

@keyframes glitchEffect {
  0%   { text-shadow: 2px 0 var(--color-purple), -2px 0 cyan; transform: translate(0, 0); }
  25%  { text-shadow: -3px 0 var(--color-purple), 3px 0 cyan; transform: translate(-2px, 1px); }
  50%  { text-shadow: 3px 0 var(--color-purple), -3px 0 cyan; transform: translate(2px, -1px); }
  75%  { text-shadow: -2px 0 var(--color-purple), 2px 0 cyan; transform: translate(-1px, 1px); }
  100% { text-shadow: 0 0 10px var(--color-purple); transform: translate(0, 0); }
}

#dropzone {
  grid-area: dropzone;
  align-self: start;
}

/* Buttons */
#optionsPanel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  height: 100%;
  flex: 1;
  
}

#formatselect {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 200px;
  width: 300px;
  background-color: var(--color-purple-dark);
  border-style: solid;
  border-color: rgb(0, 0, 0);
}

#resolutionselect {
  background-color: chocolate;
  border-style: solid;
  border-color: rgb(0, 0, 0);
}

#conbutton {
  background-color: green;
  width: 300px;
  margin: 0px auto;
  border-style: solid;
  border-color: rgb(0, 0, 0);
}

#downloadoutput{
  background-color: red;
  width: 300px;
  border-style: solid;
  border-color: rgb(0, 0, 0);
}

/* Bar */

#progressContainer {
  height: 30px;
  border-color: black;
  border-style: solid;
  border-width: 2px;
  margin: 0px auto 0;
  min-height: 30px;
}

#yt-dlp-progresstext {
  text-align: center;
  font-size: 12px;
}

#yt-progressContainer {
  height: 30px;
  border-color: black;
  border-style: solid;
  border-width: 2px;
  margin: 0px auto 0;
  min-height: 30px;
  width: 70%;
  margin-top: 10px;
}

#yt-dlp-progressbar1{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  height: 100%;
}


/* Youtube download panel*/
#yt-dlp-panel {
}

#yt-dlp-background {
  width: 500px;
  min-height: 547px;
  border-radius: 50px;
  border: 3px dashed red;
  background-color: rgb(255, 125, 125);


}

#yt-dlp-text {
animation: glitchEffect_ytdlp 2s ease-in-out infinite;

}

@keyframes glitchEffect_ytdlp {
  0%   { text-shadow: 2px 0 var(--color-black), -2px 0 rgb(231, 10, 10); transform: translate(0, 0); }
  25%  { text-shadow: -3px 0 var(--color-black), 3px 0 rgb(231, 10, 10); transform: translate(-2px, 1px); }
  50%  { text-shadow: 3px 0 var(--color-black), -3px 0 rgb(231, 10, 10); transform: translate(2px, -1px); }
  75%  { text-shadow: -2px 0 var(--color-black), 2px 0 rgb(231, 10, 10); transform: translate(-1px, 1px); }
  100% { text-shadow: 0 0 10px var(--color-black); transform: translate(0, 0); }
}

#yt-dlp-link-button {
  width: 60%;
  color: rgb(247, 247, 248);
  font-weight: bold;
  height: 45px;
  border: 2px solid black;
  border-radius: 50px;
  background-image: url(./icons/yt-dlp-background.png);
  box-sizing: border-box;
  background-image: url(icons/circle-check.svg);
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 20px;
  padding-left: 40px;
  box-sizing: border-box; 
  background-color: red;
  padding-right: 20px;
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  line-height: 41px;
}

#yt-dlp-link-button:focus {
  outline: none;
  border-color: black;
  box-shadow: 0 0 0 3px rgb(255, 125, 125);
}


#yt-dlp-link-button::placeholder {
  color: white;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.5px;
}

#yt-dlp-select {
background-color: #000000;
color: white;
border-radius: 9px;
height: 40px;
text-align: center;
outline: none;
border: 1px solid  red;
font-weight: bold;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 15px;
line-height: 30px;
text-align-last: center;
appearance: none;
}

#yt-dlp-select:focus {
  outline: none;
}

#yt-dlp-resolution:focus {
  outline: none;
}


#yt-dlp-resolution {
background-color: #000000;
color: white;
border-radius: 9px;
height: 40px;
width: 60px;
text-align: center;
outline: none;
border: 1px solid  red;
font-weight: bold;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 15px;
line-height: 30px;
text-align-last: center;
appearance: none;
}

#yt-dlp-ok {
background-color: rgb(100, 9, 9);
color: white;
border-radius: 9px;
height: 40px;
width: 45px;
text-align: center;
outline: none;
border: 1px solid  black;
font-weight: bold;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 15px;
line-height: 30px;
text-align-last: center;
appearance: none;
}

#yt-dlp-link-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;
}


#yt-dlp-how-to-you {
  background-color: #ffffff;
  width: 75%; 
  height: 350px;
  border: 2px dashed red;
  border-radius: 50px;
  text-align: center;
  margin: 20px auto;
  text-align: left;
  padding-left: 30px;
}

#yt-dlp-description {
display: flex;
flex-direction: column;
align-items: right;
gap: 13px;
}

#yt-dlp-description p {
  margin: 0;
}

#yt-dlp-description svg {
  flex-shrink: 0;
}

#yt-dlp-d1 {
display: flex;
gap: 5px;
flex-direction: column;
}

#yt-dlp-d2 {
display: flex;
gap: 5px;
flex-direction: column;
}

#yt-dlp-d3 {
display: flex;
gap: 5px;
flex-direction: column;
}









@media (max-width: 600px) {
  .infobox {
    font-size: 11px;
    padding: 10px 16px;
    max-width: 90%;
    box-sizing: border-box;
  }

  .dropzone {
    height: 230px;
    justify-content: center;
    width: 300px;
  }

  h1 {
    font-size: 32px;

  }

  #text_ffvert {
  text-align: center;
  
  }

#FFvert_text.glitch {
  animation: glitchEffect 0.3s steps(2, end);
}

@keyframes glitchEffect {
  0%   { text-shadow: 2px 0 var(--color-purple), -2px 0 cyan; transform: translate(0, 0); }
  25%  { text-shadow: -3px 0 var(--color-purple), 3px 0 cyan; transform: translate(-2px, 1px); }
  50%  { text-shadow: 3px 0 var(--color-purple), -3px 0 cyan; transform: translate(2px, -1px); }
  75%  { text-shadow: -2px 0 var(--color-purple), 2px 0 cyan; transform: translate(-1px, 1px); }
  100% { text-shadow: 0 0 10px var(--color-purple); transform: translate(0, 0); }
}


#ffvert_panel {
    grid-template-columns: 1fr;
    grid-template-areas: auto auto auto;
    grid-template-areas:
      "title"
      "dropzone"
      "options";
    width: 83%;
    margin: 40px auto;
    align-content: start;
    justify-content: center;
    min-height: 700px;
  }


  #optionsPanel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  height: 100%;
}

#progressContainer {
  height: 30px;
  border-color: black;
  border-style: solid;
  border-width: 2px;
  margin: 0px auto 0;
  min-height: 30px;
  width: 150px;
}

#yt-dlp-panel {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  margin-left: 0;
  justify-content: center;
}

#yt-dlp-background {
  width: 95%;
  max-width: 90%;
  margin: 20px auto;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}
.dropzone {
  width: 100%;
}

#yt-dlp-how-to-you {
  background-color: #ffffff;
  width: 75%; 
  height: 350px;
  border: 2px dashed red;
  border-radius: 50px;
  text-align: center;
  margin: 20px auto;
  text-align: left;
  padding-left: 20px;
  padding-right: 20px;
}

#yt-dlp-link-panel {
  margin-right: 20px;
}

#yt-dlp-progresstext {
  width: 100%;
}
}
