* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
}

#app {
  display: flex;
  height: 100vh;
}

#canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #16213e;
  position: relative;
}

#pixi-container canvas {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

#action-bar {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

#action-bar button {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}

#action-bar button:active {
  transform: scale(0.96);
}

#btn-randomize {
  background: #e94560;
  color: white;
}
#btn-randomize:hover { background: #c73a52; }

#btn-download {
  background: #0f3460;
  color: white;
}
#btn-download:hover { background: #1a4a7a; }

#controls {
  width: 320px;
  min-width: 320px;
  background: #0f0f23;
  padding: 24px;
  overflow-y: auto;
  border-left: 1px solid #2a2a4a;
}

#controls h1 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #e94560;
  letter-spacing: 1px;
}

#loading-msg {
  color: #888;
  font-style: italic;
  padding: 20px 0;
}

.control-group {
  margin-bottom: 16px;
  padding: 12px;
  background: #1a1a2e;
  border-radius: 8px;
  border: 1px solid #2a2a4a;
}

.control-group h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8888aa;
  margin-bottom: 10px;
}

.control-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #bbb;
  margin-bottom: 6px;
}

.control-group select {
  width: 160px;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #3a3a5a;
  background: #0f0f23;
  color: #e0e0e0;
  font-size: 13px;
  cursor: pointer;
}

.control-group select:focus {
  outline: none;
  border-color: #e94560;
}

@media (max-width: 768px) {
  #app { flex-direction: column; }
  #canvas-area { min-height: 50vh; }
  #controls {
    width: 100%;
    min-width: 0;
    max-height: 50vh;
    border-left: none;
    border-top: 1px solid #2a2a4a;
  }
}
