:root {
  color-scheme: dark;
  font-size: 16px;
  --bg: #04040a;
  --bg-alt: #0a0a12;
  --text: #e7f5ff;
  --muted: #96a2c4;
  --accent: linear-gradient(120deg, #49c5ff, #d46bff 60%, #ff9494);
  --glass: rgba(12, 17, 33, 0.6);
  --border: rgba(255, 255, 255, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.cosmic-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(73, 197, 255, 0.2), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(212, 107, 255, 0.25), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 148, 148, 0.15), transparent 50%),
    #020409;
  filter: blur(40px);
  z-index: -2;
  animation: pulse 18s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

main {
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
  padding-top: 5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(1200px, calc(100% - 3rem));
  margin: 0.75rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: rgba(4, 7, 17, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: "Space Grotesk", sans-serif;
}

.logo-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 6px 18px rgba(73, 197, 255, 0.35));
  border-radius: 50%;
}

.logo-type span {
  display: block;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-type small {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--text);
}

.cta-group {
  display: flex;
  gap: 0.65rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: transparent;
  transition: all 0.2s ease;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.solid-btn {
  background-image: var(--accent);
  box-shadow: 0 10px 30px rgba(73, 197, 255, 0.3);
}

.large {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  padding: 4rem 0 2rem;
}

.hero__copy h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  margin: 0.4rem 0 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  color: var(--muted);
}

.subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.feature-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.feature-grid article {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.hero__visual {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.video-shell {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  filter: saturate(0.85) brightness(1.05);
  transition: opacity 0.6s ease;
}

.carousel .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(4, 4, 10, 0.6);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.2rem;
  line-height: 0;
  cursor: pointer;
}

.carousel .nav:hover {
  background: rgba(4, 4, 10, 0.85);
}

.carousel .prev {
  left: 0.75rem;
}

.carousel .next {
  right: 0.75rem;
}

.overlay-chip {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(4, 4, 10, 0.85);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

#hero-signals {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#hero-signals li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.35rem;
}

#hero-signals li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

#hero-signals span {
  font-weight: 500;
  color: var(--text);
}

.panel {
  margin: 3.5rem 0;
}

.panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-shell input {
  width: min(320px, 80vw);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  color: var(--text);
}

.card-grid {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.card-grid::-webkit-scrollbar {
  height: 6px;
}

.card-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 240px;
  scroll-snap-align: start;
}

.card img,
.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
}

.card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.creator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.creator img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.muted {
  color: var(--muted);
}

.ai-reason {
  align-self: flex-start;
  font-size: 0.8rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(73, 197, 255, 0.15);
  border: 1px solid rgba(73, 197, 255, 0.4);
}

.reason-pop {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.profile__header {
  position: relative;
  padding: 0;
}

.profile__banner {
  height: 160px;
  background: linear-gradient(135deg, rgba(73, 197, 255, 0.4), rgba(212, 107, 255, 0.4));
  border-radius: 24px 24px 0 0;
}

.profile__identity {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
}

.profile__identity img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  margin-top: -60px;
}

.profile__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.profile__stats div {
  text-align: center;
}

.profile__stats strong {
  display: block;
  font-size: 1.4rem;
}

.profile__tabs {
  margin: 1rem 0;
  display: flex;
  gap: 1rem;
}

.profile__tabs button {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.profile__tabs .active {
  background-image: var(--accent);
}

.profile__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-item {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.create__layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.create__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
}

.create__form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.create__form input,
.create__form textarea {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  resize: vertical;
}

.tag-suggestions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.create__insights {
  padding: 1.5rem;
}

.create__insights ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.create__insights li {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem;
  border-radius: 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.messages__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1.25rem;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.thread {
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  border: 1px solid transparent;
  transition: border 0.2s ease;
}

.thread.active {
  border-color: rgba(73, 197, 255, 0.4);
  background: rgba(73, 197, 255, 0.08);
}

.thread span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.thread-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-stream {
  flex: 1;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bubble {
  align-self: flex-start;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  max-width: 80%;
}

.bubble.me {
  align-self: flex-end;
  background: rgba(73, 197, 255, 0.2);
}

.chat-input {
  display: flex;
  gap: 0.75rem;
}

.chat-input input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.75rem 1rem;
}

.settings__grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.settings__grid article {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setting-row,
.toggle,
.slider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.toggle input {
  display: none;
}

.toggle span {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
}

.toggle span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.toggle input:checked + span::after {
  transform: translateX(18px);
  background: #49c5ff;
}

.toggle div {
  flex: 1;
}

.slider input {
  flex: 0 0 120px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  font-size: 0.85rem;
}

.pill.active {
  background-image: var(--accent);
}

footer {
  width: min(1200px, calc(100% - 3rem));
  margin: 4rem auto;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
+  flex-wrap: wrap;
  justify-content: space-between;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .create__layout,
  .messages__layout {
    grid-template-columns: 1fr;
  }

  .profile__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

