@keyframes scroll-stars {
  to {
    background-position: 128px -128px;
  }
}

@keyframes scroll-stars-left {
  from {
    background-position: 64px 32px;
  }
  to {
    background-position: -64px -96px;
  }
}

body {
  background: #8ab0c1 url("image.jpg") no-repeat center center fixed;
  background-size: cover;
  font-family: "Courier New", Courier, monospace;
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("stars.png") repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

body::before {
  animation: scroll-stars 8s linear infinite;
}

body::after {
  animation: scroll-stars-left 8s linear infinite;
}

body > * {
  position: relative;
  z-index: 1;
}

footer img {
  image-rendering: pixelated;
}

.home {
  h1 {
    margin: 0;
    padding: 0;
  }

  .center-box {
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    box-shadow:
      inset 1px 1px 0 #dfdfdf,
      inset -1px -1px 0 #808080;
    padding: 3px;
    resize: both;
    overflow: hidden;
    min-width: 200px;
    min-height: 100px;
    display: flex;
    flex-direction: column;

    header {
      background: linear-gradient(90deg, #000080, #1084d0);
      padding: 2px 4px;
      margin-bottom: 3px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: grab;
      user-select: none;

      &:active {
        cursor: grabbing;
      }

      h1 {
        font-size: 1rem;
        font-weight: bold;
        color: #fff;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .win95-titlebar-btns {
        display: flex;
        gap: 2px;
        flex-shrink: 0;
      }

      .win95-close {
        background: #c0c0c0;
        border-top: 2px solid #fff;
        border-left: 2px solid #fff;
        border-right: 2px solid #000;
        border-bottom: 2px solid #000;
        box-shadow:
          inset 1px 1px 0 #dfdfdf,
          inset -1px -1px 0 #808080;
        font-family: inherit;
        font-size: 0.75rem;
        font-weight: bold;
        padding: 0 4px;
        min-width: 20px;
        height: 18px;
        cursor: pointer;
        flex-shrink: 0;

        &:active {
          border-top: 2px solid #000;
          border-left: 2px solid #000;
          border-right: 2px solid #fff;
          border-bottom: 2px solid #fff;
          box-shadow:
            inset 1px 1px 0 #808080,
            inset -1px -1px 0 #dfdfdf;
        }
      }
    }

    .win95-body {
      background: #fff;
      color: #333;
      border-top: 2px solid #808080;
      border-left: 2px solid #808080;
      border-right: 2px solid #fff;
      border-bottom: 2px solid #fff;
      padding: 2rem;
      flex: 1;
      overflow: auto;

      h2 {
        text-align: center;
        color: #000080;
      }

      marquee {
        color: #808080;
        font-size: 0.9rem;
        margin-bottom: 12px;
      }

      hr {
        border: none;
        border-top: 1px solid #808080;
        border-bottom: 1px solid #fff;
      }
    }
  }

  &.dragging .win95-body {
    pointer-events: none;
  }

  nav {
    text-align: center;
    justify-content: center;
    display: flex;
    width: 100%;
    gap: 0.5rem;

    a {
      background: #c0c0c0;
      color: #000;
      text-decoration: none;
      font-family: "MS Sans Serif", "Arial", sans-serif;
      font-size: 0.85rem;
      padding: 4px 16px;
      border-top: 2px solid #fff;
      border-left: 2px solid #fff;
      border-right: 2px solid #000;
      border-bottom: 2px solid #000;
      box-shadow:
        inset 1px 1px 0 #dfdfdf,
        inset -1px -1px 0 #808080;
      cursor: pointer;

      &:active {
        border-top: 2px solid #000;
        border-left: 2px solid #000;
        border-right: 2px solid #fff;
        border-bottom: 2px solid #fff;
        box-shadow:
          inset 1px 1px 0 #808080,
          inset -1px -1px 0 #dfdfdf;
      }
    }
  }

  main {
    text-align: center;
    color: #3d3d3d;
  }

  footer {
    text-align: center;
    color: #808080;
    font-size: 0.8rem;
  }
}
