* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #f8f4ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(168, 85, 247, 0.35), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(236, 72, 153, 0.26), transparent 28rem),
    linear-gradient(135deg, #08030f 0%, #160826 52%, #07020d 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  align-items: center;
}

.orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.8;
}

.orb-one {
  width: 260px;
  height: 260px;
  left: -80px;
  bottom: 8%;
  background: rgba(124, 58, 237, 0.45);
  box-shadow: 0 0 120px rgba(168, 85, 247, 0.8);
}

.orb-two {
  width: 190px;
  height: 190px;
  right: 8%;
  top: 11%;
  background: rgba(217, 70, 239, 0.42);
  box-shadow: 0 0 100px rgba(217, 70, 239, 0.75);
}

.hero-card,
.history-card,
.inbox-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 60px rgba(147, 51, 234, 0.2);
  backdrop-filter: blur(24px);
}

.hero-card {
  padding: clamp(28px, 5vw, 54px);
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(216, 180, 254, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 0 28px rgba(217, 70, 239, 0.78);
}

.brand-text {
  color: #eadcff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow {
  margin: 42px 0 14px;
  color: #d8b4fe;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  text-shadow: 0 0 42px rgba(168, 85, 247, 0.44);
}

.subtitle {
  max-width: 670px;
  margin: 24px 0 0;
  color: #d8c9ee;
  font-size: 1.05rem;
  line-height: 1.75;
}

.generator-panel {
  display: grid;
  gap: 14px;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(8, 3, 15, 0.34);
}

.generator-panel label {
  color: #f3e8ff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(216, 180, 254, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.input-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 18px;
  color: #fff;
  background: transparent;
}

.input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.input-wrap span {
  padding: 0 18px;
  color: #c084fc;
  font-weight: 800;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn,
.copy-btn {
  border: 0;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn {
  min-height: 54px;
  padding: 0 18px;
}

.btn:hover,
.copy-btn:hover,
.history-item:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary {
  background: linear-gradient(135deg, #7c3aed, #d946ef);
  box-shadow: 0 0 34px rgba(168, 85, 247, 0.44);
}

.secondary {
  border: 1px solid rgba(216, 180, 254, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.error {
  margin: 0;
  color: #fecdd3;
  font-weight: 700;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(216, 180, 254, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.result-card span {
  grid-column: 1 / -1;
  color: #d8b4fe;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.result-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  text-shadow: 0 0 28px rgba(216, 180, 254, 0.4);
}

.copy-btn {
  padding: 13px 18px;
  background: #f0abfc;
  color: #21062d;
}

.history-card {
  padding: 26px;
}

.inbox-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
}

.section-heading p {
  margin: 0 0 8px;
  color: #c084fc;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0 0 20px;
  font-size: 1.6rem;
}

.section-heading.compact h2 {
  margin-bottom: 0;
}

.inbox-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.inbox-toolbar select {
  min-width: 0;
  border: 1px solid rgba(216, 180, 254, 0.22);
  border-radius: 16px;
  outline: 0;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.inbox-toolbar option {
  color: #190524;
}

.history-list {
  display: grid;
  gap: 12px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.history-item,
.empty-state {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 15px;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
}

.history-item {
  display: grid;
  gap: 5px;
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.history-item span {
  color: #d8b4fe;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.history-item strong {
  overflow-wrap: anywhere;
}

.empty-state {
  color: #d8c9ee;
}

.message-list {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.message-item {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.08);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d8b4fe;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.message-item h3 {
  margin: 0;
  font-size: 1rem;
}

.message-item p {
  margin: 0;
  color: #d8c9ee;
  line-height: 1.55;
}

.message-item strong {
  color: #f5d0fe;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
    padding: 26px 0;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .inbox-toolbar {
    grid-template-columns: 1fr;
  }

  .inbox-toolbar select {
    min-height: 54px;
  }
}

@media (max-width: 560px) {
  .hero-card,
  .history-card {
    border-radius: 24px;
  }

  .input-wrap,
  .result-card {
    grid-template-columns: 1fr;
  }

  .input-wrap span {
    padding: 0 18px 16px;
  }
}
