@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&display=swap');

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

html, body, #app {
  height: 100%;
  background: #2c1810;
}

html, body {
  overflow: hidden;
}

#app {
  overflow: hidden;
}

body {
  font-family: 'IM Fell English', Georgia,
    'Times New Roman', serif;
  color: #3d2b1f;
  font-size: 22.5px;
  line-height: 1.7;
}

.app-wrapper {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  scrollbar-width: none;
}

.app-wrapper::-webkit-scrollbar {
  display: none;
}

.game-container {
  position: relative;
  max-width: 800px;
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: #f4e8c1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='96'%3E%3Cpath d='M0,0L6,0 12,12 4,24 14,36 6,48 12,60 4,72 10,84 6,96 0,96Z' fill='%232c1810'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='96'%3E%3Cpath d='M16,0L10,0 4,12 12,24 2,36 10,48 4,60 12,72 6,84 10,96 16,96Z' fill='%232c1810'/%3E%3C/svg%3E"),
    radial-gradient(
      ellipse at 20% 50%,
      rgba(210, 180, 120, 0.3) 0%,
      transparent 60%),
    radial-gradient(
      ellipse at 80% 50%,
      rgba(180, 150, 100, 0.2) 0%,
      transparent 60%);
  background-repeat:
    repeat-y, repeat-y,
    no-repeat, no-repeat;
  background-position:
    left top, right top,
    center, center;
  background-size:
    16px 96px, 16px 96px,
    100% 100%, 100% 100%;
}

.game-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  border-bottom: 1px solid #c9a96e;
  background: #e8d9a8;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 28px;
}


.location-title {
  font-size: 1.4em;
  font-style: italic;
  color: #5c3d1a;
  font-weight: bold;
  letter-spacing: 1px;
}

.inventory-panel {
  position: fixed;
  top: 80px;
  left: calc(50% + 440px);
  width: 200px;
  padding: 16px 20px;
  background: #e8d9a8;
  border: 1px solid #c9a96e;
  box-shadow: 2px 2px 8px rgba(44, 24, 16, 0.2);
  color: #8b7355;
  font-size: 0.85em;
}

.inventory-header {
  font-style: italic;
  font-size: 1.5em;
  color: #5c3d1a;
  margin-bottom: 8px;
}

.inventory-empty {
  font-style: italic;
  color: #b8a080;
}

.inventory-panel ul {
  list-style: none;
  padding: 0;
}

.inventory-panel li {
  padding: 2px 0;
  color: #5c3d1a;
}

.clickable {
  cursor: pointer;
}

.restart-btn {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.75em;
  color: #b8a080;
  background: transparent;
  border: 1px dotted #c9a96e;
  padding: 2px 10px;
  cursor: pointer;
}

.restart-btn:hover {
  color: #5c3d1a;
  border-color: #8b7355;
}

.game-main {
  padding: 16px 28px;
}

.location-description {
  margin-bottom: 12px;
}

.history-entry {
  margin-bottom: 10px;
}

.history-input {
  color: #6b4f2e;
  font-style: italic;
}

.history-output {
  margin-top: 4px;
}

.history-output p {
  white-space: pre-line;
  margin: 0 0 0.8em 0;
}

.history-output p:last-child {
  margin-bottom: 0;
}

.game-input {
  margin-top: 8px;
}

.input-row {
  display: flex;
  align-items: center;
}

.prompt {
  color: #6b4f2e;
  font-size: 1.2em;
  margin-right: 8px;
  flex-shrink: 0;
}

.game-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 22.5px;
  color: #3d2b1f;
  caret-color: #6b4f2e;
}

.game-input input::placeholder {
  color: #b8a080;
  font-style: italic;
}

.submit-btn {
  display: block;
  margin-top: 10px;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.85em;
  color: #8b7355;
  background: transparent;
  border: 1px dotted #c9a96e;
  padding: 4px 16px;
  cursor: pointer;
}

.scroll-anchor {
  height: 16px;
}

.submit-btn:hover {
  color: #5c3d1a;
  border-color: #8b7355;
}

.memory-flash {
  background: rgba(180, 160, 120, 0.2);
  border-left: 3px solid #8b7355;
  padding: 10px 16px;
  margin: 12px 0;
  font-style: italic;
  color: #5c3d1a;
}


.win-banner {
  text-align: center;
  padding: 24px 16px;
  margin-top: 20px;
  border-top: 2px solid #c9a96e;
  border-bottom: 2px solid #c9a96e;
}

.win-banner h2 {
  font-size: 1.8em;
  font-style: italic;
  color: #5c3d1a;
  font-weight: bold;
  margin-bottom: 16px;
}

.new-game-btn {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.05em;
  padding: 8px 24px;
  background: #5c3d1a;
  color: #f4e8c1;
  border: 2px solid #c9a96e;
  cursor: pointer;
  letter-spacing: 1px;
}

.new-game-btn:hover {
  background: #3d2b1f;
}

@media (max-width: 600px) {
  .header-content {
    padding: 4px 24px;
  }
  .location-title {
    font-size: 1.4em;
  }
  .inventory-panel {
    display: none;
  }
  .game-main {
    padding: 12px 24px;
  }
  body {
    font-size: 17px;
  }
  .game-input input {
    font-size: 18px;
  }
}
