/* style.css */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 1rem;
  background-color: #dddada;
}


/* controls    */
  #mobile-controls {
    position: fixed;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
  }

  /* Skills Section */
  #skills-container {
    flex: 1;
    text-align: left;
  }

  #skills button {
    height: 64px;
    width: 64px;
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 28px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.8);
    color: white;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }

  #skills button:hover {
    background-color: #0056b3;
  }

  /* Arrows Section */
  #arrows-container {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  .arrow-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
  }

  .arrow-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }

  .arrow-btn img {
    width: 32px;
    height: 32px;
  }

  .goal {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0);
    font-size: 1rem;
    cursor: pointer;
    color:darkgray;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }
  .goal img{
    width: 20px;
    height: 24px;
  }
/* end controls */


/* game map*/
  #game-container {
    padding-top:60px;
    width: 100vw;
    height: 80vh;
    max-width: 1000px;
    overflow: auto;
    position: relative;
  }
  #game-container {
    scroll-behavior: auto;
  }
  #map {
    position: relative;
    width: 3000px; /* or based on map size */
    height: 3000px;
  }
  *, *::before, *::after {
    box-sizing: border-box;
  }

  #game {
    position: relative;
    width: 3000px;
    height: 3000px;
    display: grid;
    /* grid-template-columns: repeat(10, 64px); */ /*this is done dynamically as the columns otherwise dont match*/
    grid-auto-rows: 64px;
    grid-gap: 2px;
  }

  .tile {
    position: relative;
    width: 64px;
    height: 64px;
  }

  .tile img {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  .tile-base {
    z-index: 0;
  }

  .tile-item {
    z-index: 1;
  }

  .tile-npc {
    z-index: 2;
  }

  .tile-player {
    z-index: 3;
  }


  .player{
    border: 2px solid red;
  }
/* end game map*/
/* message */
  #flash-message-container {
    position: fixed;
    top: 20%;
    left: 40%;
    transform: translateX(0%);
    z-index: 9999;
    pointer-events: none;
  }

  .flash-message {
    position: fixed;
    top: 20%;
    z-index: 9999;
    pointer-events: none;
    font-size: 2rem;
    font-weight: bold;
    padding: 1rem 2rem;
    margin: 0.5rem;
    border-radius: 12px;
    color: white;
    text-align: center;
    opacity: 0;
    animation: pop-fade 2s ease-out, fade-out 0.5s ease-in 2.5s forwards;
  }

  .flash-success { background: #28a745; }
  .flash-warning { background: #ffc107; color: black; }
  .flash-danger { background: #dc3545; }

  @keyframes pop-fade {
    0% { transform: scale(0.8) translateX(0%); opacity: 0; }
    20% { transform: scale(1.2) translateX(0%); opacity: 1; }
    50% { transform: scale(1) translateX(0%); }
    100% { transform: scale(1) translateX(0%); }
  }

  @keyframes fade-out {
    to { opacity: 0; }
  }
/* end message */
/* show Screen for info messages*/
  #screen-overlay {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;


  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.9);
  color: white;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  z-index: 10000;
  pointer-events: none;
  }

  #screen-overlay.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease;
    pointer-events: all;
  }

  #screen-overlay-content {
    max-width: 800px;
    line-height: 1.6;
    animation: fadeInZoom 0.6s ease-out;
  }

  @keyframes fadeInZoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
/* end - show Screen for info messages*/

/* customer happiness bar*/
  #flash-bar-container {
    width: 20%;
    height: 24px;
    background-color: #ccc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
    position: relative;
    left:30%;
    border:5px solid black;
  }

  #flash-bar {
    height: 100%;
    width: 0%;
    background-color: green;
    transition: width 0.4s ease, background-color 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-weight: bold;
    font-family: sans-serif;
    position: absolute;
    top: 0;
    left: 0;
  }

  #flash-bar.pulse {
    animation: pulse 1s ease;
  }

  @keyframes pulse {
    0% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(2);
      opacity: 0.85;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }

  #flash-bar-label {
    width: 100%;
    text-align: center;
    z-index: 1;
    pointer-events: none;
  }

/* end customer happiness bar*/
/* Balloon icon container */
  .balloon_unreported {
    position: absolute;
    bottom: 32px;
    right: -10px;
    transform: translateX(0%);
    animation: floatUpDown 1s ease-in-out infinite;
    font-size: 32px;
    Background-color: rgba(255,255,255,0.8);
    border:4px solid grey;
    border-radius:50px;
    z-index:4;
    padding:3px;
  }
  .balloon_open {
    position: absolute;
    bottom: 32px;
    right: -10px;
    transform: translateX(0%);
    animation: floatUpDown 1s ease-in-out infinite;
    font-size: 32px;
    Background-color: rgba(255,255,255,0.8);
    border:4px solid grey;
    border-radius:50px;
    z-index:4;
    padding:3px;
  }


  @keyframes floatUpDown {
    0% { transform: translateX(30%) translateY(0); }
    50% { transform: translateX(30%) translateY(-10px); }
    100% { transform: translateX(30%) translateY(0)}
  }
/* end Balloon icon container */

/* dashboard scoreboard */
  #dashboard{
    position: fixed;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.3);
    padding: 20px;
    text-align: center;
    z-index:999;
    width:80%;
    max-width: 500px;
  }

  #status {
    font-size:12px;
    padding:2px 5px;
    font-weight: bold;
  }

  .scoreboard {
    z-index:999;
  }
  .score {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
  }
  .label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
  }
  .scoreItem {
    margin-bottom: 20px;
  }
/* end dashboard scoreboard */
