/* ================================ VARIABLES ================================ */
:root {
  --beige: #fdf5c2;
  --red: #d5242b;
  --gold: #bbae89;
  --dark: #33201a;
  --maroon: #822125;
}

/* ================================ BASE ================================ */
* {
  box-sizing: border-box;
  cursor: url('cursor.png'), auto;
}
body, html {
  height: 100%;
  margin: 0;
  font-family: "MS Sans Serif", "MS Serif", Courier, sans-serif;
  background: linear-gradient(120deg, var(--beige), var(--gold));
  color: var(--dark);
}

/* ================================ SIDEBAR ================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 220px;
  height: 100vh;
  background: var(--beige);
  border-right: 3px solid var(--gold);
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 20;
  box-shadow: 4px 4px 0 var(--dark);
}

.logo {
  width: 140px;
  margin-bottom: 12px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 2px solid var(--beige);
  border-bottom: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-radius: 3px;
  text-decoration: none;
  color: var(--dark);
  background: var(--beige);
  font-weight: bold;
  transition: all 0.1s linear;
}

.sidebar a:hover, .sidebar a.active {
  background: var(--red);
  color: var(--beige);
  border: 2px solid var(--gold);
  transform: translateX(4px);
}

.icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}

/* ================================ MAIN WINDOW ================================ */
.window {
  position: absolute;
  top: 20px;
  left: 220px;
  right: 20px;
  bottom: 20px;
  background: var(--beige);
  border: 3px solid var(--gold);
  border-radius: 4px;
  overflow: auto;
  box-shadow: 6px 6px 0 var(--dark);
  display: flex;
  flex-direction: column;
}

.title-bar {
  background: var(--red);
  color: var(--beige);
  padding: 8px 12px;
  font-weight: bold;
  text-align: center;
  border-bottom: 2px solid var(--gold);
  box-shadow: inset 0 -2px 0 var(--dark);
  font-family: "MS Sans Serif", sans-serif;
  user-select: none;
}

.content-area {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  display: none;
  opacity: 0;
  transform: scale(0.98);
  transition: all 0.28s ease;
}

.section.show {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.hh-head {
  font-family: 'UnifrakturCook', cursive;
  color: var(--maroon);
  font-size: 28px;
  text-align: center;
  margin: 8px 0 16px 0;
}

.lead {
  text-align: center;
  color: var(--dark);
  margin-bottom: 12px;
}

/* ================================ VIDEO GRID ================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.video-item {
  background: var(--beige);
  border: 3px solid var(--dark);
  padding: 10px;
  box-shadow: 5px 5px 0 var(--dark);
  display: flex;
  flex-direction: column;
}

.video-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 2px inset var(--dark);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* ================================ CHARACTERS GRID ================================ */
.character-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  background: var(--beige);
  border: 3px solid var(--dark);
  border-radius: 4px;
  padding: 12px;
  box-shadow: 4px 4px 0 var(--dark);
}

.character-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 3px inset var(--dark);
  border-radius: 2px;
  background: var(--beige);
}

.character-info {
  flex: 1;
  min-width: 200px;
}

.character-info h3 {
  color: var(--maroon);
  margin: 0 0 6px 0;
  font-size: 18px;
}

.character-info p {
  margin: 4px 0;
  line-height: 1.4;
}

.dates {
  font-weight: bold;
  color: var(--red);
}

/* ================================ FLOATING MINI PLAYER ================================ */
#floating-video {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 360px;
  background: var(--beige);
  border: 3px solid var(--gold);
  box-shadow: 6px 6px 0 var(--dark);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  z-index: 9999;
}

.mini-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  background: var(--red);
  color: var(--beige);
  border-bottom: 2px solid var(--gold);
  cursor: grab;
}

.mini-top .controls button {
  width: 20px;
  height: 20px;
  border: 2px solid var(--dark);
  background: var(--beige);
  cursor: pointer;
  font-weight: bold;
}

.mini-top .controls button:hover {
  background: var(--red);
  color: var(--beige);
}

.mini-body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px;
  background: var(--beige);
}

.mini-iframe {
  width: 100%;
  height: 180px;
  border: 2px inset var(--dark);
}

.mini-iframe iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.mini-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--beige);
}

.mini-play {
  background: var(--red);
  border: 2px solid var(--dark);
  padding: 4px 6px;
  border-radius: 2px;
  cursor: pointer;
}

.mini-play img {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
}

#mini-volume {
  width: 120px;
  cursor: pointer;
}

/* ================================ RESTORE ICON ================================ */
#restore-icon {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--red);
  color: var(--beige);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--dark);
}

#restore-icon img {
  width: 65%;
  height: 65%;
  object-fit: contain;
  filter: invert(95%) sepia(10%) saturate(300%) hue-rotate(350deg);
}

/* ================================ RESPONSIVE ================================ */
@media (max-width: 920px) {
  .window {
    left: 180px;
    right: 12px;
  }
  .logo { width: 120px; }
  .icon { width: 28px; height: 28px; }
  .character-img { width: 120px; height: 120px; }
  .video-wrap { aspect-ratio: 4/3; }
}
