:root {
  --background: #1b1e21;
  --primary-dark: #333;
  --primary-light: #ededed;
  --secondary-light: #fefefe;
} 

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

html {
  position: relative;
  min-height: 100%;
  
}

body {
  color: var(--primary-dark);
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  margin-bottom: 100px;
  position: relative;
  background-color: var(--background);
}

h1 {
  line-height: 1.2;
  font-family: 'Satisfy', cursive;
}

button,
input {
  width: 100%;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  outline: none;
}

a{
  color: white;
  text-decoration: none;
}

.layout {
  width: 100%;

  display: flex;
  gap: 16px;
  flex-wrap: wrap;

  justify-content: center;
  align-items: center;
}

/* HEADER */

.header {
  padding: 30px 0;
}

.title {
  text-align: center;
  font-size: 80px;
}

/* MAIN */

.main {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.settings {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 30px;
  width: 500px;
  flex-wrap: wrap;
}

button {
  padding: 10px 20px;
  border-radius: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
}

.clicked {
  filter: opacity(0.5);
}

button,
input[type='color'] {
  transition: transform 0.1s ease-in-out;
  background-color: transparent;
}

button:hover,
input[type='color']:hover {
  transform: scale(1.05);
}

#rainbowBtn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(
        90deg,
        rgba(255, 0, 0, 1) 0%,
        rgba(255, 154, 0, 1) 10%,
        rgba(208, 222, 33, 1) 20%,
        rgba(79, 220, 74, 1) 30%,
        rgba(63, 218, 216, 1) 40%,
        rgba(47, 201, 226, 1) 50%,
        rgba(28, 127, 238, 1) 60%,
        rgba(95, 21, 242, 1) 70%,
        rgba(186, 12, 248, 1) 80%,
        rgba(251, 7, 217, 1) 90%,
        rgba(255, 0, 0, 1) 100%
    );
}

.rainbow-icon {
  text-align: center;
  font-size: 60px;
}

.fa-solid {
  color: rgb(75, 75, 75);
}

input[type='color']:active {
  transition: transform 0.05s ease-in-out;
  transform: scale(1);
}

input[type='color'] {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  border: none;
  outline: none;
}

input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type='color']::-webkit-color-swatch {
  border: none;
  border-radius: 50px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.size-value {
  font-size: 20px;
}

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--primary-light);
  background-color: transparent;
}

input[type='range']::-webkit-slider-runnable-track {
  height: 10px;
  border: 1px solid var(--primary-dark);
  border-radius: 25px;
  background: var(--secondary-light);
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 25px;
  margin-top: -8px;
  background: var(--primary-dark);
}

.grid {
  display: grid;
  margin: 0 auto;
  width: 500px;
  height: 450px;
  background-color: var(--secondary-light);
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

#pad{
  margin-top: 20px;
  width: 600px;
  height: auto;
  padding-bottom:60px;
  margin-bottom: 10px;
  background-color:#f80012;
  border-radius:1em;
  -moz-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  -webkit-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  -o-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
}

#pad p{
  text-align: center;
  margin: 0 0;
  padding:15px;
  line-height: 1.2;
  font-family: 'Permanent Marker', cursive;
  color: gold;
  font-size:xx-large;
  text-shadow: 0px 3px 7px black;
  font-family: 'Satisfy', cursive;
}

#nobs {
  position: relative;
  height: 80px;
  margin-top: 30px;
}

#rightnob {
  background-color:#fff;
  width:80px;
  height:80px;
  border-radius:50px;
  position:absolute;
  right:20px;
  -moz-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  -webkit-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  -o-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
}

#leftnob {
  background-color:#fff;
  width:80px;
  height:80px;
  border-radius:50px;
  position:absolute;
  left:20px;
  -moz-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  -webkit-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  -o-box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
  box-shadow: 0px 8px 5px rgba(0,0,0,0.6);
}

#sizeSlider {
  width: 200px;
}

.src-preview {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.24);
  transition: all 0.15s ease;
}

.src-preview.show {
  opacity: 1;
  pointer-events: auto;
}

.src-preview .screenshot {
  width: 70%;
  top: 50%;
  opacity: 0;
  pointer-events: none;
  aspect-ratio: 16 / 9;
  transition: transform 0.15s ease;
  transform: translate(-50%, -50%) scale(0.9);
}

.src-preview.show .screenshot{
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.screenshot #close-btn {
  position: absolute;
  right: -25px;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}

.screenshot img {
  width: 100%;
}

.post-it {
	width:400px;
  height:300px;
  position:relative;
  background:rgb(255, 218, 170);
  overflow:hidden;
  margin:30px auto;
  padding:20px;
  border-radius: 5px;
  box-shadow:
  inset 1px -10px 40px rgba(0,0,0,0.2), inset 0px -3px 10px rgba(0,0,0,0.2), 1px -3px 6px 5px rgba(0,0,0,0.2);
  font-family: 'Permanent Marker', cursive;
  line-height:1.7em;
  font-size:19px;
  -webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);
  mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);
}

/* Toast */
.container {
  display: none;
  width: 400px;
  height: 250px;
  background-color: rgba(255, 255, 255, 0.959);
  z-index: 9999;
  position: absolute;
  transform: translate(-50%, -50%);
  top: 20%;
  left: 50%;
  padding: 10px;
  -webkit-box-shadow: -8px 14px 47px 16px rgba(0,0,0,0.6);
  -moz-box-shadow: -8px 14px 47px 16px rgba(0,0,0,0.6);
  box-shadow: -8px 14px 47px 16px rgba(0,0,0,0.6);
}

.alert-box {
  font-size: 20px;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;

  button {
    border-radius: 0;
    width: 100px;
    height: 30px;
    margin: 5px;
  }

  #alert-box-btn {
    display: flex;
  }

  #confirmBtnReset i {
  color: rgb(95, 233, 95);
  }

  #cancelBtnReset i {
    color: #f80012;
  }
}

/* FOOTER */

.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  font-size: 20px;
}

/* MEDIA QUERIES */

@media (max-width: 1200px) {
  .main {
    justify-content: center;
  }
}

@media (max-width: 850px) {
  .main {
    gap: 50px;
  }

  .settings {
    width: 150px;
    gap: 16px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  .size-value {
    margin-bottom: -4px;
  }

  .grid {
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 650px) {
  .title {
    font-size: 50px;
  }

  #pad {
    width: 365px;

    p {
      font-size: x-large;
    }
  }

  .grid {
    width: 300px;
    height: 300px;
  }

  #sizeSlider {
    width: 150px;
  }

  .post-it {
    width: 300px;
  }

}
