html,
body {
  overflow-x: clip;
  box-sizing: border-box;
  max-width: 100%;
  position: relative;
}

body {
  margin: 0 auto;
  overflow-y: auto;
  font-family: Verdana, sans-serif;
  background: black url("/img/starry-background-3.gif") fixed repeat;
  color: orange;
}

body a {
  text-decoration: none;
}

body a:hover {
  color: cyan;
}

body a:active {
  color: teal;
}

ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

textarea {
  margin: 10px;
  background-color: black;
  color: orange;
  border-color: #4b0082;
  resize: none;
}

textarea:focus {
  outline: orange;
}

.wrapper {
  display: grid;
  grid-template-areas:
    "counter header time"
    "sidebar main rightbar"
    "sidebar neighbors rightbar"
    "sidebar ads rightbar"
    "sidebar mybutton-mobile rightbar"
    "sidebar dvd rightbar"
    "sidebar footer rightbar";
  grid-template-columns: minmax(7vw, 1fr) 4fr minmax(7vw, 1fr);
  gap: 1.5em;
  width: 1440px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1em;
  position: relative;
}

.header {
  grid-area: header;
  position: relative;
  align-content: center;
  z-index: 1;
}

.header img {
  max-width: 100%;
  height: auto;
  margin-bottom: -1em;
  object-fit: cover;
}

#splash {
  position: absolute;
  top: 8em;
  right: -2em;
  z-index: 1;
  font-family: "Minecraft", "Unifont-Upper", sans-serif;
  font-size: 20px;
  text-align: center;
  color: #ffff00;
  text-shadow: 1px 1px 0 #000;
  animation: splash 0.25s alternate infinite;
}

@keyframes splash {
  0% {
    transform: scale(0.875) rotate(-20deg);
  }
  100% {
    transform: scale(1) rotate(-20deg);
  }
}

.counter {
  grid-area: counter;
}

.time {
  grid-area: time;
  flex-direction: column;
  gap: 5px;
  font-family: "Lucida Console", "Courier New", monospace;
  font-weight: bold;
  text-align: center;
}

.counter,
.time {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: fit-content;
  margin-top: 1em;
  padding: 0.5em;
  border: 4px dashed indigo;
}

.counter .sticker {
  top: 0;
  left: -7em;
}

.sidebar {
  grid-area: sidebar;
}

.rightbar {
  grid-area: rightbar;
  position: relative;
}

.sidebar,
.rightbar {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  height: fit-content;
}

.main {
  grid-area: main;
  height: fit-content;
  font-family: Georgia, serif;
  font-weight: bolder;
}

.main p {
  line-height: 1.5rem;
}

.neighbors {
  grid-area: neighbors;
  max-width: 100%;
  height: fit-content;
  overflow-x: hidden;
  text-align: center;
}

.neighbors.box {
  background-image:
    url("/img/cityscape.gif"),
    url("/img/starry-background.gif");
  background-position:
    bottom center,
    center;
  background-size:
    auto,
    auto;
  background-repeat:
    repeat-x,
    repeat;
  background-attachment:
    scroll,
    fixed;
}

.ads {
  grid-area: ads;
}

.dvd {
  grid-area: dvd;
  position: relative;
  display: grid;
  width: 15em;
  max-width: 100%;
  margin: 0 auto;
}

#widget-location {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#widget-time {
  font-family: "Digital Clock", sans-serif;
  font-size: 40px;
  font-weight: bold;
}

#widget-date {
  font-size: 12px;
}

.links {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  margin-block: 0.5em;
  overflow-x: hidden;
  container-type: inline-size;
}

.links a {
  padding-left: 5px;
  font-size: 20px;
  font-weight: bold;
  flex: 50%;
}

.tv-border {
  position: absolute;
}

.dvd-logo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 30px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff;
  user-select: none;
}

.dvd-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.list {
  display: flex;
  justify-content: space-evenly;
  font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive, sans-serif;
}

.to-do,
.changelog {
  width: 225px;
  height: 150px;
  padding: 0.5em;
  overflow-y: auto;
  background-color: black;
  text-wrap: pretty;
  box-shadow: 2px 8px 16px indigo, 2px 2px 8px purple;
}

.to-do {
  transform: perspective(600px) rotate(-5deg) rotateX(16deg) rotateY(8deg);
}

.changelog {
  transform: perspective(600px) rotate(2deg) rotateX(10deg) rotateY(4deg);
}

.to-do ul,
.changelog ul {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  padding-left: 1em;
  margin: 0.5em 0;
  font-weight: normal;
}

.to-do li::marker,
.changelog li::marker {
  content: "★  ";
  font-size: 0.8rem;
}

.pfp {
  float: left;
  max-width: 100%;
  margin: 0;
  object-fit: contain;
  border-style: solid;
  border-image-source: url("/img/picture-border-gold.gif");
  border-image-slice: 103;
  border-image-width: 40px;
  border-image-outset: 30px;
  border-image-repeat: round round;
}

.mybutton, .mybutton-mobile {
  height: fit-content;
  text-align: center;
}

.mybutton p, .mybutton-mobile p {
  font-size: 0.8em;
  font-family: Georgia, serif;
}

.mybutton-mobile {
  display: none;
}

.neighbors .buttons {
  display: flex;
  flex-direction: row;
}

.navbar,
.guestbook,
.footer,
.neighbors {
  font-family: "Minecraft", "Unifont-Upper", sans-serif;
}

.window-box {
  position: relative;
  min-width: 0;
  margin: 12px;
  aspect-ratio: 4 / 3;
  background-color: #000;
}

.draw4me {
  position: relative;
}

.draw4me-img {
  width: 100%;
}

.img-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.draw4me-img:hover .img-default {
  opacity: 0;
}

.draw4me-img:hover .img-hover {
  opacity: 1;
}

.box,
.modal {
  border-style: solid;
  border-color: indigo;
  border-image-source: url("/sidneyscape-border.gif");
  border-image-slice: 110;
  border-image-width: 20px;
  border-image-outset: 10px;
  border-image-repeat: round round;
  background: black url("/img/starry-background.gif") fixed;
  color: orange;
}

.box {
  position: relative;
  padding: 10px;
}

.brick {
  background: black url("/img/seamless-brick-dark.png") 0 0 / 400px repeat;
}

.marquee {
  background-color: black;
  user-select: none;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  box-sizing: content-box;
  gap: 0.5em;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.marquee-items {
  display: flex;
  flex-shrink: 0;
  height: 100%;
  min-width: 100%;
  position: relative;
  gap: 0.5em;
}

@keyframes scroll-r2l {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.scroll-r2l {
  animation: scroll-r2l 120s linear infinite;
}

@keyframes scroll-l2r {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

.scroll-l2r {
  animation: scroll-l2r 120s linear infinite;
}

.neighbors button {
  padding: 0;
  background: transparent;
  border: none;
}

.neighbors button:hover {
  filter: brightness(125%);
}

.ring {
  width: 100%;
  padding-bottom: 20px;
}

.button {
  padding: 5px;
  background-color: black;
  color: orange;
  font-family: "Retro Computer", sans-serif;
  font-weight: bolder;
  border: 5px solid #4b0082;
}

.button:hover {
  color: #ffbb00;
  background-color: #120b2b;
}

.button:active {
  color: #df5e1a;
  background-color: black;
}

.buttons img {
  filter: drop-shadow(0 8px 0 rgb(0, 0, 0));
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake:hover {
  animation: shake 0.5s infinite;
}

.tooltip {
  display: inline-block;
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  width: 200px;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  padding: 5px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: normal;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.tooltip.sticker-tooltip {
  position: absolute;
  line-height: 0;
  font-family: Verdana, sans-serif;
}

.tooltip.sticker-tooltip::after {
  top: auto;
  bottom: 110%;
  transform: translateX(-50%);
  color: gold;
  font-weight: bold;
  line-height: 1.2;
  text-shadow: 1.5px 1.5px 0 black;
  background-color: transparent;
}

.mybutton.box .tooltip.sticker-tooltip::after,
.mybutton-mobile.box .tooltip.sticker-tooltip::after {
  transform-origin: bottom center;
  transform: rotate(var(--tooltip-rotate, 0deg));
}

.tooltip.copy-tooltip::after {
  width: max-content;
  min-width: 120px;
  top: 125%;
  bottom: auto;
  padding: 6px 8px;
  background-color: black;
  font-family: "Pixelon", sans-serif;
  font-size: 13px;
  text-align: center;
  border: 3px dashed indigo;
}

.footer {
  grid-area: footer;
  margin-bottom: 1em;
  padding-top: 20px;
  color: white;
  text-align: center;
}

.footer p {
  display: block;
  width: 160px;
  margin: 5px auto;
  padding: 5px;
  background-color: black;
}

.sticker {
  position: absolute;
  display: block;
  filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.75));
  z-index: 1;
}

.draw4me .sticker {
  pointer-events: none;
}

.skyline {
  position: fixed;
  bottom: 0;
  z-index: -1;
  width: 100%;
  height: auto;
  user-select: none;
  transform: translateY(10vh);
}

.modal-content {
  max-width: 100%;
  padding: 0 1em;
}

.webring-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em 1em;
}

.webring {
  display: flex;
  flex-direction: column;
  flex-basis: 300px;
  justify-content: center;
  align-items: center;
}

.flex {
  display: flex;
  gap: 1em;
  padding: 0.5em;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 20px;
  background: black url("/img/starry-background.gif") fixed;
}

.modal {
  width: max(350px, 70%);
  height: max(500px, 70%);
  padding: 0;
  border-radius: 10px;
  box-shadow: 3px 3px black;
}

.close-modal {
  position: fixed;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
}

.modal::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
}

.ad {
  max-width: 180px;
  height: 180px;
}

.draggable {
  touch-action: none;
  user-select: none;
  position: absolute;
}

@media (max-width: 900px) {
  .header {
    grid-area: 1 / span 3;
    margin: auto -1em;
  }

  .main {
    grid-area: 2 / span 3;
  }

  .sidebar {
    grid-area: 3 / span 3;
  }

  .neighbors {
    grid-area: 4 / span 3;
  }

  .rightbar {
    grid-area: 5 / span 3;
    flex-direction: row-reverse;
  }

  .rightbar .box {
    flex: 1;
  }

  .ads {
    grid-area: 6 / span 3;
  }
  
  .mybutton-mobile {
    grid-area: 7 / span 3;
  }

  .time {
    grid-area: 8 / span 3;
  }

  .counter {
    grid-area: 9 / span 3;
  }

  .dvd {
    grid-area: 10 / span 3;
  }

  .footer {
    grid-area: 11 / span 3;
  }

  .skyline {
    transform: translateY(0);
  }

  #splash {
    top: 20vw;
    right: 0.5em;
    font-size: 0.7rem;
  }

  .links {
    text-align: center;
  }

  .links a {
    font-size: 18px;
  }

  .counter,
  .time {
    margin-top: 0;
  }

  .window-box {
    margin: 15px;
  }

  .dvd-logo {
    width: 90px;
    height: 45px;
  }

  .ad {
    width: 4.5em;
    height: 4.5em;
  }

  .mybutton {
    display: none;
  }
  
  .mybutton-mobile {
    display: block;
  }

  .counter .sticker {
    top: 0.5em;
    left: 0.5em;
    width: 15%;
  }
}

@container (max-width: 200px) {
  .responsive-text {
    font-size: 0;
  }
  .responsive-text::after {
    content: attr(data-mobile-text) !important;
    font-size: 20px;
  }
}