/* 1. Base / Reset */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "DotGothic16", sans-serif;
  color: #413030;
}

/* 2. Layout Shell */
main {
  width: 100%;
  height: 100vh;              
  display: flex;
  flex-direction: column;
  padding: 34px 30px;
  background: #f0eaff;
  
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

h1 {
  margin: 0;
  font-size: 2.0rem;
}

/* 3. Stage (Cat Image) */
.stage {
  flex: 1;                     
  display: flex;
  justify-content: center;
  align-items: center;         
  margin-bottom: 40px;       
  background: transparent;
}

.stage-inner {
  position: relative;
  width: min(260px, 60vw);
  height: min(200px, 45vw);
}

#platform {
  position: absolute;
  bottom: -205px;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;          
  image-rendering: pixelated;
}

#cat {
  position: absolute;
  bottom: -65px;         
  left: 55%;
  transform: translateX(-50%);
  width: 200%;           
  image-rendering: pixelated;
}

.cat-neutral {
  bottom: 34px;
  width: 95%;
  margin-left: 0px;       
}

.cat-suspicious {
  bottom: 34px;
  width: 95%;
  margin-left: 14px;       
}

.cat-defensive {
  bottom: 34px;
  width: 90%;
  margin-left: -4px;       
}

.cat-relaxed {
  bottom: 75px;
  width: 95%;
  margin-left: 0px;
}

.cat-curious {
  bottom: 34px;
  width: 95%;
  margin-left: 3px;
}

.cat-run {
  bottom: 34px;
  width: 95%;
  margin-left: -6px;
}

.cat-success {
  bottom: 36px;
  width: 92%;
  margin-left: 1px;
}

/* 4. Pokémon-style Dialogue Box */
#console {
  margin-top: auto;   
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#textbox {
  height: 90px;            
  overflow-y: auto;      
  display: block;
  background: #f0ecff;                    
  border: 4px solid #c6c7ff;            
  border-radius: 6px;
  padding: 14px 18px;
  min-height: 80px;

  box-shadow:
    0 0 0 3px #e2e2ff inset,              
    0 4px 0 #00000055;                    
}

#textbox-text {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  white-space: pre-line;
  
}

/* 5. Command Panel */
#command-panel {
  background: #ededff;
  border: 3px solid #c6c7ff;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 3px 0 #d6d6ea;
  font-size: 0.7rem;
}

#cmdForm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.prompt-symbol {
  color: #ff0000;
  font-size: 0.95rem;
}

#cmd {
  flex: 1;
  padding: 6px 8px;
  border-radius: 4px;
  border: 2px solid #b8b8d6;
  background: #fcfcff;
  color: #111;
  font-family: inherit;
  font-size: 1.0rem;
}

#cmd::placeholder {
  color: #8888aa;
}

/* 6. Buttons */

button {
  padding: 6px 10px;
  border-radius: 4px;
  border: 2px solid #b8b8e6;
  background: #ededff;
  color: #333;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

button:hover {
  background: #f6f6ff;
}

button:active {
  transform: translateY(1px);
}

button.ghost {
  background: transparent;
}

.exec-btn {
  margin-left: 6px;
}

.restart-btn {
  margin-left: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 2px solid #b8b8e6;
  background: #ededff;
  color: #333;
  font-family: inherit;
}

.restart-btn:hover {
  background: #f6f6ff;
}


/* 7. Hints */
.hints {
  margin-top: 2px;
  opacity: 0.8;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* 8. Trust HUD */
#trust-hud {
  position: absolute;
  top: -35px;
  left: 53%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border: 3px solid #c6c7ff;
  border-radius: 4px;
  background: #f8f8ff;
  box-shadow: 0 3px 0 #d6d6ea;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.trust-label {
  text-transform: lowercase;
  color: #333;
}

.trust-bar {
  width: 80px;                 
  height: 11px;
  border: 2px solid #b8b8e6;
  border-radius: 3px;
  background: #e3e3ff;
  overflow: hidden;
}

.trust-fill {
  height: 100%;
  width: 0%;                    
  background: #6cd66c;          
  transition: width 0.2s ease;
}

/* 9. Instructions */
main.instructions-page {
  width: 100%;
  height: 100vh;
  padding: 34px 30px;
  background: #f0eaff;
  display: flex;
  flex-direction: column;
  align-items: center;        
  justify-content: center;    
}

.instructions-page header {
  margin-bottom: 16px;
}

.instructions-card {
  background: #f0ecff;
  border: 4px solid #c6c7ff;
  border-radius: 8px;
  box-shadow:
    0 0 0 3px #e2e2ff inset,
    0 6px 0 #b3b3d5;
  max-width: 640px;
  width: 100%;
  flex: 0;
  padding: 18px 22px 12px;
  color: #413030;
}

.instructions-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.instructions-card p,
.instructions-card ul {
  font-size: 0.95rem;
  line-height: 1.5;
}

.instructions-card ul {
  margin: 8px 0 10px;
  padding-left: 18px;
}


#start-game-btn {
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 4px;
  border: 2px solid #b8b8e6;
  background: #ededff;
  color: #333;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}

#start-game-btn:hover {
  background: #f6f6ff;
}

#start-game-btn:active {
  transform: translateY(1px);
}

.start-btn-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 12px; 
}