:root {
  color-scheme: light;
  --pink: #ff7ab6;
  --hot: #ff4f9a;
  --rose: #fff0f7;
  --cream: #fffaf2;
  --lavender: #f3e8ff;
  --text: #3d2030;
  --muted: #8c6274;
  --card: rgba(255, 255, 255, 0.74);
  --border: rgba(255, 122, 182, 0.22);
  --shadow: 0 24px 80px rgba(255, 84, 154, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 158, 205, 0.45), transparent 28%),
    radial-gradient(circle at 85% 5%, rgba(196, 181, 253, 0.5), transparent 24%),
    linear-gradient(135deg, #fff7fb 0%, #fff3e6 44%, #f8edff 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0;
}

.hero-card,
.settings-card,
.chat-card {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 220px;
  padding: 30px;
  border-radius: 34px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 79, 154, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 75%);
}

.hero-copy,
.mascot,
.sparkle {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--hot);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  color: #b92468;
}

.subtitle {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.sparkle {
  position: absolute;
  color: var(--hot);
  font-size: 34px;
  opacity: 0.55;
  animation: floaty 4s ease-in-out infinite;
}

.sparkle.one {
  right: 28%;
  top: 28px;
}

.sparkle.two {
  right: 42%;
  bottom: 32px;
  animation-delay: -1s;
}

.sparkle.three {
  left: 28px;
  bottom: 24px;
  animation-delay: -2s;
}

.mascot {
  width: 178px;
  height: 178px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 46px;
  background: linear-gradient(145deg, #ffe0ef, #ffffff);
  border: 1px solid rgba(255, 79, 154, 0.2);
  transform: rotate(4deg);
}

.face {
  width: 104px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 48% 48% 46% 46%;
  background: #fff;
  box-shadow: inset 0 -10px 0 rgba(255, 122, 182, 0.08);
}

.face span {
  width: 11px;
  height: 18px;
  border-radius: 999px;
  background: #5d2a3f;
}

.face b {
  transform: translateY(18px);
  color: #c12d72;
}

.mascot p {
  position: absolute;
  bottom: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.app-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  margin-top: 22px;
}

.settings-card,
.chat-card {
  border-radius: 30px;
  padding: 22px;
}

.card-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.card-title > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 18px;
  background: #fff0f8;
  font-size: 22px;
}

.card-title h2,
.chat-header h2 {
  color: #71284b;
  font-size: 22px;
}

.card-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

label {
  display: grid;
  gap: 8px;
  margin-top: 15px;
  color: #6f3a52;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 122, 182, 0.28);
  border-radius: 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  transition: border 0.2s, box-shadow 0.2s, transform 0.2s;
}

input,
select {
  height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 58px;
  resize: none;
  padding: 14px 16px;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 79, 154, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 122, 182, 0.14);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.primary-btn,
.send-btn,
.ghost-btn,
.prompt-chips button {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.primary-btn,
.send-btn {
  color: #fff;
  background: linear-gradient(135deg, #ff5aa8, #ff8ebf 55%, #b978ff);
  box-shadow: 0 14px 28px rgba(255, 79, 154, 0.25);
}

.primary-btn {
  width: 100%;
  height: 48px;
  margin-top: 18px;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 240, 247, 0.86);
  color: #a02d63;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.chat-card {
  display: flex;
  min-height: 680px;
  flex-direction: column;
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ghost-btn {
  height: 40px;
  padding: 0 16px;
  color: #a52d68;
  background: rgba(255, 240, 247, 0.88);
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.prompt-chips button {
  padding: 10px 14px;
  color: #8f2f5b;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 122, 182, 0.2);
}

.messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  min-height: 360px;
  max-height: 520px;
  padding: 18px;
  border: 1px solid rgba(255, 122, 182, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.52)),
    repeating-linear-gradient(0deg, transparent 0 33px, rgba(255, 122, 182, 0.07) 34px 35px);
}

.message {
  width: fit-content;
  max-width: min(82%, 680px);
  padding: 13px 15px;
  border-radius: 22px;
  line-height: 1.65;
  white-space: pre-wrap;
  box-shadow: 0 10px 24px rgba(130, 56, 91, 0.08);
}

.message.user {
  align-self: flex-end;
  color: #fff;
  border-bottom-right-radius: 7px;
  background: linear-gradient(135deg, #ff5aa8, #c076ff);
}

.message.assistant {
  align-self: flex-start;
  color: #5a273d;
  border-bottom-left-radius: 7px;
  background: #fff;
  border: 1px solid rgba(255, 122, 182, 0.2);
}

.message strong {
  color: #b92468;
}

.message em {
  color: #c94d82;
}

.message code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 122, 182, 0.12);
  font-size: 0.9em;
  font-family: "SF Mono", "Fira Code", monospace;
}

.message.system {
  align-self: center;
  max-width: 92%;
  color: #9a4270;
  background: rgba(255, 240, 247, 0.82);
  text-align: center;
  font-size: 13px;
}

.typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.typing i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ff7ab6;
  animation: bounce 0.9s infinite alternate;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin-top: 16px;
}

.send-btn {
  min-width: 110px;
  padding: 0 22px;
}

.stop-btn {
  min-width: 100px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #e05555, #f08080);
  box-shadow: 0 8px 20px rgba(224, 85, 85, 0.3);
  cursor: pointer;
  transition: opacity 0.2s;
}

.stop-btn.hidden {
  display: none;
}

.status[data-type="error"] {
  background: rgba(255, 230, 230, 0.9);
  color: #c0392b;
}

.status[data-type="success"] {
  background: rgba(230, 255, 240, 0.9);
  color: #1e7e4f;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

@keyframes bounce {
  from { transform: translateY(0); opacity: 0.45; }
  to { transform: translateY(-6px); opacity: 1; }
}

@media (max-width: 900px) {
  .hero-card,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .mascot {
    width: 140px;
    height: 140px;
  }

  .app-grid {
    display: grid;
  }

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

  .send-btn {
    height: 48px;
  }
}
