body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  color: #111827;
}

header {
  padding: 16px 24px;
  background: #111827;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

header select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #111827;
  color: white;
}

header button {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: #f9fafb;
  color: #111827;
  cursor: pointer;
}

#main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding: 16px;
  height: calc(100vh - 64px);
  box-sizing: border-box;
}

/* SIDEBAR */

#sidebar {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow-y: auto;
}

#sidebar textarea {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 10px;
  font-family: monospace;
}

#sidebar button {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  border-radius: 8px;
  border: none;
  background: #111827;
  color: white;
  cursor: pointer;
}

.preview-img {
  width: 100%;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* CONTENT */

#content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 350px;
  gap: 16px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

#preview {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid #ddd;
}

#map {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

#top5, #categories {
  overflow-y: auto;
}

.top-item, .category {
  padding: 8px;
  border-radius: 8px;
  background: #f3f4f6;
  margin-bottom: 6px;
}

.category {
  cursor: pointer;
}

.category.active {
  background: #111827;
  color: white;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  #main {
    grid-template-columns: 1fr;
  }

  #content {
    grid-template-columns: 1fr;
    grid-auto-rows: 300px;
  }
}
