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

:root {
  --bg: #05060a;
  --card: rgba(255, 255, 255, 0.075);
  --card-2: rgba(255, 255, 255, 0.11);
  --border: rgba(255, 255, 255, 0.13);
  --text: #ffffff;
  --text-soft: #dbe3f3;
  --muted: #8d96aa;
  --primary: #e50914;
  --primary-2: #ff3d00;
  --purple: #7c3aed;
  --blue: #06b6d4;
  --green: #22c55e;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(229, 9, 20, 0.32), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(124, 58, 237, 0.28), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(6, 182, 212, 0.16), transparent 34%),
    linear-gradient(135deg, #03040a 0%, #070914 48%, #111827 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: -1;
}

button,
input {
  font: inherit;
}

.app {
  width: min(1180px, 94vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.035)),
    radial-gradient(circle at 15% 20%, rgba(229, 9, 20, 0.25), transparent 34%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20px -1px -20px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--blue), transparent);
  opacity: .8;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  padding: 8px 12px;
  border: 1px solid rgba(229, 9, 20, 0.34);
  border-radius: 999px;
  color: #ffd7d7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
  background: rgba(229, 9, 20, 0.13);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 18px var(--primary);
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: .93;
  letter-spacing: -.07em;
}

.subtitle {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.65;
}

.examples {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
}

.examples button {
  position: relative;
  width: 100%;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  border-radius: 18px;
  padding: 14px 36px 14px 15px;
  background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.05));
  box-shadow: 0 12px 35px rgba(0,0,0,.24);
  transition: .22s ease;
}

.examples button::after {
  content: "→";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-weight: 900;
}

.examples button:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 9, 20, .45);
  background: linear-gradient(135deg, rgba(229,9,20,.18), rgba(255,255,255,.07));
}

.chat-shell {
  position: relative;
  min-height: 670px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035)), rgba(7, 9, 20, .78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}

.bubble {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  animation: bubbleIn .24s ease both;
}

.bubble--user {
  flex-direction: row-reverse;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
}

.bubble--ai .avatar {
  background: linear-gradient(135deg, rgba(229,9,20,.95), rgba(124,58,237,.86));
}

.bubble--user .avatar {
  background: linear-gradient(135deg, rgba(6,182,212,.95), rgba(124,58,237,.88));
}

.bubble__content {
  max-width: min(800px, 78%);
  padding: 15px 16px;
  border-radius: 22px;
  color: #eef2ff;
  line-height: 1.58;
  background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.06));
  border: 1px solid var(--border);
  box-shadow: 0 15px 35px rgba(0,0,0,.18);
}

.bubble--ai .bubble__content {
  border-top-left-radius: 8px;
}

.bubble--user .bubble__content {
  border-top-right-radius: 8px;
  background: linear-gradient(135deg, rgba(229,9,20,.88), rgba(124,58,237,.82));
}

.bubble__content--error {
  color: #fecdd3;
  border-color: rgba(251,113,133,.35);
  background: rgba(251,113,133,.12);
}

.typing {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--text-soft);
}

.typing::after {
  content: "";
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,.22);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin .9s linear infinite;
}

.cards {
  display: grid;
  gap: 13px;
  margin-top: 15px;
}

.movie-card {
  position: relative;
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 15px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.035)), rgba(0,0,0,.26);
  overflow: hidden;
  transition: .22s ease;
}

.movie-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--purple), var(--blue));
}

.movie-card:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 9, 20, .34);
}

.movie-card__poster {
  width: 98px;
  height: 145px;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  box-shadow: 0 18px 35px rgba(0,0,0,.38);
}

.movie-card__title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 2px 0 7px;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 950;
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.28);
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.movie-card__meta {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.movie-card__reason {
  margin: 0 0 12px;
  color: #dce6f9;
  font-size: 14px;
  line-height: 1.5;
}

.movie-card__watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 15px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 30px rgba(229,9,20,.24);
}

.movie-card__watch::after {
  content: "▶";
  margin-left: 8px;
  font-size: 10px;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.28));
}

.composer input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  outline: none;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255,255,255,.09);
  font-size: 15px;
}

.composer input:focus {
  border-color: rgba(229,9,20,.55);
  box-shadow: 0 0 0 4px rgba(229,9,20,.13);
}

.composer button {
  min-width: 120px;
  height: 52px;
  border: 0;
  cursor: pointer;
  color: #fff;
  border-radius: 999px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 15px 35px rgba(229,9,20,.28);
}

.composer button:disabled {
  opacity: .58;
  cursor: not-allowed;
}

@keyframes bubbleIn {
  from {
    transform: translateY(7px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .app {
    width: min(100% - 28px, 860px);
    padding: 18px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .examples {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .examples button {
    min-height: 58px;
    font-size: 13px;
  }

  .chat-shell {
    min-height: 630px;
  }
}

@media (max-width: 640px) {
  body {
    min-height: 100dvh;
  }

  .app {
    width: 100%;
    padding: 10px;
  }

  .hero {
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 24px;
  }

  .eyebrow {
    padding: 7px 10px;
    font-size: 10px;
    margin-bottom: 11px;
  }

  h1 {
    font-size: 32px;
    line-height: .98;
    letter-spacing: -.05em;
  }

  .subtitle {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.48;
  }

  .examples {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .examples button {
    min-height: 46px;
    padding: 11px 34px 11px 13px;
    border-radius: 15px;
    font-size: 13px;
  }

  .chat-shell {
    height: calc(100dvh - 250px);
    min-height: 520px;
    border-radius: 24px;
  }

  .chat {
    padding: 14px;
  }

  .bubble {
    gap: 8px;
    margin-bottom: 14px;
  }

  .avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 12px;
    font-size: 10px;
  }

  .bubble__content {
    max-width: calc(100% - 42px);
    padding: 12px 13px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.48;
  }

  .movie-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 19px;
  }

  .movie-card__poster {
    width: 76px;
    height: 112px;
    border-radius: 14px;
  }

  .movie-card__title {
    font-size: 15px;
  }

  .movie-card__meta {
    font-size: 11px;
  }

  .movie-card__reason {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .composer {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px;
  }

  .composer input {
    height: 46px;
    font-size: 14px;
  }

  .composer button {
    width: 100%;
    height: 44px;
    min-width: 0;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .app {
    padding: 8px;
  }

  .hero {
    padding: 15px;
    border-radius: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 13px;
  }

  .chat-shell {
    height: calc(100dvh - 230px);
    min-height: 500px;
    border-radius: 20px;
  }

  .chat {
    padding: 12px;
  }

  .bubble__content {
    font-size: 13px;
  }

  .movie-card {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .movie-card__poster {
    width: 68px;
    height: 102px;
  }

  .movie-card__title {
    font-size: 14px;
  }

  .movie-card__meta {
    font-size: 10.5px;
  }

  .movie-card__reason {
    font-size: 11.5px;
    -webkit-line-clamp: 2;
  }
}