/* THIS CODE IS PROPERTY OF MOON RABBITS! DON'T TOUCH!*/
/* artificial rabbits were used in some aspects, or reused assets from other projects of mine.. ill figure out how to do them myself soon.. im still learning :) */




/* warning ↓↓↓ " The universal selector (*) is known to be slow." idc pal..*/
* { 
  box-sizing: border-box; 
}

:root {
  --text:#181017;
  --navy: #181010;
  --navy-dark:#f9c5ef;
  --gold:#ffcc00;
  --lav:#e0d4f0;
  --lav-line:#9b8bb4;
  --link: #181010;
  --visited: #c47f7f;
  --paper:#fdfcf7;
  --navbg: #facff2;
  --mainbg: url('/img/waterbg.jpg');
}

/*is there a better way to do this fontface thing in one singular chunk?*/

@font-face {
  font-family: 'MSMINCHO';
  src: url('/css/MSMINCHO.TTF') format('truetype');
}

@font-face {
  font-family: 'chiarostd';
  src: url('/css/chiarostd_b.otf') format('opentype');
}

.maintextcontent {
  font-family: 'MSMINCHO';
  font-size: 18px;
}

#wrap{
  max-width:900px;
  margin:0 auto;
  background:var(--navy-dark);
  border:3px solid var(--navy);
  padding: 15px;
}

body {
  background: var(--mainbg);
  background-size: cover;
  color: var(--text);
  font-family: 'chiarostd';
  overflow: hidden;
}

.header {
  text-align: center;
}

.notfound {
  text-align: center;
  color: black;
  background-color: white;
}

.badges {
  cursor: pointer;
  position: fixed;
  bottom: 20px;
  left: 87%;
}

hr {
  border: none;
  border-top: 2px solid black;
}

  /* start of nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  background: var(--navbg);
}

.navlinks {
  display: flex;
  gap: 4px;
}

.navlinks a {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  padding: 6px 12px;
}

.navlinks a:hover {
  background: #f8bced;
}

  /* end of nav */

a {
    color: var(--link);
    text-decoration: none;
}

  /* start of window */

.window {
    position: absolute;
    top: 60px;
    left: 80px;
    width: 500px;
    background: var(--navy-dark);
    border: 1px solid #000;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    user-select: none;
    font-family: Arial;
  }
  
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
  
.img-swap {
  width: 100%;
  aspect-ratio: 16 / 9;
  pointer-events: none;
  user-select: none;
}

.img-swap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0s ease-in-out;
}

.img-swap img.active {
  opacity: 1;
}

.titlebar {
  background: var(--navy-dark);
  color: var(--text);
  font-size: 13px;
  font-weight: bold;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
}

.titlebar:active { 
  cursor: grabbing; 
}

  .titlebar .title {
    flex: 1;
    text-align: center;
    pointer-events: none;
  }

  .win-btn {
    width: 15px; height: 15px;
    padding: 0; border: none; 
    background: transparent;
    cursor: pointer;
    box-shadow: 1px 1px 0 #000;
    flex-shrink: 0;
    image-rendering: auto;
  }
  
  .win-btn:active { 
    box-shadow: none; 
  }

  .win-btn img { width: 100%; height: 100%; display: block; }
  .win-btn:active img { filter: invert(1); } /* cheap "pressed" feedback */

  .content {
    background: #fff;
    padding: 16px 20px;
    max-height: 60vh;
    overflow-y: auto;
    user-select: text;
    cursor: default;
  }
  
  .content h1 { font-size: 20px; margin: 0 0 8px; color: #2b2b6b; }
  .content h2 { font-size: 16px; margin: 18px 0 6px; color: #2b2b6b; }
  .content p { font-size: 13px; line-height: 1.5; margin: 4px 0; }
  .content a { color: #2020c0; }

  .scrollbar {
    height: 16px;
    background: #d4d0c8;
    border-top: 1px solid #888;
    display: flex;
    align-items: center;
    padding: 0 2px;
  }
  .scrollbar .track {
    flex: 1;
    height: 8px;
    background: repeating-linear-gradient(90deg, #b8b4ac 0 2px, #d4d0c8 2px 4px);
    position: relative;
  }
  .scrollbar .thumb {
    width: 20px;
    height: 12px;
    background: #d4d0c8;
    border: 1px solid #888;
    position: absolute;
    top: -2px;
    left: 45%;
  }

  .resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 0 40%, #888 40% 45%, transparent 45% 55%, #888 55% 60%, transparent 60%);
  }
  
  /* end of window */

  /* start of popup */
#popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #4C50CF;
  color: #F2EBFA;
  padding: 16px 24px;
  border-color: gray;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  font-family: Arial;
}

#popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#popup button {
  background: #6C50CF;
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
}

#popup button:hover {
  background: #7B36C9;
}

  /* end of p[opup */