/* Reset + Base */
body {
  font-family: 'Rubik', 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #1b0e2a, #2e1f4f);
  color: #f1eaff;
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
}

/* Header */
.header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(20, 8, 40, 0.9);
  border-bottom: 1px solid #5e2ca5;
}
.header a {
  color: #ff77ff;
  text-decoration: none;
  font-weight: bold;
}
.header a:hover {
  color: #00f0ff;
}

/* Container */
.container {
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 16px;
}

/* Main Card */
.card {
  background: rgba(24, 10, 48, 0.95);
  border: 2px solid #7f5af0;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 0 12px #7f5af0;
}

/* Inputs */
.input {
  background: rgba(10, 5, 25, 0.8);
  border: 1px solid #e08eff;
  border-radius: 8px;
  color: #f1eaff;
  padding: 10px;
  width: 100%;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.input:focus {
  border-color: #00f0ff;
  outline: none;
  box-shadow: 0 0 5px #00f0ff;
}

/* Buttons */
.btn {
  background: #7f5af0;
  border: 0;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  text-shadow: 0 0 2px #000;
  box-shadow: 0 0 6px #7f5af0;
  transition: all 0.2s ease-in-out;
}
.btn:hover {
  background: #00f0ff;
  box-shadow: 0 0 8px #00f0ff, 0 0 12px #7f5af0;
}
.btn.secondary {
  background: #1a1c2c;
  color: #f1eaff;
  border: 1px solid #7f5af0;
}
.btn.secondary:hover {
  background: #2a2c44;
  box-shadow: 0 0 6px #ff77ff;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 20px 0;
  justify-content: center;
}

/* Canvas */
canvas {
  max-width: 100%;
  border: 2px dashed #ff77ff;
  background: #0a0510;
  border-radius: 10px;
  box-shadow: 0 0 12px #ff77ff;
}

/* Text */
.small {
  font-size: 13px;
  color: #b18fe6;
}

/* Modal Styles (reuse) */
.lf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lf-modal.show {
  display: flex;
}
.lf-modal__box {
  background: #1e0c3a;
  border: 2px solid #7f5af0;
  border-radius: 12px;
  padding: 20px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 0 20px #7f5af0;
}
.lf-modal__box h3 {
  margin-top: 0;
  font-family: 'Orbitron', monospace;
  color: #ff77ff;
}
.lf-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* Footer */
footer.site-footer {
  margin-top: 40px;
  padding: 16px 12px;
  border-top: 1px solid #5e2ca5;
  color: #c8aaff;
  font-size: .9rem;
  background: rgba(15, 5, 30, 0.8);
  text-align: center;
}
footer.site-footer .links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
footer.site-footer .links a {
  color: #ff77ff;
  text-decoration: none;
}
footer.site-footer .links a:hover {
  color: #00f0ff;
}

/* Neon Glow Utilities */
.glow-pink {
  color: #ff77ff;
  text-shadow: 0 0 5px #ff77ff, 0 0 10px #ff77ff;
}
.glow-cyan {
  color: #00f0ff;
  text-shadow: 0 0 5px #00f0ff, 0 0 10px #00f0ff;
}
.glow-blue {
  color: #7f5af0;
  text-shadow: 0 0 4px #7f5af0, 0 0 8px #7f5af0;
}

/* Optional: retro scanline effect */
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.015),
    rgba(255,255,255,0.015) 1px,
    transparent 1px,
    transparent 2px
  );
  z-index: 0;
}

/* ========== Grid Layout for Editor ========== */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: flex-start;
  padding: 12px 0;
}

/* On mobile, stack vertically */
@media (max-width: 768px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

.editor-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-canvas {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}


/* ========== Template Grid Fix ========== */
.grid.template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.grid.template-gallery .card {
  padding: 12px;
  border: 2px solid #7f5af0;
  background: rgba(24, 10, 48, 0.95);
  border-radius: 12px;
  box-shadow: 0 0 10px #7f5af0;
  transition: transform 0.2s ease;
}
.grid.template-gallery .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px #ff77ff;
}

.grid.template-gallery .btn.small {
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 0 5px #2f9cf5;
}
.grid.template-gallery .btn.small:hover {
  background: #00f0ff;
  color: #000;
}

.grid.template-gallery .small span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #ff77ff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: #e2d6ff;
}
