@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(180deg, #16161d 0%, #1f2430 100%);
  color: #f3eefc;
}

.creatorShell {
  max-width: 1450px;
  margin: 0 auto;
  padding: 24px;
}

.heroBar {
  background: #313847;
  border-radius: 28px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(120, 132, 170, 0.12);
  margin-bottom: 20px;
}

.heroBar h1 {
  margin: 0;
  font-size: 2rem;
}

.heroBar p {
  margin: 8px 0 0;
  opacity: .75;
}

.creatorLayout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
}

.previewPanel,
.editorPanel {
  background: #262b36;
  border-radius: 28px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.characterPreview {
  background: radial-gradient(circle at top, #16161d 0%, #1f2430 100%);
  min-height: 520px;
  border-radius: 26px;
  border: 4px solid #f5dfff;
  position: relative;
  overflow: hidden;
}

#previewLayers {
  position: relative;
  width: 100%;
  height: 100%;
}

#previewLayers img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tabButton {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  background: #f8ecff;
  cursor: pointer;
  transition: .18s ease;
}

.tabButton:hover {
  transform: translateY(-1px);
}

.tabButton.active {
  background: #c7ecff;
  box-shadow: inset 0 0 0 3px #91d8ff;
}

.featureArea {
  display: grid;
  gap: 16px;
}

.bubblePanel {
  background: #313847;
  border-radius: 24px;
  padding: 16px;
  border: 2px solid #4b5569;
}

.bubblePanel h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.assetGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}

.assetGrid2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.assetGrid2 .colourBubble {
  width: 48px;
  height: 48px;
  padding: 4px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assetGrid2 .colourBubble img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.assetButton,
.colourBubble,
input,
textarea {
  font: inherit;
}

.assetButton {
  border: none;
  background: #40495b;
  border-radius: 18px;
  min-height: 56px;
  padding: 6px;
  cursor: pointer;
  font-weight: 700;
}

.assetButton.selected {
  outline: 3px solid #ffa7d5;
  background: #ffe5f2;
}

.colourStrip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.colourBubble {
  border: none;
  width: 48px;
  height: 48px;
  padding: 4px;
  margin: 10px;
  border-radius: 14px;
  background: #40495b;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.colourBubble.selected {
  outline: 3px solid #83d5ff;
}

#submitMount .bubblePanel input,
#submitMount .bubblePanel textarea {
  width: 100%;
  margin-top: 10px;
  border: none;
  border-radius: 18px;
  background: #f8f4ff;
  padding: 12px;
}

#submitMount .bubblePanel textarea {
  min-height: 110px;
  resize: vertical;
}

#submitCitizenBtn {
  margin-top: 12px;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  background: #a6e5c4;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 980px) {
  .creatorLayout {
    grid-template-columns: 1fr;
  }

  .characterPreview {
    min-height: 360px;
  }
}

.colourBubble img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}