@font-face {
  font-family: 'Ark Pixel';
  src: url('fonts/ark-pixel-10px-monospaced-latin.woff2') format('woff2'),
    url('fonts/ark-pixel-10px-monospaced-ja.woff2') format('woff2'),
    url('fonts/ark-pixel-10px-monospaced-ko.woff2') format('woff2'),
    url('fonts/ark-pixel-10px-monospaced-zh_cn.woff2') format('woff2'),
    url('fonts/ark-pixel-10px-monospaced-zh_hk.woff2') format('woff2'),
    url('fonts/ark-pixel-10px-monospaced-zh_tw.woff2') format('woff2');
}

@font-face {
  font-family: 'WenQuanYi Bitmap Song';
  src: url('fonts/WenQuanYi.Bitmap.Song.16px.ttf');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Ark Pixel', 'WenQuanYi Bitmap Song', monospace;
  background-color: #1c54f5;
  color: #fff;
}

.no-select {
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================
   Section 1: Installation Experience
   ============================================ */

#banner-section {
  position: relative;
  height: 100dvh;
  background-color: #008080;
  overflow: hidden;
  padding: 20px;
}

/* Win95 window */

.win95-window {
  position: absolute;
  width: 800px;
  height: 600px;
  background-color: #c0c0c0;
  border: 2px solid #dfdfdf;
  border-right-color: #808080;
  border-bottom-color: #808080;
  box-shadow: 2px 2px 0 #000;
  display: flex;
  flex-direction: column;
  font-family: 'WenQuanYi Bitmap Song', Arial, sans-serif;
  will-change: transform;
  contain: layout style;
}

.win95-window.dragging {
  box-shadow: none;
}

.win95-titlebar {
  background-color: #000080;
  color: #fff;
  padding: 2px 6px;
  font-weight: bold;
  font-size: 14px;
  cursor: move;
}

.win95-content {
  position: relative;
  flex: 1;
  margin: 2px;
  background: #fff;
  overflow: hidden;
}

.win95-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.win95-resizer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  background-color: #c0c0c0;
  cursor: se-resize;
}

.win95-resizer::before,
.win95-resizer::after {
  content: '';
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  background-color: #000;
}

.win95-resizer::before {
  bottom: 8px;
  right: 8px;
}

/* Scroll hint */

#scroll-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  z-index: 10;
}

#scroll-hint:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Section 2: Installation Context
   ============================================ */

#about-section {
  background-color: #0a0a0a;
  min-height: 100dvh;
  padding: 0;
}

/* 3D Model */

#model-container {
  width: 100%;
  position: relative;
}

model-viewer {
  width: 100%;
  height: 70vh;
  background-color: #111;
  --progress-bar-color: #1c54f5;
}

#model-progress {
  width: 100%;
  height: 3px;
  background: #333;
  position: absolute;
  bottom: 0;
}

#model-progress-bar {
  height: 100%;
  background: #1c54f5;
  width: 0%;
  transition: width 0.1s;
}

#model-caption {
  text-align: center;
  color: #666;
  font-size: 0.8rem;
  padding: 12px;
}

/* About text */

#about-text {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  line-height: 1.8;
}

#about-text h1 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  font-style: italic;
}

#about-text p {
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #ccc;
}

#about-text em {
  font-style: italic;
  color: #fff;
}

#about-text hr {
  border: none;
  border-top: 1px solid #333;
  margin: 32px 0;
}

#about-text a {
  color: #fff;
  text-decoration: underline;
}

#about-text a:hover {
  color: #1c54f5;
}

/* Credits */

#credits p {
  margin-bottom: 16px;
  color: #999;
}

/* Powered by */

#powered-by {
  display: flex;
  align-items: center;
  gap: 16px;
}

#powered-by span {
  color: #666;
  font-size: 0.85rem;
}

#bd2k-logo {
  width: 180px;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.2s;
  filter: invert(1);
}

#bd2k-logo:hover {
  opacity: 1;
}

/* ============================================
   Mobile
   ============================================ */

@media (max-width: 768px) {
  #banner-section {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }

  .win95-window {
    position: static !important;
    width: 100% !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-bottom: 2px solid #808080;
    flex: 1;
    min-height: 0;
  }

  .win95-content iframe {
    width: 200%;
    height: 200%;
    transform: scale(0.5);
    transform-origin: 0 0;
  }

  .win95-titlebar {
    cursor: default;
  }

  .win95-resizer {
    display: none;
  }

  #scroll-hint {
    position: static;
    transform: none;
    width: 100%;
    padding: 10px;
    border: none;
    border-top: 2px solid #808080;
    background: #008080;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    text-align: center;
    flex-shrink: 0;
  }

  model-viewer {
    height: 50vh;
  }

  #about-text {
    padding: 24px 16px 60px;
  }

  #about-text h1 {
    font-size: 1.4rem;
  }
}
