:root {
  --bg: #090d25;
  --bg-card: #171c32;
  --text: #f3f5ff;
  --muted: #adb3d1;
  --primary: #7f5bff;
  --primary-strong: #6743f4;
  --accent: #3fe0d0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top right, #4a2cff 0%, #1a2458 28%, var(--bg) 64%),
    linear-gradient(150deg, #090d25 0%, #10173a 40%, #0b1d33 100%);
  color: var(--text);
}

.container {
  width: min(1280px, 94vw);
  margin: 2rem auto;
  display: grid;
  gap: 1rem;
}

.hero {
  text-align: center;
  padding: 1.2rem;
}

.hero .tag {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.hero h1 {
  margin: 0.45rem 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.card {
  background: linear-gradient(140deg, rgba(35, 24, 74, 0.82), rgba(19, 28, 61, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.input-card label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.input-row {
  display: flex;
  gap: 0.6rem;
}

input {
  flex: 1;
  border: 1px solid #404664;
  background: #0f1326;
  color: var(--text);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  font-size: 1rem;
}

button {
  border: none;
  border-radius: 10px;
  padding: 0.72rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

#generateBtn {
  background: var(--primary);
  color: #fff;
}

#generateBtn:hover {
  background: var(--primary-strong);
}

.quick-actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.5rem;
}

.name-preview {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(127, 91, 255, 0.12);
  border: 1px solid rgba(127, 91, 255, 0.45);
  color: #e8e1ff;
  font-weight: 600;
}

button.ghost {
  background: #232946;
  color: #dae0ff;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin: 0.3rem 0 0.8rem;
  color: var(--muted);
}

.results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.generated-results {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: stretch;
}

.generated-results .result-item {
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.55rem;
   min-height: auto;
  height: auto;;
}

.generated-results .copy-btn {
  width: 100%;
}

.result-text {
  overflow-wrap: anywhere;
  font-size: clamp(0.85rem, 1.2vw, 1.25rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.generated-results .result-text {
   white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

.copy-btn {
  background: #2f365a;
  color: #ffffff;
  font-size: 0.74rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.copy-btn:hover {
  background: #3b4470;
}

.copy-btn.copied {
  animation: copyPulse 0.45s ease;
  background: #29a36a;
  box-shadow: 0 0 0 6px rgba(41, 163, 106, 0.18);
}

@keyframes copyPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

#toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: #1f8a5f;
  color: #f5fff9;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.25s ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}


@media (max-width: 1024px) {
  .generated-results {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .generated-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .input-row {
    flex-direction: column;
  }

  .generated-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.content-card {
  line-height: 1.7;
}

.content-card h2 {
  margin: 1.2rem 0 0.45rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.content-card h3 {
  margin: 0.8rem 0 0.3rem;
  font-size: 1.02rem;
  color: #dde4ff;
}

.content-card p,
.content-card li {
  color: #d4daf5;
}

.content-card ul,
.content-card ol {
  padding-left: 1.1rem;
}

.content-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.content-card th,
.content-card td {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.content-card th {
  background: rgba(127, 91, 255, 0.2);
}

.ad-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(79, 56, 188, 0.44), rgba(20, 26, 54, 0.9));
}

.ad-label {
  margin: 0 0 0.5rem;
  color: #b7c1f8;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}