/* ==========================================================================
   DAY OF THE TENTACLE (D.O.T.T.) - LUCASARTS SCUMM ADVENTURE EDITION
   Gottfried Szing Portfolio - Maniac Mansion II Homage
   ========================================================================== */

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

:root {
  --dott-bg-dark: #0f0a1c;
  --dott-purple: #7b1fa2;
  --dott-purple-light: #ba68c8;
  --dott-purple-dark: #4a148c;
  --dott-tentacle-purple: #9c27b0;
  --dott-sludge-green: #00e676;
  --dott-sludge-glow: #69f0ae;
  --dott-amber: #ffb300;
  --dott-gold: #ffd54f;
  --dott-cyan: #00e5ff;
  --dott-scumm-blue: #0000a8;
  --dott-scumm-verb: #00ffaa;
  --dott-scumm-hover: #ffffff;
  --dott-wood-brown: #5d4037;
  --dott-wood-light: #8d6e63;
  --dott-font-pixel: 'Press Start 2P', monospace;
  --dott-font-scumm: 'VT323', monospace;
  --dott-font-comic: 'Bungee', cursive;
  --dott-font-ui: 'Nunito', sans-serif;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--dott-bg-dark);
  background-image: radial-gradient(circle at 50% 30%, #2a164d 0%, #0d061a 100%);
  color: #ffffff;
  font-family: var(--dott-font-scumm);
  font-size: 20px;
  line-height: 1.3;
  overflow-x: hidden;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--dott-sludge-green);
  color: #000000;
  padding: 10px 18px;
  font-family: var(--dott-font-pixel);
  font-size: 14px;
  z-index: 999999;
  border-radius: 4px;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus {
  top: 10px;
}

/* ==========================================================================
   TOP RETRO NAVIGATION & BRANDING BAR
   ========================================================================== */
.dott-top-bar {
  background: linear-gradient(180deg, #2d1254 0%, #15082a 100%);
  border-bottom: 4px solid var(--dott-amber);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  position: relative;
  z-index: 100;
}

.dott-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #ffffff;
}

.dott-tentacle-icon {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 8px var(--dott-purple-light));
  animation: tentacle-wiggle 3s ease-in-out infinite;
}

@keyframes tentacle-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.05); }
  75% { transform: rotate(8deg) scale(1.05); }
}

.dott-title-group h1 {
  font-family: var(--dott-font-comic);
  font-size: 1.3rem;
  color: var(--dott-gold);
  text-shadow: 3px 3px 0px #b71c1c, 0 0 10px rgba(255, 213, 79, 0.5);
  letter-spacing: 1px;
}

.dott-title-group p {
  font-family: var(--dott-font-pixel);
  font-size: 0.6rem;
  color: var(--dott-sludge-green);
  text-shadow: 1px 1px 0px #000;
}

/* Top Actions */
.dott-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dott-btn {
  background: #311b92;
  color: #ffffff;
  border: 2px solid var(--dott-purple-light);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--dott-font-pixel);
  font-size: 0.65rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 #1a0847;
  transition: all 0.15s ease;
  text-decoration: none;
}

.dott-btn:hover {
  background: var(--dott-purple);
  border-color: var(--dott-gold);
  color: var(--dott-gold);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #1a0847;
}

.dott-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1a0847;
}

.dott-btn.btn-active {
  background: var(--dott-sludge-green);
  color: #000000;
  border-color: #ffffff;
}

/* Time Travel Epoch Selector */
.time-travel-selector {
  display: flex;
  background: #110724;
  border: 2px solid var(--dott-amber);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.time-tab {
  padding: 6px 10px;
  font-family: var(--dott-font-pixel);
  font-size: 0.6rem;
  background: transparent;
  color: #aaaaaa;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-tab:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

.time-tab.active {
  background: var(--dott-purple);
  color: var(--dott-gold);
  font-weight: bold;
  box-shadow: 0 0 10px var(--dott-purple-light);
}

/* ==========================================================================
   MAIN SCUMM GAME HOUSING & SCREEN
   ========================================================================== */
.dott-wrapper {
  max-width: 1080px;
  margin: 25px auto 40px;
  padding: 0 15px;
}

.scumm-arcade-cabinet {
  background: #1e1338;
  border: 6px solid #4a148c;
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 30px rgba(186, 104, 200, 0.25);
  overflow: hidden;
  position: relative;
}

/* CRT Overlay Effect */
.crt-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.35) 50%
  );
  background-size: 100% 4px;
  opacity: 0.7;
}

.crt-scanlines.disabled {
  display: none;
}

/* ==========================================================================
   SCENE VIEWPORT (TOP 60% OF SCREEN)
   ========================================================================== */
.scumm-viewport {
  position: relative;
  width: 100%;
  height: 480px;
  background: #0a0414;
  overflow: hidden;
  border-bottom: 6px solid #ffb300;
  cursor: crosshair;
  user-select: none;
}

/* Scene SVG Canvas Background */
.scene-art {
  width: 100%;
  height: 100%;
  display: block;
}

/* Floating Subtitle / Speech Bubble */
.dott-speech-bubble {
  position: absolute;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  background: rgba(0, 0, 0, 0.88);
  border: 3px solid var(--dott-gold);
  border-radius: 12px;
  padding: 14px 22px;
  color: var(--dott-gold);
  font-family: var(--dott-font-scumm);
  font-size: 26px;
  text-align: center;
  letter-spacing: 1px;
  line-height: 1.25;
  box-shadow: 0 8px 24px rgba(0,0,0,0.8), 0 0 15px rgba(255, 213, 79, 0.3);
  z-index: 40;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.dott-speech-bubble.character-bernard {
  color: #ffff55;
  border-color: #ffff55;
}

.dott-speech-bubble.character-tentacle {
  color: #ff55ff;
  border-color: #e040fb;
  text-shadow: 0 0 8px #d500f9;
}

.dott-speech-bubble.character-gottfried {
  color: #00ffff;
  border-color: #00e5ff;
  text-shadow: 0 0 8px #00b0ff;
}

.dott-speech-bubble.character-hoagie {
  color: #69f0ae;
  border-color: #00e676;
}

.dott-speech-bubble.character-laverne {
  color: #ff80ab;
  border-color: #ff4081;
}

/* Interactive Scene Hotspots */
.hotspot {
  position: absolute;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 20;
}

.hotspot:hover {
  filter: drop-shadow(0 0 10px var(--dott-sludge-glow));
}

/* Character Actor Sprite */
.scumm-actor {
  position: absolute;
  bottom: 40px;
  left: 320px;
  width: 90px;
  height: 170px;
  z-index: 25;
  transition: left 0.9s cubic-bezier(0.25, 1, 0.5, 1), bottom 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: auto;
  cursor: pointer;
}

.actor-gottfried {
  filter: drop-shadow(0 5px 12px rgba(0,0,0,0.7));
}

/* Walking Bobbing Animation */
.scumm-actor.walking {
  animation: actor-walk 0.3s steps(2) infinite;
}

@keyframes actor-walk {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* Purple Tentacle in Scene */
.tentacle-actor {
  position: absolute;
  bottom: 60px;
  right: 120px;
  width: 130px;
  height: 190px;
  z-index: 22;
  cursor: pointer;
  animation: tentacle-idle 4s ease-in-out infinite;
}

@keyframes tentacle-idle {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.04, 0.96) translateY(4px); }
}

/* Chron-o-John Flush Pods */
.chrono-john {
  position: absolute;
  bottom: 80px;
  left: 60px;
  width: 140px;
  height: 220px;
  z-index: 15;
  cursor: pointer;
}

/* Sludge-O-Matic Machine */
.sludge-o-matic {
  position: absolute;
  bottom: 90px;
  right: 270px;
  width: 110px;
  height: 180px;
  z-index: 18;
  cursor: pointer;
}

/* ==========================================================================
   SCUMM COMMAND SENTENCE BAR (THE ACTION LINE)
   ========================================================================== */
.scumm-sentence-bar {
  background: #000000;
  border-top: 3px solid #333333;
  border-bottom: 3px solid #000088;
  padding: 10px 20px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scumm-sentence-text {
  font-family: var(--dott-font-scumm);
  font-size: 26px;
  color: var(--dott-scumm-verb);
  text-shadow: 2px 2px 0px #000000;
  letter-spacing: 2px;
  text-transform: capitalize;
  text-align: center;
}

.scumm-sentence-text .highlight {
  color: #ffffff;
}

/* ==========================================================================
   SCUMM LOWER CONSOLE: 9 VERBS + INVENTORY TRAY
   ========================================================================== */
.scumm-lower-console {
  display: grid;
  grid-template-columns: 360px 1fr;
  background: var(--dott-scumm-blue);
  background-image: linear-gradient(180deg, #0000a8 0%, #000054 100%);
  min-height: 200px;
  padding: 12px 16px;
  gap: 16px;
  position: relative;
}

/* SCUMM Verbs 3x3 Grid */
.scumm-verbs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}

.scumm-verb-btn {
  background: transparent;
  border: none;
  color: var(--dott-scumm-verb);
  font-family: var(--dott-font-scumm);
  font-size: 28px;
  text-align: center;
  cursor: pointer;
  padding: 4px 6px;
  text-shadow: 2px 2px 0px #000000;
  transition: all 0.1s ease;
  user-select: none;
}

.scumm-verb-btn:hover {
  color: var(--dott-scumm-hover);
  transform: scale(1.08);
}

.scumm-verb-btn.active {
  color: #ffffff;
  text-shadow: 0 0 10px #ffffff, 2px 2px 0px #000000;
  font-weight: bold;
}

/* SCUMM Inventory Section */
.scumm-inventory-container {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 10px;
  background: #000054;
  border: 3px solid #0055ff;
  border-radius: 6px;
  padding: 8px;
}

.scumm-inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  height: 100%;
}

.inventory-slot {
  background: #000028;
  border: 2px solid #0088ff;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.inventory-slot:hover {
  background: #002277;
  border-color: var(--dott-gold);
  transform: translateY(-2px);
}

.inventory-slot.selected {
  border-color: var(--dott-sludge-green);
  box-shadow: 0 0 8px var(--dott-sludge-green);
}

.inv-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.inv-title {
  font-family: var(--dott-font-pixel);
  font-size: 0.48rem;
  color: #e0e0e0;
  text-align: center;
  line-height: 1.1;
}

/* Inventory Scroll Arrows */
.inventory-arrows {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.inv-arrow-btn {
  flex: 1;
  background: #002288;
  border: 2px solid #00aaff;
  color: #ffffff;
  font-family: var(--dott-font-scumm);
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-arrow-btn:hover {
  background: #0055ff;
  color: var(--dott-gold);
}

/* ==========================================================================
   SCUMM INTERACTIVE DIALOGUE TREE OVERLAY
   ========================================================================== */
.scumm-dialogue-box {
  display: none;
  grid-column: 1 / -1;
  background: #000000;
  border: 3px solid var(--dott-gold);
  border-radius: 6px;
  padding: 12px 18px;
  z-index: 60;
  animation: dialogue-appear 0.2s ease-out;
}

@keyframes dialogue-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dialogue-speaker {
  font-family: var(--dott-font-pixel);
  font-size: 0.75rem;
  color: var(--dott-gold);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #555555;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialogue-options-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialogue-choice {
  color: #aaffee;
  font-family: var(--dott-font-scumm);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.dialogue-choice:hover {
  background: #002266;
  color: #ffff55;
  transform: translateX(6px);
}

/* ==========================================================================
   DOSSIER & ITEM INSPECTION MODAL (LUCASARTS HINTBOOK STYLE)
   ========================================================================== */
.dott-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 4, 16, 0.88);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  padding: 20px;
}

.dott-modal-backdrop.open {
  display: flex;
}

.dott-hintbook {
  background: #fbf5e6;
  color: #2b1f14;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  border: 10px solid #8d6e63;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), inset 0 0 30px rgba(141, 110, 99, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  font-family: var(--dott-font-ui);
}

.hintbook-header {
  background: #5d4037;
  color: #ffd54f;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 4px solid #3e2723;
}

.hintbook-header h2 {
  font-family: var(--dott-font-comic);
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.hintbook-close {
  background: #d32f2f;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-family: var(--dott-font-pixel);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.hintbook-close:hover {
  transform: scale(1.15) rotate(90deg);
}

.hintbook-tabs {
  background: #d7ccc8;
  display: flex;
  gap: 4px;
  padding: 8px 16px 0;
  border-bottom: 3px solid #8d6e63;
  overflow-x: auto;
}

.hintbook-tab {
  background: #a1887f;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-family: var(--dott-font-pixel);
  font-size: 0.65rem;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.hintbook-tab.active {
  background: #fbf5e6;
  color: #3e2723;
  font-weight: bold;
}

.hintbook-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.6;
}

.hintbook-section {
  display: none;
}

.hintbook-section.active {
  display: block;
}

/* Hintbook Dossier Styling */
.dossier-profile-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  background: #efebe9;
  border: 2px dashed #8d6e63;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.dossier-avatar {
  width: 130px;
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
  border: 3px solid #5d4037;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.dossier-card {
  background: #ffffff;
  border: 1px solid #d7ccc8;
  border-left: 6px solid var(--dott-purple);
  border-radius: 6px;
  padding: 14px 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.dossier-card h4 {
  color: var(--dott-purple-dark);
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.dossier-meta {
  font-size: 0.88rem;
  color: #795548;
  font-weight: 700;
  margin-bottom: 8px;
}

.dossier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.dossier-tag {
  background: #ede7f6;
  color: #512da8;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* ==========================================================================
   SLUDGE-O-MATIC INTERACTIVE LAB CONTROLS
   ========================================================================== */
.sludge-control-drawer {
  margin-top: 25px;
  background: #190c2e;
  border: 4px solid var(--dott-sludge-green);
  border-radius: 12px;
  padding: 16px 22px;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.2);
}

.sludge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sludge-title {
  font-family: var(--dott-font-comic);
  color: var(--dott-sludge-green);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sludge-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-label {
  font-family: var(--dott-font-pixel);
  font-size: 0.62rem;
  color: var(--dott-gold);
  display: flex;
  justify-content: space-between;
}

.dott-range {
  width: 100%;
  accent-color: var(--dott-sludge-green);
  cursor: pointer;
}

/* ==========================================================================
   TIME FLUSH TOAST NOTIFICATION
   ========================================================================== */
.flush-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #4a148c;
  color: var(--dott-gold);
  border: 3px solid var(--dott-sludge-green);
  padding: 14px 20px;
  border-radius: 10px;
  font-family: var(--dott-font-pixel);
  font-size: 0.72rem;
  z-index: 999999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  gap: 12px;
  animation: slide-toast 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slide-toast {
  from { transform: translateX(120%); }
  to { transform: translateX(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 860px) {
  .scumm-lower-console {
    grid-template-columns: 1fr;
  }
  .scumm-verbs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .scumm-viewport {
    height: 380px;
  }
  .dott-speech-bubble {
    font-size: 20px;
    top: 20px;
  }
  .scumm-actor {
    width: 70px;
    height: 130px;
    bottom: 30px;
  }
  .tentacle-actor {
    width: 100px;
    height: 150px;
    bottom: 45px;
  }
  .dossier-profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .dossier-avatar {
    margin: 0 auto;
  }
}
