*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  padding: 10px 15px;
  min-height: 99%;
  width: min(1000px, 95vw);
  margin: 0 auto;
  color: #ecdcf9;
  background: #241634;
  font-family: cursor, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  line-height: 1.5;
  overflow-x: hidden;
  font-size: min(18px, calc(1.1vw + 7px));
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px 32px;
  border-radius: 10px;
  background: #1a1027;
  border: 1px solid rgba(201, 146, 246, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.page-header {
  margin-bottom: 24px;
  color: #ecdcf9;
}

.page-header-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  color: #ecdcf9;
}

.page-header h1::before {
  content: "$ ";
  color: #c992f6;
}

.page-header p {
  margin: 0;
  max-width: 640px;
  color: #d9c8ff;
}

.header-link-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 0.8rem;
  text-decoration: none;
  color: #e7d0ff;
  background: #241634;
  border: 1px solid rgba(201, 146, 246, 0.6);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease,
    box-shadow 0.15s ease;
}

.header-link-code:hover {
  background: #2b183f;
  border-color: #c992f6;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.85);
  transform: translateY(-1px);
}

.header-link-prefix {
  color: #8ae9c1;
}

.header-link-command {
  color: #e5e7eb;
}

.header-link-label {
  color: #93c5fd;
}

.card {
  background: #140b21;
  border-radius: 8px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(201, 146, 246, 0.35);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.25rem;
  color: #e7d0ff;
}

.card p,
.card li {
  color: #ecdcf9;
}

.form-section {
  border-top: 1px solid rgba(201, 146, 246, 0.3);
  padding-top: 14px;
  margin-top: 14px;
}

.form-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.form-section h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.field-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.field-row label {
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #d3b9ff;
}

.field-row input,
.field-row textarea,
.field-row select {
  border-radius: 8px;
  border: 1px solid rgba(201, 146, 246, 0.55);
  padding: 8px 10px;
  font-size: 0.95rem;
  background: #241634;
  color: #ecdcf9;
}

.field-row input::placeholder,
.field-row textarea::placeholder {
  color: #8b6fae;
}

.field-row textarea {
  resize: vertical;
  min-height: 64px;
}

.banner-preview {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 12px;
  background: #241634;
  border-radius: 8px;
  border: 1px solid rgba(201, 146, 246, 0.5);
  color: #e7d0ff;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

/* Rainbow text style */
.rainbow-text {
  background: linear-gradient(90deg, #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner-preview.rainbow-text {
  font-weight: bolder;
  font-size: min(20px, calc(1vw));
}

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

.actions button {
  cursor: pointer;
  border-radius: 999px;
  border: none;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

#generateBtn {
  background: #c992f6;
  color: #241634;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
}

#generateBtn:hover {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
}

#downloadBtn {
  background: transparent;
  color: #e7d0ff;
  border: 1px solid rgba(201, 146, 246, 0.7);
}

#downloadBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.output {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(201, 146, 246, 0.6);
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  background: #241634;
  color: #ecdcf9;
}

ol {
  padding-left: 20px;
}

code {
  background: #241634;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.85em;
}

#copyright-badge {
  position: fixed;
  top: 8px;
  right: 14px;
  font-size: 12px;
  color: #e7d0ff;
  opacity: 0.8;
  pointer-events: none;
}

@media (min-width: 768px) {
  .field-row-inline {
    display: flex;
    gap: 10px;
  }
}

