/* =======================================
   Global Base Styles
======================================= */
body {
  font-family: 'Trebuchet MS', sans-serif;
  background: linear-gradient(to bottom, #1e1e1e, #2c2f2c);
  background-image: url("img/Background.jpg"); 
/* u/maclarenspub "Taken while hiking up Mt. Rainier."  Reddit, 30.04.2025, https://www.reddit.com/r/EarthPorn/comments/9li4ty/taken_while_hiking_up_mt_rainier_it_blows_my_mind/ */
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: #f3f0e5;
  text-align: center;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2 {
  font-family: 'Georgia', serif;
  color: #f5ebe0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #ddd0c8;
}

/* =======================================
   Top Bar / Header Section
======================================= */
#top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2c2a25;
  border-bottom: 2px solid #5c534d;
  padding: 0.5rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.title-and-tabs {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#game-title {
  font-size: 1.5rem;
  margin-right: 2rem;
}

.tab-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tab-button {
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  background-color: #4d3e38;
  border: 1px solid #7d6f68;
  border-radius: 8px;
  color: #fefaf6;
  font-weight: bold;
  cursor: pointer;
}

.tab-button:hover {
  background-color: #5c534d;
}

.status-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #f8f6f2;
  font-size: 0.9rem;
}

#weather-icon {
  width: 24px;
  height: 24px;
}

/* =======================================
   Layout Main Content
======================================= */
#main-layout {
  display: flex;
  flex-direction: column;
  margin-top: 90px; /* space for fixed top bar */
  padding: 1rem;
  min-height: calc(100vh - 90px);
}

#main-content {
  flex: 1;
  width: 100%;
}

/* =======================================
   Button Styles
======================================= */
button {
  padding: 0.7rem 1.5rem;
  margin: 1rem;
  background-color: #4d3e38;
  color: #fefaf6;
  border: 2px solid #7d6f68;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.05);
  transition: all 0.25s ease;
}

button:hover {
  background-color: #7d6f68;
  color: #ffffff;
  transform: translateY(-2px);
}

/* =======================================
   Game Display Area
======================================= */
#creature-display {
  font-size: 1.4rem;
  margin-top: 1rem;
  color: #fdf6f0;
  font-family: 'Georgia', serif;
}

/* =======================================
   Inventory Modal Styles
======================================= */
#inventory-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.inventory-item {
  background: #3a3a3a;
  padding: 1rem;
  border: 1px solid #aaa;
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
  color: #eae4d6;
  font-family: 'Courier New', monospace;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease-in-out, background-color 0.2s;
}

.inventory-item:hover {
  transform: scale(1.08);
  background-color: #545454;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(20, 18, 16, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: #2c2a25;
  color: #f3f0e5; 
  padding: 1.5rem;
  border-radius: 16px;
  width: 320px;
  max-width: 90%;
  font-family: 'Georgia', serif;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  border: 2px solid #7d6f68;
}

.close-button {
  float: right;
  font-size: 24px;
  cursor: pointer;
  color: #f3f0e5;
  background: none;
  border: none;
}
.close-button:hover {
  color: #ffcc99;
}

/* =======================================
   Exploration
======================================= */
#exploration-text {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  background: rgba(34, 34, 34, 0.85);
  padding: 1rem;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 8px rgba(0,0,0,0.5);
  font-family: 'Georgia', serif;
  color: #f0e9e0;
  z-index: 900;
}

.exploration-inner-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.exploration-log {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.exploration-buttons {
  display: flex;
  gap: 1rem;
}

.exploration-buttons button {
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  border: 2px solid #7d6f68;
  background-color: #4d3e38;
  color: #fffaf0;
  font-weight: bold;
}

.exploration-buttons button:hover {
  background-color: #7d6f68;
}

/* =======================================
   Responsive Tweaks
======================================= */
@media (max-width: 768px) {
  #top-bar {
    flex-direction: column;
    align-items: center;
    height: auto;
    padding-bottom: 1rem;
  }
  
  .tab-container {
    justify-content: center;
  }
  
  #main-layout {
    margin-top: 110px;
  }
}
