/* about banner in sidebar (unique class to avoid page-local .about-tooltip clash) */
.about-banner {
  display: block;
  background: #e4ebeb;
  color: #1a3a3a;
  border: 1px solid #a8c0c0;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 12px auto 12px auto;
  font-size: 14px;
  max-width: 170px;
  box-shadow: 0 2px 8px rgba(0,134,137,0.07);
  text-align: left;
  opacity: 0;
  animation: fadeIn 0.6s ease-in-out 0.5s both;
}

.about-banner h2 {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: #006466;
}

.about-banner .tooltip-text {
  display: block;
  font-size: 12px;
  color: #4a6868;
  margin-bottom: 0;
  line-height: 1.4;
}

/* ensure sidebar children animate in sequence like other sidebar items */
.sidebar .about-banner {
  will-change: opacity, transform;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Win98 Scrollbar Styles */
::-webkit-scrollbar {
  width: 16px;
}

::-webkit-scrollbar-track {
  background: #e0ebeb;
  border: 1px solid;
  border-color: #c8d8d8 #a0b8b8 #a0b8b8 #c8d8d8;
}

::-webkit-scrollbar-thumb {
  background: #c0d0d0;
  border: 2px solid;
  border-color: #d0e0e0 #90a8a8 #90a8a8 #d0e0e0;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8c0c0;
}

::-webkit-scrollbar-corner {
  background: #e0ebeb;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Animated gradient background */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Firefox scrollbar */
* {
  scrollbar-color: #a8c0c0 #e0ebeb;
  scrollbar-width: thin;
}

body {
  margin: 0;
  font-family: "Courier New", monospace;
  background: #f0f4f4;
  text-transform: lowercase;
}

body.show-art {
  background-image: var(--art-image) !important;
}
:root {
  --sidebar-width: 200px;
}

.art-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
}

.art-bg.visible {
  opacity: 1;
}

.sidebar {
  z-index: 10;
}
.art-eye-button {
  z-index: 20;
}

.sidebar {
  will-change: transform, opacity;
  transform: translateZ(0);
  position: fixed;
  width: 200px;
  height: 100%;
  background-color: #e8f0f0;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 134, 137, 0.1);
  border-right: 3px solid #008689;
  display: flex;
  flex-direction: column;
}

.sidebar h1 {
  font-size: 24px;
  margin-bottom: 20px;
  animation: slideInDown 0.8s ease-out 0.2s both;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
}

.sidebar ul {
  list-style-type: none;
  padding: 0;
  text-align: center;
  animation: slideInDown 0.8s ease-out 0.3s both;
}

.sidebar ul li {
  margin-bottom: 10px;
  animation: fadeIn 0.6s ease-in-out both;
}

.sidebar ul li a {
  text-decoration: none;
  color: #2a5a5a;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 1px;
}

.sidebar ul li a:hover {
  text-decoration: underline;
  color: #008689;
}

.section {
  margin-top: 30px;
}

/*infobar*/
.info-bar {
  background: #e8f4f4;
  color: #2a6a6a;
  font-family: "Courier New", monospace;
  font-size: 11px;
  padding: 6px 10px;
  margin-bottom: 25px;
  text-align: center;
  border: 2px solid;
  border-color: #c8e0e0 #98b8b8 #98b8b8 #c8e0e0;
  position: relative;
  z-index: 5;
}

.info-bar span {
  display: inline-block;
  animation: marquee 15s linear infinite;
}

@media (max-width: 768px) {
  .info-bar span {
    animation-duration: 10s;
    white-space: nowrap;
  }
}

@keyframes marquee {
  0% {
    transform: translateX(150%);
  }
  100% {
    transform: translateX(-150%);
  }
}

.banners-wrapper {
  margin-top: auto;
  padding-top: 20px;
  border-top: 2px solid #c8d8d8;
  animation: fadeIn 0.8s ease-out 0.5s both;
}

.banners-wrapper-title {
  font-size: 10px;
  color: #6a9a9a;
  text-align: center;
  margin-bottom: 10px;
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
}

.neocities__banners {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.neocities__banners a {
  display: block;
  transition: all 0.3s ease;
  line-height: 0;
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

.neocities__banners a:nth-child(1) {
  animation-delay: 0.6s;
}
.neocities__banners a:nth-child(2) {
  animation-delay: 0.7s;
}
.neocities__banners a:nth-child(3) {
  animation-delay: 0.8s;
}
.neocities__banners a:nth-child(4) {
  animation-delay: 0.9s;
}
.neocities__banners a:nth-child(5) {
  animation-delay: 1s;
}
.neocities__banners a:nth-child(6) {
  animation-delay: 1.1s;
}
.neocities__banners a:nth-child(7) {
  animation-delay: 1.2s;
}
.neocities__banners a:nth-child(8) {
  animation-delay: 1.3s;
}
.neocities__banners a:nth-child(9) {
  animation-delay: 1.4s;
}
.neocities__banners a:nth-child(10) {
  animation-delay: 1.5s;
}
.neocities__banners a:nth-child(11) {
  animation-delay: 1.6s;
}

.neocities__banners img {
  transition: transform 0.3s ease;
  width: 110px;
  height: auto;
}

.neocities__banners a:hover img {
  transform: scale(1.05);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }

  body::before {
    display: none;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    box-shadow: none;
    border-right: none;
    border-bottom: 3px solid #008689;
    padding: 15px 20px;
    z-index: 100;
    background-color: #e8f0f0;
    display: flex;
    flex-direction: column;
    transition: opacity 300ms ease, transform 500ms ease;
    will-change: opacity, transform;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 20px !important;
  }

  @keyframes marquee {
    0% {
      transform: translateX(100%);
    }
    100% {
      transform: translateX(-100%);
    }
  }

  .art-bg.art-update {
    animation: artPulse 0.9s ease;
  }

  @keyframes artPulse {
    0% {
      transform: scale(1.02);
      opacity: 0.6;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }

  .sidebar h1 {
    font-size: 22px;
    margin: 0 0 15px 0;
    text-align: center;
    width: 100%;
  }

  .sidebar ul.section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0;
    margin: 0;
    width: 100%;
  }

  .sidebar ul li {
    margin-bottom: 0;
    list-style: none;
  }

  .sidebar ul li a {
    display: inline-block;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2a5a5a;
    font-weight: bold;
  }

  .sidebar ul li a:hover,
  .sidebar ul li a:active {
    text-decoration: underline;
    background-color: transparent;
    color: #008689;
  }

  /* Responsive adjustments for about-banner inside sidebar */
  .about-banner {
    max-width: 100%;
    width: calc(100% - 40px);
    margin: 8px 0;
    box-shadow: none;
    font-size: 13px;
    animation-delay: 0.4s; /* fits sequence with other items */
  }

  .neocities__banners {
    display: grid;
    height: 200px;
    grid-template: repeat(3, 1fr) / repeat(3, 1fr);
    gap: 20px 5px;
  }

  .art-bg {
    display: none;
  }

  .art-eye-button {
    display: none;
  }

  .art-link-button {
    display: none;
  }

  .info-bar {
    font-size: 10px;
  }

  /* Modal windows fullscreen on mobile */
  .modal-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    z-index: 500 !important;
    resize: none !important;
  }

  .modal-window::after {
    display: none;
  }

  .modal-window.active {
    display: flex !important;
  }

  .modal-titlebar {
    cursor: default;
    height: 40px;
    padding: 8px 12px;
    font-size: 16px;
  }

  .modal-close-btn {
    width: 30px;
    height: 26px;
    font-size: 18px;
  }

  .modal-content {
    font-size: 16px;
    padding: 15px;
    line-height: 1.8;
  }

  .modal-content img {
    max-width: 100%;
    height: auto;
    margin: 10px auto;
    display: block;
  }

  .entry {
    padding: 10px;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .modal-window {
    width: 350px;
    height: 400px;
  }
}

/* Small screen tweaks for about-banner */
@media (max-width: 480px) {
  .about-banner {
    max-width: 100%;
    width: 100%;
    margin: 8px 0;
    padding: 10px;
    font-size: 12px;
    box-shadow: none;
    border-radius: 4px;
  }
}

/* Robust marquee and mobile safety overrides
   - ensure marquee doesn't overflow and uses a single, predictable keyframe
   - force main-content and media elements to be safe on small screens
*/
.info-bar {
  overflow: hidden;
  position: relative;
}

.info-bar span {
  display: inline-block;
  white-space: nowrap;
  position: relative;
  padding-left: 1rem;
  animation: marquee 15s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

@media (max-width: 768px) {
  .info-bar span {
    animation-duration: 10s;
    padding-left: 0.5rem;
  }
}

/* stronger mobile/responsive safety rules to override inline page styles */
@media (max-width: 1024px) {
  .main-content {
    margin-left: 0 !important;
    padding: 16px !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  html,
  body {
    overflow-x: hidden;
  }

  .folders-container,
  .folder-content {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .folder-content {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 12px !important;
  }

  .photo-frame img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .track-card {
    min-width: 0 !important;
  }
}
