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

body {
  background: #111;
  color: #eee;
  font-family: system-ui, -apple-system, sans-serif;
  height: 100vh;
  overflow: hidden;
}

/* Top bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  z-index: 100;
  border-bottom: 2px solid #ff00aa;
}

.logo {
  font-family: 'Black Ops One', system-ui;
  font-size: 1.3rem;
  color: #ff00aa;
  letter-spacing: 0.5px;
}

.tagline {
  flex: 1;
  font-size: 0.85rem;
  opacity: 0.75;
}

.ghost-btn {
  background: transparent;
  border: 1px solid #555;
  color: #ccc;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.ghost-btn:hover {
  border-color: #ff00aa;
  color: #fff;
}

.spray-button {
  background: linear-gradient(135deg, #ff00aa, #ff0066);
  color: white;
  border: none;
  padding: 9px 20px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255, 0, 170, 0.4);
}

.spray-button:hover {
  transform: scale(1.04);
}

/* Viewport + Canvas */
.viewport {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  cursor: grab;
  background: #1a1a1a;
}

.viewport.dragging {
  cursor: grabbing;
}

.canvas {
  position: absolute;
  width: 20000px;
  height: 20000px;
  background:
    linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.45)),
    repeating-linear-gradient(
      90deg,
      #222 0px,
      #222 48px,
      #1f1f1f 48px,
      #1f1f1f 50px
    ),
    repeating-linear-gradient(
      0deg,
      #222 0px,
      #222 48px,
      #1f1f1f 48px,
      #1f1f1f 50px
    );
  transform-origin: 0 0;
  will-change: transform;
}

/* Individual tags */
.tag {
  position: absolute;
  font-family: 'Permanent Marker', 'Rock Salt', cursive;
  line-height: 1.15;
  max-width: 340px;
  word-wrap: break-word;
  text-shadow:
    2px 2px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
  opacity: 0.93;
  pointer-events: none;
  user-select: none;
}

.tag .author {
  display: block;
  font-size: 0.55em;
  opacity: 0.65;
  margin-top: 3px;
  font-family: system-ui, sans-serif;
}

/* Zoom controls */
.zoom-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.8);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 90;
  border: 1px solid #333;
}

.zoom-controls button {
  background: #333;
  color: #eee;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
}

.zoom-controls button:hover {
  background: #444;
}

#zoom-level {
  min-width: 48px;
  text-align: center;
  font-size: 0.85rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #1e1e1e;
  border: 2px solid #ff00aa;
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(255, 0, 170, 0.25);
}

.modal-content h2 {
  font-family: 'Black Ops One', system-ui;
  color: #ff00aa;
  margin-bottom: 16px;
}

/* Tier selector */
.tiers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.tier-option {
  cursor: pointer;
}

.tier-option input {
  display: none;
}

.tier-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: #111;
  border: 2px solid #333;
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.tier-option input:checked + .tier-card {
  border-color: #ff00aa;
  background: #2a1020;
}

.tier-card strong {
  font-size: 1.1rem;
  color: #ff00aa;
}

.tier-card span {
  font-size: 0.75rem;
  opacity: 0.8;
}

label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 12px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff00aa;
}

.position-fields {
  background: #181818;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
}

.position-fields.hidden {
  display: none;
}

.position-fields label {
  margin-bottom: 10px;
}

.position-fields input[type="number"] {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  background: #111;
  border: 1px solid #444;
  border-radius: 6px;
  color: #eee;
}

.tiny-hint {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 4px;
}

textarea, input[type="text"] {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: #111;
  border: 1px solid #444;
  border-radius: 6px;
  color: #eee;
  font-size: 1rem;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

input[type="color"] {
  margin-top: 6px;
  width: 56px;
  height: 34px;
  border: none;
  background: none;
  cursor: pointer;
}

.payment-box {
  background: #111;
  border: 1px dashed #555;
  border-radius: 8px;
  padding: 12px;
  margin: 14px 0;
  font-size: 0.9rem;
}

.payment-box code {
  display: block;
  word-break: break-all;
  margin: 8px 0;
  color: #00ffcc;
  font-size: 0.82rem;
}

.hint {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #ff00aa;
}

.small-btn {
  background: #333;
  color: #eee;
  border: 1px solid #555;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

button.primary {
  flex: 1;
  background: linear-gradient(135deg, #ff00aa, #ff0066);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: #aaa;
  border: 1px solid #555;
  padding: 12px 18px;
  border-radius: 6px;
  cursor: pointer;
}

.status {
  margin-top: 12px;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.status.error { color: #ff4444; }
.status.success { color: #00ff88; }

/* Info modal */
.info-content ul {
  margin: 12px 0 12px 20px;
}

.info-content p {
  margin-bottom: 10px;
  line-height: 1.45;
}

.info-content .note {
  margin-top: 16px;
  font-style: italic;
  opacity: 0.8;
}

.info-content button {
  margin-top: 18px;
  width: 100%;
}

/* Mobile */
@media (max-width: 600px) {
  .tagline { display: none; }
  .tiers { grid-template-columns: 1fr; }
  .canvas { width: 20000px; height: 20000px; }
}