/* WILFORD - Visual Novel Style Layout */
/* PC98 aesthetic with proper VN UI positioning */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* PC98 16-color palette */
:root {
  --pc98-black: #000000;
  --pc98-dark-gray: #222222;
  --pc98-mid-gray: #444444;
  --pc98-blue-gray: #556666;
  --pc98-light-gray: #99aabb;
  --pc98-white: #ffffff;
  --pc98-dark-red: #773333;
  --pc98-rose: #bb7766;
  --pc98-peach: #eeaa99;
  --pc98-cream: #ffddcc;
  --pc98-blue: #5566cc;
  --pc98-periwinkle: #bbccff;
  --pc98-teal: #339988;
  --pc98-gold: #ffbb66;
  --pc98-coral: #dd4455;
  --pc98-pink: #ff99aa;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Press Start 2P', monospace;
  background: var(--pc98-black);
  color: var(--pc98-cream);
  font-size: 10px;
  line-height: 1.8;
  image-rendering: pixelated;
}

/* ========== SCREEN BASE ========== */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 1;
}

.screen.active {
  display: block;
}

/* ========== TITLE SCREEN ========== */
#title-screen {
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.5) 100%),
    url('../assets/pc98/Sci-Fi/Cosmic Psycho 177.png');
  background-size: cover;
  background-position: center;
}

.vn-title-overlay {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 30px 50px;
  background: rgba(0, 0, 0, 0.85);
  border: 4px solid var(--pc98-coral);
  box-shadow:
    0 0 0 2px var(--pc98-black),
    0 0 20px rgba(221, 68, 85, 0.5);
}

.main-title {
  font-size: 48px;
  color: var(--pc98-coral);
  text-shadow:
    4px 4px 0 var(--pc98-dark-red),
    -1px -1px 0 var(--pc98-pink);
  margin-bottom: 10px;
  letter-spacing: 4px;
}

.subtitle {
  font-size: 10px;
  color: var(--pc98-teal);
  margin-bottom: 30px;
}

.press-start {
  font-size: 14px;
  color: var(--pc98-gold);
  margin-bottom: 10px;
}

.hint {
  font-size: 8px;
  color: var(--pc98-mid-gray);
}

.blink {
  animation: blink 0.8s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ========== MAIN MENU - Side Panel Style (FF7) ========== */
#main-menu {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 30%, transparent 50%),
    url('../assets/pc98/Contemporary Interiors/Ambivalenz 147.png');
  background-size: cover;
  background-position: center;
}

.vn-layout {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 20px;
}

.side-menu-panel {
  width: 280px;
  background: linear-gradient(135deg, var(--pc98-blue) 0%, #3344aa 100%);
  border: 4px solid var(--pc98-periwinkle);
  box-shadow:
    inset 3px 3px 0 var(--pc98-light-gray),
    inset -3px -3px 0 #334488,
    8px 8px 0 rgba(0,0,0,0.5);
}

.menu-header-box {
  background: var(--pc98-coral);
  padding: 15px;
  border-bottom: 3px solid var(--pc98-dark-red);
  text-align: center;
}

.menu-header-box h1 {
  font-size: 20px;
  color: var(--pc98-white);
  text-shadow: 2px 2px 0 var(--pc98-dark-red);
}

.location-text {
  font-size: 8px;
  color: var(--pc98-peach);
  margin-top: 5px;
}

.menu-list {
  list-style: none;
  padding: 10px;
  background: rgba(0,0,0,0.4);
  margin: 5px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin: 3px 0;
  cursor: pointer;
  background: var(--pc98-dark-gray);
  border: 2px solid transparent;
  transition: all 0.1s;
}

.menu-item:hover,
.menu-item.active {
  background: var(--pc98-blue);
  border-color: var(--pc98-gold);
}

.menu-item .cursor {
  opacity: 0;
  color: var(--pc98-gold);
  margin-right: 10px;
  font-size: 10px;
}

.menu-item.active .cursor {
  opacity: 1;
  animation: cursorPulse 0.4s steps(1) infinite;
}

@keyframes cursorPulse {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.3; }
}

.menu-text {
  font-size: 11px;
  color: var(--pc98-cream);
}

.secret-item {
  opacity: 0.4;
}

.secret-item:hover {
  opacity: 1;
}

.menu-footer-box {
  padding: 10px;
  background: var(--pc98-dark-gray);
  border-top: 2px solid var(--pc98-mid-gray);
  text-align: center;
}

.menu-footer-box p {
  font-size: 7px;
  color: var(--pc98-light-gray);
  margin: 2px 0;
}

/* ========== BOTTOM PANEL LAYOUT (Discography, Contact) ========== */
.vn-bottom-layout {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.bottom-panel {
  background: linear-gradient(135deg, var(--pc98-blue) 0%, #3344aa 100%);
  border: 4px solid var(--pc98-periwinkle);
  box-shadow:
    inset 3px 3px 0 var(--pc98-light-gray),
    inset -3px -3px 0 #334488,
    0 -5px 20px rgba(0,0,0,0.5);
  max-height: 45vh;
  display: flex;
  flex-direction: column;
}

.wide-panel {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.message-panel {
  max-width: 500px;
  margin: 0 auto;
}

.panel-title {
  background: var(--pc98-coral);
  color: var(--pc98-white);
  padding: 8px 15px;
  font-size: 10px;
  border-bottom: 3px solid var(--pc98-dark-red);
  text-shadow: 1px 1px 0 var(--pc98-dark-red);
}

.panel-content {
  padding: 15px;
  background: rgba(0,0,0,0.4);
  margin: 5px;
  flex: 1;
  overflow-y: auto;
}

.scrollable {
  max-height: 25vh;
}

/* Album List */
.album-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.album-row {
  display: flex;
  align-items: center;
  padding: 10px;
  background: var(--pc98-dark-gray);
  border: 2px solid transparent;
  text-decoration: none;
  color: var(--pc98-cream);
  transition: all 0.1s;
}

.album-row:hover {
  background: var(--pc98-blue);
  border-color: var(--pc98-gold);
}

.album-icon {
  font-size: 16px;
  margin-right: 12px;
  color: var(--pc98-gold);
}

.album-name {
  flex: 1;
  font-size: 9px;
}

.album-year {
  font-size: 8px;
  color: var(--pc98-teal);
  margin-left: 10px;
}

.singles-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: var(--pc98-dark-red);
  border: 2px solid var(--pc98-rose);
}

.singles-label {
  font-size: 8px;
  color: var(--pc98-gold);
}

.single-name {
  font-size: 8px;
  color: var(--pc98-peach);
  padding: 3px 8px;
  background: rgba(0,0,0,0.3);
}

/* ========== VN DIALOGUE LAYOUT (Bio) ========== */
#bio-screen {
  background:
    linear-gradient(to bottom, transparent 0%, transparent 60%, rgba(0,0,0,0.7) 100%),
    url('../assets/pc98/Japanese Traditional/Beast 002.png');
  background-size: cover;
  background-position: center;
}

.vn-dialogue-layout {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  position: relative;
}

.name-plate {
  position: absolute;
  bottom: calc(25vh + 30px);
  left: 40px;
  background: var(--pc98-coral);
  color: var(--pc98-white);
  padding: 8px 20px;
  font-size: 12px;
  border: 3px solid var(--pc98-pink);
  box-shadow: 3px 3px 0 var(--pc98-dark-red);
}

.dialogue-box-vn {
  background: linear-gradient(135deg, rgba(0,0,50,0.95) 0%, rgba(0,0,30,0.95) 100%);
  border: 4px solid var(--pc98-periwinkle);
  padding: 20px 25px;
  min-height: 20vh;
  max-height: 25vh;
  position: relative;
  box-shadow:
    inset 3px 3px 0 var(--pc98-light-gray),
    inset -3px -3px 0 #334488;
}

.dialogue-text {
  font-size: 11px;
  line-height: 2.4;
  color: var(--pc98-cream);
}

.dialogue-next {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 9px;
  color: var(--pc98-gold);
}

.floating-back {
  position: absolute;
  top: 20px;
  right: 20px;
  width: auto;
  padding: 10px 15px;
  background: rgba(0,0,0,0.8);
  border: 2px solid var(--pc98-mid-gray);
}

/* ========== CENTER PANEL LAYOUT (Listen, Secrets) ========== */
.vn-center-layout {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.center-panel {
  background: linear-gradient(135deg, var(--pc98-blue) 0%, #3344aa 100%);
  border: 4px solid var(--pc98-periwinkle);
  box-shadow:
    inset 3px 3px 0 var(--pc98-light-gray),
    inset -3px -3px 0 #334488,
    10px 10px 0 rgba(0,0,0,0.5);
  padding: 0;
  min-width: 350px;
}

/* Platform Grid */
.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 15px;
  background: rgba(0,0,0,0.4);
  margin: 5px;
}

.platform-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--pc98-dark-gray);
  border: 3px solid var(--pc98-mid-gray);
  text-decoration: none;
  color: var(--pc98-cream);
  transition: all 0.1s;
}

.platform-button:hover {
  background: var(--pc98-coral);
  border-color: var(--pc98-pink);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--pc98-dark-red);
}

.platform-name {
  font-size: 10px;
}

/* ========== INVENTORY PANEL (Links) ========== */
#links-screen {
  background:
    linear-gradient(90deg, transparent 0%, transparent 60%, rgba(0,0,0,0.7) 100%),
    url('../assets/pc98/Fantasy/Angel Night 216.png');
  background-size: cover;
  background-position: center;
}

#links-screen .vn-layout {
  justify-content: flex-end;
}

.inventory-panel {
  width: 320px;
  background: linear-gradient(135deg, var(--pc98-blue) 0%, #3344aa 100%);
  border: 4px solid var(--pc98-periwinkle);
  box-shadow:
    inset 3px 3px 0 var(--pc98-light-gray),
    inset -3px -3px 0 #334488,
    -8px 8px 0 rgba(0,0,0,0.5);
}

.inventory-list {
  list-style: none;
  padding: 10px;
  background: rgba(0,0,0,0.4);
  margin: 5px;
}

.inventory-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin: 4px 0;
  background: var(--pc98-dark-gray);
  border-left: 4px solid var(--pc98-coral);
}

.inventory-item:hover {
  background: var(--pc98-blue);
}

.item-icon {
  font-size: 18px;
  margin-right: 12px;
}

.inventory-item a {
  flex: 1;
  color: var(--pc98-teal);
  text-decoration: none;
  font-size: 10px;
}

.inventory-item a:hover {
  color: var(--pc98-cream);
}

.item-qty {
  font-size: 9px;
  color: var(--pc98-gold);
}

.item-description {
  padding: 10px;
  background: var(--pc98-dark-gray);
  margin: 5px;
  border-top: 2px solid var(--pc98-mid-gray);
}

.item-description p {
  font-size: 8px;
  color: var(--pc98-light-gray);
}

/* ========== DISCOGRAPHY SCREEN ========== */
#discography-screen {
  background:
    linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0,0,0,0.8) 100%),
    url('../assets/pc98/Contemporary Interiors/Akiko Gold 123.png');
  background-size: cover;
  background-position: center;
}

/* ========== LISTEN SCREEN ========== */
#listen-screen {
  background:
    radial-gradient(circle at center, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7) 100%),
    url('../assets/pc98/Sci-Fi/Cyber Illusion 134.png');
  background-size: cover;
  background-position: center;
}

/* ========== CONTACT SCREEN ========== */
#contact-screen {
  background:
    linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(0,0,0,0.8) 100%),
    url('../assets/pc98/Contemporary Exteriors (Night)/Anniversary 126.png');
  background-size: cover;
  background-position: center;
}

.message-content {
  padding: 20px;
  text-align: center;
  background: rgba(0,0,0,0.4);
  margin: 5px;
}

.message-text {
  font-size: 9px;
  margin-bottom: 20px;
  color: var(--pc98-peach);
}

.message-note {
  font-size: 7px;
  color: var(--pc98-mid-gray);
  margin-top: 15px;
}

/* ========== SECRETS SCREEN ========== */
#secrets-screen {
  background:
    radial-gradient(circle at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%),
    url('../assets/pc98/Monochromatic/Angel Halo 165.png');
  background-size: cover;
  background-position: center;
}

.secret-panel {
  background: rgba(0,0,0,0.9);
  border: 4px solid var(--pc98-coral);
  padding: 30px;
  text-align: center;
  box-shadow: 0 0 30px rgba(221, 68, 85, 0.3);
}

.glitch-text {
  font-size: 20px;
  color: var(--pc98-coral);
  text-shadow: 2px 0 var(--pc98-teal), -2px 0 var(--pc98-pink);
  animation: glitch 0.5s steps(2) infinite;
  margin-bottom: 15px;
}

@keyframes glitch {
  0% { text-shadow: 2px 0 var(--pc98-teal), -2px 0 var(--pc98-pink); }
  50% { text-shadow: -2px 0 var(--pc98-teal), 2px 0 var(--pc98-pink); }
}

.secret-msg {
  font-size: 10px;
  color: var(--pc98-cream);
  margin-bottom: 15px;
}

.secret-art {
  color: var(--pc98-gold);
  font-size: 14px;
  margin: 20px 0;
}

.konami-hint {
  font-size: 7px;
  color: var(--pc98-mid-gray);
  margin-bottom: 20px;
}

/* ========== BUTTONS ========== */
.jrpg-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--pc98-coral);
  border: 3px solid var(--pc98-pink);
  color: var(--pc98-white);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 2px 2px 0 var(--pc98-pink),
    inset -2px -2px 0 var(--pc98-dark-red),
    4px 4px 0 var(--pc98-black);
  transition: all 0.1s;
}

.jrpg-button:hover {
  background: var(--pc98-pink);
  transform: translate(-2px, -2px);
  box-shadow:
    inset 2px 2px 0 var(--pc98-cream),
    inset -2px -2px 0 var(--pc98-coral),
    6px 6px 0 var(--pc98-black);
}

.back-button {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--pc98-mid-gray);
  border: none;
  border-top: 2px solid var(--pc98-light-gray);
  color: var(--pc98-cream);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  cursor: pointer;
  transition: background 0.1s;
}

.back-button:hover {
  background: var(--pc98-blue-gray);
}

/* ========== KONAMI OVERLAY ========== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.overlay.hidden {
  display: none;
}

.konami-content {
  text-align: center;
  padding: 40px;
  border: 4px solid var(--pc98-gold);
  background: var(--pc98-dark-red);
  box-shadow: 0 0 50px rgba(255, 187, 102, 0.3);
}

.rainbow-text {
  font-size: 18px;
  animation: rainbow 0.5s steps(4) infinite;
}

@keyframes rainbow {
  0% { color: var(--pc98-coral); }
  25% { color: var(--pc98-gold); }
  50% { color: var(--pc98-teal); }
  75% { color: var(--pc98-pink); }
}

.pixel-art-reward {
  color: var(--pc98-cream);
  font-size: 12px;
  margin: 20px 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .main-title {
    font-size: 28px;
  }

  .vn-title-overlay {
    padding: 20px 30px;
    bottom: 10%;
  }

  .side-menu-panel,
  .inventory-panel {
    width: 100%;
    max-width: 300px;
  }

  .vn-layout {
    justify-content: center;
  }

  #links-screen .vn-layout {
    justify-content: center;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    max-width: 100%;
  }

  .dialogue-box-vn {
    min-height: 25vh;
  }

  .name-plate {
    left: 20px;
    font-size: 10px;
    padding: 6px 15px;
  }
}
