:root {
  --accent-color: blue;
}
body {
  padding: 1rem;
  font-family: "Open Sans", serif;
  font-size: 125%;
  line-height: 1.5;
}
h1 {
  margin: 0;
}
h1 + p {
  margin: 0 0 1rem;
}
select {
  padding: 0.5rem;
}
.tab {
  display: none;
}
.tab a {
  display: inline-block;
  margin: 1rem 0;
}
pre {
  border: 1px solid;
  padding: 1rem;
  max-width: fit-content;
  width: 95%;
  overflow: auto;
  position: relative;
  cursor: pointer;
}
pre::before {
  opacity: 0;
  content: "Click to copy code";
  position: absolute;
  right: 0;
  top: 0;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  transition: opacity 300ms;
}
pre:hover::before {
  opacity: 1;
}
pre.copied::before {
  content: "Copied to clipboard";
}
textarea {
  visibility: hidden;
}
#main:has(option[value="1"]:checked) .t1,
#main:has(option[value="2"]:checked) .t2,
#main:has(option[value="3"]:checked) .t3,
#main:has(option[value="4"]:checked) .t4,
#main:has(option[value="5"]:checked) .t5,
#main:has(option[value="6"]:checked) .t6,
#main:has(option[value="7"]:checked) .t7 {
  display: block;
}

/* Default */
.t1 a {
  color: blue;
  transition: color 350ms;
}
.t1 a:hover {
  color: green;
}

/*Double Underline */
.t2 a {
  padding-bottom: 0.1em;
  background: linear-gradient(0deg, var(--accent-color), var(--accent-color))
    no-repeat right bottom / 0 2px;
  transition: background-size 350ms;
}
.t2 a:hover {
  background-size: 100% 2px;
  background-position-x: left;
}

/* Growing Background */
.t3 a {
  padding: 0 0.2em;
  text-decoration-color: var(--accent-color);
  background: linear-gradient(0deg, var(--accent-color), var(--accent-color))
    no-repeat right bottom / 0 100%;
  transition: background-size 350ms, color 350ms;
}

.t3 a:hover {
  color: #fff;
  background-size: 100% 100%;
  background-position-x: left;
}

/* Background Fadxe-In */
.t4 a {
  padding: 0 0.2em;
  text-decoration-color: var(--accent-color);
  background: transparent;
  transition: background-color 350ms, color 350ms;
}
.t4 a:hover {
  color: #fff;
  background: var(--accent-color);
}

/* Underline Grow */
.t5 a {
  text-decoration-color: blue;
  background: linear-gradient(0deg, var(--accent-color), var(--accent-color))
    no-repeat right bottom 0.2em / 100% 0;
  transition: background-size 350ms, color 350ms;
}
.t5 a:hover {
  color: #fff;
  text-decoration-color: var(--accent-color);
  background-size: 100% 100%;
}

/* Underline Color Change */
.t6 a {
  text-decoration: none;
  padding-bottom: 0.1em;
  background: linear-gradient(-90deg, #aaa 0%, #aaa 50%, blue 50.1%, blue 100%)
    no-repeat left 100% bottom 0.2em / 200% 2px;
  transition: background-position 350ms;
}
.t6 a:hover {
  background-position-x: 0%;
}

/* Color Slide */
.t7 a {
  color: transparent;
  text-decoration-color: blue;
  background: linear-gradient(-90deg, blue 0%, blue 50%, red 50.1%, red 100%)
    no-repeat left 100% bottom 0% / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-position 350ms;
}
.t7 a:hover {
  background-position-x: 0%;
}
