/* Global Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Sidebar */
#sidebar {
  width: 200px;
  height: 100vh;
  background-color: #333;
  color: white;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}
#sidebar h2 {
  font-size: 20px;
  margin-bottom: 15px;
}
#sidebar button {
  width: 180px;
  margin: 10px;
  padding: 12px;
  font-size: 16px;
  background-color: #444;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}
#sidebar button:hover {
  background-color: #555;
}
#sidebar .active {
  background-color: #555;
}

/* Top Bar - Three Column Layout */
#top-bar {
  width: calc(100% - 200px);
  height: 100px;  /* Increased height for clarity */
  background-color: #222;
  color: white;
  position: fixed;
  top: 0;
  left: 200px;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#top-left, #top-center, #top-right {
  display: flex;
  align-items: center;
}
#top-left {
  flex: 1;
  justify-content: flex-start;
}
#top-left input {
  width: 100%;
  max-width: 250px;
  padding: 5px 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}
#top-center {
  flex: 2;
  flex-direction: column;
  text-align: center;
}
#top-center h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}
#square-counter {
  font-size: 1rem;
  margin-top: 5px;
}
#top-right {
  flex: 1;
  justify-content: flex-end;
}
#top-right button {
  padding: 5px 15px;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}
#top-right button:hover {
  background-color: #0056b3;
}

/* Grid & Square Styles */
#wall {
  position: relative;
  background-color: lightgray;
  border: 2px solid red;
  transform-origin: center;
  transition: transform 0.2s ease-in-out;
  /* Dimensions set dynamically in script.js */
}
.square {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: green;
  border: 0.5px solid black;
  cursor: pointer;
  font-size: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: transparent;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.square:hover {
  transform: scale(1.2);
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.selected {
  background-color: yellow !important;
  border: 2px solid black !important;
  transition: background-color 0.2s ease, border 0.2s ease;
}
.purchased {
  background-color: red !important;
  cursor: not-allowed;
}
.search-result {
  background-color: white !important;
  border: 2px solid black !important;
  transform: scale(2.5);
  z-index: 2000;
}

/* Popout Box Styles */
.popout {
  position: fixed;
  background-color: white;
  color: black;
  border: 2px solid black;
  padding: 20px;
  font-size: 1.5rem;
  z-index: 3000;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  border-radius: 10px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.popout img.popout-image {
  max-width: 150px;
  max-height: 150px;
  display: block;
  margin: 10px auto;
}
.upload-btn,
.sell-btn,
.edit-btn,
.delete-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px;
}
.upload-btn:hover,
.sell-btn:hover,
.edit-btn:hover,
.delete-btn:hover {
  background-color: #0056b3;
}
.upload-note {
  font-size: 0.9rem;
  color: #888;
  margin-top: 10px;
}

/* Spinner for Upload Feedback */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: #09f;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Upload Status Overlay */
.upload-status {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.9);
  padding: 20px;
  border: 2px solid #ccc;
  border-radius: 10px;
  z-index: 4000;
  text-align: center;
}

/* Scroll Container */
#scroll-container {
  overflow: auto;
  width: calc(100vw - 200px);
  height: calc(100vh - 100px);
  position: absolute;
  top: 100px;
  left: 200px;
  border: 2px solid black;
  background-color: #ddd;
  scroll-behavior: smooth;
}

/* Responsive Layout */
@media (max-width: 768px) {
  #sidebar {
    display: none;
  }
  #top-bar {
    width: 100%;
    left: 0;
    flex-direction: column;
    height: auto;
    padding: 10px;
  }
  #top-left, #top-center, #top-right {
    width: 100%;
    justify-content: center;
    margin: 5px 0;
  }
  #scroll-container {
    width: 100%;
    left: 0;
  }
}





  
  
  
  


































