/* maplogic.css — styles for interactive overlay panels: book, mixing bowl, code */
/* These complement style.css and are loaded separately for organization */

/* ─── BOOK OVERLAY ─────────────────────────────────────────────────────────── */
.book-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(20,10,0,0.72);
  display: flex; align-items: center; justify-content: center;
  animation: maplogicFadeIn 0.2s ease;
}
.book-hidden { display: none !important; }

#book-inner {
  background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c0 100%);
  border: 3px solid #8b6520;
  border-radius: 16px;
  width: min(700px, 92vw);
  max-height: 88vh; overflow-y: auto;
  padding: 28px; box-sizing: border-box;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  color: #2e1e08;
}

#book-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: 1px solid #c8922a;
  border-radius: 8px; color: #7a4a10;
  font-weight: 700; cursor: pointer; padding: 4px 10px;
}

#book-pages {
  display: flex; align-items: flex-start; gap: 16px;
  margin: 16px 0 12px;
}

.book-nav {
  font-size: 24px; font-weight: 900;
  background: rgba(255,255,255,0.7);
  border: 2px solid #c8922a; border-radius: 8px;
  width: 44px; height: 44px;
  cursor: pointer; flex-shrink: 0; color: #7a4a10;
  transition: background 0.15s ease;
}
.book-nav:hover:not(:disabled) { background: #ffe8b0; }
.book-nav:disabled { opacity: 0.35; cursor: default; }

#book-page-content { flex: 1; min-height: 200px; }

.book-page-title {
  margin: 0 0 12px; font-size: 18px; color: #5a2e00;
  font-style: italic;
  border-bottom: 1px solid #d4a850; padding-bottom: 8px;
}
.book-page-text { font-size: 14px; line-height: 1.8; margin: 0; white-space: pre-wrap; }
.book-page-blank { min-height: 200px; }

#book-page-label { text-align: center; font-size: 13px; color: #8a6030; margin-bottom: 8px; }

#book-page-input {
  display: block; margin: 0 auto;
  padding: 6px 12px; border: 1px solid #c8922a;
  border-radius: 8px; font-size: 13px; width: 160px;
  text-align: center; background: rgba(255,255,255,0.7); color: #2e1e08;
}

.book-claim-btn {
  margin-top: 16px;
  background: linear-gradient(180deg, #ffe160, #f5a800);
  border: 2px solid #c07800; border-radius: 999px;
  padding: 8px 18px; font-weight: 700; cursor: pointer;
  font-size: 14px; color: #3a1e00; transition: transform 0.15s ease;
}
.book-claim-btn:hover { transform: scale(1.04); }
.book-claimed-note { color: #3a8a3a; font-weight: 700; margin-top: 12px; font-size: 13px; }

/* ─── BOWL OVERLAY ─────────────────────────────────────────────────────────── */
.bowl-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,20,10,0.72);
  display: flex; align-items: center; justify-content: center;
}

#bowl-inner {
  background: linear-gradient(135deg, #e8f8ee 0%, #c8eedb 100%);
  border: 3px solid #3a8a5a; border-radius: 16px;
  width: min(560px, 92vw); max-height: 88vh; overflow-y: auto;
  padding: 28px; box-sizing: border-box; position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.45); color: #0e2e1a;
}
#bowl-inner h2 { margin: 0 0 4px; font-size: 24px; }
.bowl-subtitle { margin: 0 0 14px; font-size: 13px; color: #2a6a44; }

#bowl-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: 1px solid #3a8a5a;
  border-radius: 8px; color: #1a5a38;
  font-weight: 700; cursor: pointer; padding: 4px 10px;
}

#bowl-ingredients-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.bowl-ingredient-btn {
  padding: 7px 12px; border: 2px solid #3a8a5a;
  border-radius: 999px; background: rgba(255,255,255,0.7);
  color: #0e2e1a; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: background 0.15s ease, transform 0.12s ease;
}
.bowl-ingredient-btn:hover { background: #b8f0d0; transform: scale(1.04); }
.bowl-ingredient-btn.selected { background: #3a8a5a; color: #fff; border-color: #1a5a38; }

#bowl-selected-display {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; margin: 12px 0;
}
.bowl-slot {
  background: rgba(255,255,255,0.8); border: 2px solid #3a8a5a;
  border-radius: 10px; padding: 8px 14px; min-width: 80px;
  text-align: center; font-weight: 700; font-size: 13px; color: #0e2e1a;
}
.bowl-plus { font-size: 22px; font-weight: 900; color: #3a8a5a; }

#bowl-mix-btn {
  display: block; margin: 0 auto 8px;
  background: linear-gradient(180deg, #5ae090, #2ab868);
  border: 2px solid #1a8040; border-radius: 999px;
  padding: 10px 28px; font-size: 15px; font-weight: 700;
  cursor: pointer; color: #fff; transition: transform 0.15s ease;
}
#bowl-mix-btn:hover { transform: scale(1.04); }

#bowl-clear-btn {
  display: block; margin: 0 auto 12px;
  background: rgba(255,255,255,0.6); border: 1px solid #888;
  border-radius: 999px; padding: 6px 18px;
  font-size: 13px; cursor: pointer; color: #444;
}

#bowl-result { min-height: 28px; text-align: center; font-size: 14px; font-weight: 600; margin-top: 4px; }
.bowl-success { color: #1a5a38; }
.bowl-fail    { color: #8a2020; }
.bowl-already { color: #3a7020; }

/* ─── CODE PANEL ───────────────────────────────────────────────────────────── */
.code-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,4,20,0.85);
  display: flex; align-items: center; justify-content: center;
  animation: maplogicFadeIn 0.2s ease;
}

#code-inner {
  background: linear-gradient(135deg, #0a0a1e 0%, #0e1a30 100%);
  border: 2px solid #3af;
  border-radius: 14px;
  width: min(400px, 92vw);
  padding: 32px 28px 24px;
  box-sizing: border-box; position: relative;
  box-shadow: 0 0 40px rgba(30,140,255,0.25), 0 20px 50px rgba(0,0,0,0.6);
  color: #cceeff;
  text-align: center;
}

.code-title { margin: 0 0 6px; font-size: 22px; letter-spacing: 3px; color: #a0e8ff; }
.code-subtitle { margin: 0 0 18px; font-size: 13px; color: #6899bb; }

#code-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: 1px solid #3af;
  border-radius: 6px; color: #5af;
  font-weight: 700; cursor: pointer; padding: 3px 8px; font-size: 14px;
}

#code-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 16px; font-size: 20px;
  letter-spacing: 4px; text-align: center;
  background: rgba(0,10,30,0.8); color: #a0e8ff;
  border: 1.5px solid #3af; border-radius: 8px;
  outline: none; font-family: monospace;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 14px;
}
#code-input:focus {
  border-color: #6cf;
  box-shadow: 0 0 0 3px rgba(40,160,255,0.25);
}
#code-input::placeholder { color: #2a5a7a; letter-spacing: 2px; }

#code-submit {
  background: linear-gradient(180deg, #2af, #0880cc);
  border: none; border-radius: 999px;
  padding: 10px 28px; font-size: 15px; font-weight: 700;
  cursor: pointer; color: #fff;
  transition: transform 0.15s ease;
  letter-spacing: 1px;
}
#code-submit:hover { transform: scale(1.04); }

#code-result {
  min-height: 24px; margin-top: 14px;
  font-size: 14px; font-weight: 600;
}
.code-success { color: #5af; }
.code-fail    { color: #f55; }

/* ─── SHARED ANIMATION ─────────────────────────────────────────────────────── */
@keyframes maplogicFadeIn { from { opacity: 0; } to { opacity: 1; } }


/* ─── GAMER DIARY ─────────────────────────────────────────────────────────── */
.diary-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,10,20,0.80);
  display: flex; align-items: center; justify-content: center;
  animation: maplogicFadeIn 0.2s ease;
}

#diary-inner {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  border: 2px solid #30363d;
  border-radius: 16px;
  width: min(640px, 92vw);
  max-height: 88vh; overflow-y: auto;
  padding: 28px; box-sizing: border-box;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.7);
  color: #c9d1d9;
  font-family: "Courier New", monospace;
}

/* RGB accent line at top */
#diary-inner::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  background-size: 200%;
  border-radius: 14px 14px 0 0;
  animation: rgbSlide 3s linear infinite;
}
@keyframes rgbSlide { to { background-position: 200% 0; } }

#diary-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: 1px solid #30363d;
  border-radius: 8px; color: #8b949e;
  font-weight: 700; cursor: pointer; padding: 4px 10px;
}
#diary-close:hover { border-color: #58a6ff; color: #58a6ff; }

#diary-pages {
  display: flex; align-items: flex-start; gap: 16px;
  margin: 20px 0 12px;
}

#diary-page-content { flex: 1; min-height: 200px; }

.diary-page-title {
  margin: 0 0 14px;
  font-size: 15px;
  color: #58a6ff;
  font-family: "Courier New", monospace;
  border-bottom: 1px solid #21262d;
  padding-bottom: 8px;
  letter-spacing: 0.5px;
}

.diary-page-text {
  font-size: 14px;
  line-height: 1.9;
  margin: 0;
  color: #c9d1d9;
  white-space: pre-wrap;
}

.diary-recipe-highlight {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(35,134,54,0.18);
  border: 1px solid #238636;
  border-radius: 8px;
  font-size: 13px;
  color: #3fb950;
  font-weight: 700;
}

#diary-page-label {
  text-align: center;
  font-size: 12px;
  color: #484f58;
  margin-bottom: 8px;
  font-family: "Courier New", monospace;
}

#diary-page-input {
  display: block; margin: 0 auto;
  padding: 6px 12px;
  border: 1px solid #30363d;
  border-radius: 8px;
  font-size: 13px; width: 160px;
  text-align: center;
  background: #0d1117;
  color: #c9d1d9;
  font-family: "Courier New", monospace;
  outline: none;
}
#diary-page-input:focus { border-color: #58a6ff; }

/* ─── RECIPE NOTE ─────────────────────────────────────────────────────────── */
#recipe-note-inner {
  background: linear-gradient(160deg, #fdf6dc 0%, #f5e8aa 100%);
  border: 2px solid #b8922a;
  border-radius: 12px;
  width: min(420px, 90vw);
  padding: 28px 24px 22px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  color: #3a2800;
  font-family: "Georgia", serif;
  transform: rotate(-1.5deg);
}

.recipe-note-title {
  margin: 0 0 6px;
  font-size: 19px;
  color: #5a3800;
}
.recipe-note-meta {
  font-size: 12px;
  color: #8a6030;
  margin: 0 0 16px;
  font-style: italic;
}
.recipe-note-body {
  border-top: 1px dashed #c8a040;
  padding-top: 14px;
  font-size: 14px;
  line-height: 1.8;
}
.recipe-note-body strong { color: #7a3800; }

#recipe-note-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 1px solid #b8922a;
  border-radius: 6px; color: #8a5a10;
  font-weight: 700; cursor: pointer; padding: 3px 8px;
}

/* ─── BEACH SPAWN ─────────────────────────────────────────────────────────── */
@keyframes beachSpawnPop {
  from { opacity: 0; transform: translate(-50%, -40%) scale(0.7); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.beach-spawn-item:hover {
  transform: translate(-50%, -54%) scale(1.06) !important;
  box-shadow: 0 8px 20px rgba(0,100,200,0.35) !important;
}

/* ─── ROCK CURSOR ─────────────────────────────────────────────────────────── */
.cursor-rock {
  width: 32px; height: 32px;
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  position: fixed;
}
.cursor-rock::before { content: "🪨"; }