:root {
  --base-color: #510f0f;
  --line-color: #1f1f1f;
  --poketext-color: #ffcc01;
  --pokestroke-color: #3269b2ff;
  --hover-color-1: #853636a8;
  --accent-color: #ece2c4;
  --dropdown-color: rgb(242, 217, 142);
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-family: Galindo, sans-serif;
  line-height: 1.5rem;
}

body {
  min-height: 100vh;
  min-height: 100dvh;

  background-image: url("assets/homepage.bg.png");
  background-size: cover;
  background-position: center;

  display: grid;
  grid-template-columns: auto 1fr;
}

/* sidebar main styles */
.logo {
  font-size: 26px;
}

.menu-text {
  font-size: 18px;
}

#sidebar {
  display: flex;
  flex-direction: column;

  box-sizing: border-box;
  height: 100vh;
  width: 250px;
  padding: 1em 1em;
  background-color: var(--base-color);
  border-right: 2px solid var(--line-color);

  position: sticky;
  top: 0;
  align-self: start;

  transition: 300ms ease-in-out;
  overflow: hidden;

  text-wrap: nowrap;
}

#sidebar.close {
  padding: 5px;
  width: 65px;
}

#sidebar ul {
  list-style: none;
}

#sidebar > ul > li:first-child {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  .logo {
    font-weight: bold;
  }
}

#sidebar ul li.active a {
  span,
  img {
    scale: 1.25;
    opacity: 1;
  }
}

#sidebar a > img,
.dropdown-button > img {
  opacity: 0.65;
}

#sidebar a,
#sidebar .dropdown-button,
#sidebar .logo {
  border-radius: 0.5em;
  padding: 0.85em;
  text-decoration: none;

  color: var(--poketext-color);
  -webkit-text-stroke: 0.6px var(--pokestroke-color);

  display: flex;
  align-items: center;
  gap: 1em;
}

#sidebar a > span,
.dropdown-button span {
  opacity: 0.8;
}

#sidebar img,
#sidebar svg {
  flex-shrink: 0;
  fill: var(--dropdown-color);
}

#sidebar a span,
#sidebar .dropdown-button,
.dropdown-button > span {
  flex-grow: 1;

  padding-left: 1em;
}

#sidebar a:hover,
#sidebar .dropdown-button:hover {
  background-color: var(--hover-color-1);
}

/* dropdown menu styles */

.dropdown-button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.dropdown-button svg {
  transition: 200ms ease;
}

.rotate svg:last-child {
  rotate: 180deg;
}

#sidebar .sub-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: 300ms ease-in-out;

  > div {
    overflow: hidden;
  }
}

#sidebar .sub-menu a {
  padding-left: 2em;
  opacity: 0.8;
}

#sidebar .sub-menu.show {
  grid-template-rows: 1fr;
}

#toggle-button {
  margin-left: auto;
  padding: 1em;
  border: none;
  border-radius: 0.5em;
  background: none;
  cursor: pointer;

  svg {
    transition: rotate 150ms ease;
  }
}

#toggle-button:hover {
  background-color: var(--hover-color-1);
}

/* attribution bottom section */
#sidebar-info {
  position: relative;
  margin-top: auto;

  display: flex;
  align-items: center;

  padding-left: 10px;
  padding-bottom: 10px;
}

.info-button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1f1f1f58;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
  cursor: help;
}

.info-icon {
  color: white;
  font-family: serif;
  font-style: italic;
  font-weight: bold;
  font-size: 10px;
}

.attribution-tooltip {
  position: absolute;
  left: 60px;
  bottom: 15px;

  width: 150px;
  height: 210px;
  background: #1a1a1a7f;
  border: 1px solid #ffffff33;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);

  opacity: 0;
  visibility: hidden;
  transform: translate(-65px, -35px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.info-button:hover {
  background-color: var(--hover-color-1s);

  background-color: #333;
  border-color: #ffcb05;

  + .attribution-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50px, -35px);
  }
}

.tooltip-title {
  margin: 0 0 8px 0;
  font-size: 10px;
  color: #ffcb05;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.attribution-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.attribution-list li {
  font-size: 10px;
  color: #ccc;
  margin-bottom: 5px;
  line-height: 1.4;
}

#sidebar.close .info-button:hover + .attribution-tooltip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#sidebar.close .info-button {
  margin-left: 5px;
  border-color: rgba(255, 255, 255, 0.1);
  cursor: default;
}

/* intro */
#intro-container {
  grid-column: 2;
  height: 100vh;
  height: 100dvh;
  width: 100%;

  padding: 25px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#intro-container svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: auto;
}

#intro-container h1 {
  margin-top: 3%;
  margin-bottom: 0.5%;

  font-size: 56px;

  color: var(--poketext-color);
  -webkit-text-stroke: 1px var(--pokestroke-color);
  text-shadow: 0px 1px 5px #d0cece76;
}

.team-rocket-speech {
  opacity: 0;
  font-size: 17.3px;
  fill: #1f1f1f;
  text-anchor: middle;

  pointer-events: none;
  user-select: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 0.5px;
  text-shadow: 0px 2px 2px #00000076;
}

.speech-button-group circle {
  r: 17px;
  stroke: #ffffff52;
  stroke-width: 5px;
}

.speech-button-group:hover circle {
  filter: brightness(1.2);
  transition: filter 0.2s;
}

.meowth-intro-text {
  opacity: 0;
  font-size: 24px;
  text-align: center;
  text-anchor: center;
  dominant-baseline: center;

  pointer-events: none;
  user-select: none;

  paint-order: stroke;
  -webkit-text-stroke: 1.5px white;

  text-shadow: 0px 2px 2px #00000076;
}

.meowth-body-text {
  font-size: 15px;
  color: #fff;
  -webkit-text-stroke: 0.5px rgb(0, 0, 0);

  text-shadow: 0px 2px 2px #00000076;
}

.starting-button rect {
  rx: 23px;
  fill: #1f1f1f;
  stroke: #ffffffab;
}

.starting-button:hover {
  opacity: 0.9;
}

.starting-button:hover rect {
  transform-box: border-box;
  transform-origin: center;
  scale: 0.98;
  transition: 0.1s ease;
}

.starting-button text {
  text-anchor: middle;
  fill: var(--poketext-color);
  stroke: var(--pokestroke-color);
  stroke-width: 0.55px;
}

.starting-button:hover text {
  transform-box: border-box;
  transform-origin: center;
  scale: 0.98;
  transition: 0.1s ease;
}
