:root {
  --color-white: #ffffff;
  --color-text-soft: rgba(255, 255, 255, 0.82);
  --color-text-muted: rgba(255, 255, 255, 0.68);
  --color-border: rgba(255, 255, 255, 0.14);
  --color-glass: rgba(255, 255, 255, 0.08);
  --color-glass-strong: rgba(255, 255, 255, 0.12);
  --color-dark: #111111;
  --color-chip: #222;
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.22);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 6px;
  --container: 1180px;

  --bg: #0a0a0c;
  --panel: #121214;
  --panel-2: #17171a;
  --panel-3: #1c1c20;
  --line: rgba(255, 255, 255, 0.08);
  --muted: #9a9aa2;
  --muted-2: #6f6f78;
  --accent-a: #ff145f;
  --accent-b: #6c3cff;
  --accent-c: #ff2d55;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: 'SUSE', Arial, sans-serif;
  background: #0a0a0c;
  color: var(--color-white);
  min-height: 100vh;
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.frame {
  background: linear-gradient(90deg, #141416 0%, #0a0a0c 32%, #050506 100%);
  padding: 15px 20px 15px;
  min-height: 100%;
}

.app {
  display: grid;
  grid-template-columns: 305px 1fr;
  gap: 15px;
  height: calc(100vh - 44px);
  min-height: calc(100vh - 25px);
  position: relative;
}

.logo img {
  height: 30px;
}

.sidebar {
  padding: 12px 10px 0 0;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px 18px 6px;
}

.logo {
  font-family: 'SUSE', Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 16px;
  padding: 0;
}

.close-sidebar-btn {
  display: none;
}

.new-chat {
  margin: 14px 6px 22px 0;
  border: 0;
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  text-transform: capitalize;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.new-chat span {
  display: block;
  text-align: center;
  font-size: 25px;
  line-height: 1;
}

.nav {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.nav a,
.model-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  text-transform: capitalize;
  padding: 8px 4px;
}

.bullet {
  display: flex;
}

.nav .bullet,
.model-link .bullet {
  width: 18px;
  text-align: center;
  color: #f1f1f1;
  opacity: 0.9;
  flex: 0 0 auto;
}

.section-title {
  color: var(--muted-2);
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 15px;
  margin: 18px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.models {
  display: grid;
  gap: 8px;
}

.model-link {
  padding-left: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}

.settings {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-feature-settings: 'liga' off, 'calt' off;
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.42px;
  padding: 10px 0 18px 20px;
}

.profile {
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ddd;
  flex: 0 0 auto;
}

.profile-name {
  color: #fff;
  font-family: Outfit, Arial, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
}

.profile-plan {
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

.profile-right {
  display: grid;
  gap: 3px;
  color: #f0f0f0;
  font-size: 14px;
}

.main {
  background: #050506;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  min-height: 0;
}

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 0 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: #000;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
}

.ghost-btn,
.share-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: white;
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  font-family: Outfit, Arial, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-btn.square {
  width: 52px;
  justify-content: center;
  padding: 0;
}

.content {
  flex: 1;
  padding: 4px 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.subscribe-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: white;
  border-radius: 16px;
  padding: 12px 18px;
  font-family: Outfit, Arial, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
}

.subscribe-chip strong {
  color: #ff235f;
}

.hero-logo {
  font-family: 'SUSE', Arial, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 34px;
}

.hero-logo img {
  height: 30px;
  margin-top: 30px;
}

.hero-title {
  color: #fff;
  text-align: center;
  font-family: Outfit, Arial, sans-serif;
  font-size: 35px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: -0.84px;
  margin-top: 0;
}

.prompt-wrap {
  width: min(760px, 100%);
  background: linear-gradient(180deg, #060607 0%, #111113 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.prompt-box {
  min-height: 140px;
  padding: 28px 28px 18px;
  position: relative;
  background: rgb(255 255 255 / 2%);
  border-radius: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  
}

.prompt-placeholder {
  color: #fff;
  font-family: Outfit, Arial, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 200;
  line-height: 150%;
  letter-spacing: -0.18px;
  opacity: 0.8;
}

.prompt-actions {
  position: absolute;
  left: 26px;
  right: 22px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mode-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 16px;
  color: #eaeaea;
  background: rgba(255, 255, 255, 0.03);
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 150%;
  letter-spacing: -0.14px;
}

.mode-btn.active {
  color: #ff235f;
  border-color: rgba(255, 45, 85, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 85, 0.2);
}

.right-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  color: white;
  font-size: 25px;
}

.send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-c);
  color: white;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(255, 45, 85, 0.35);
  flex: 0 0 auto;
  border: 0;
}

.send-btn.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.send-btn.loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;
}

.send-btn.loading svg {
    opacity: 0;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.chat-attach-btn {
    transition: opacity 0.2s ease;
}

.login-note {
  padding: 14px 22px 18px;
  color: #fff;
  font-family: Outfit, Arial, sans-serif;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: -0.18px;
  font-size: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
  opacity: 0.6;
}

.login-note a{
    color: #fff;
    font-weight: inherit;
}

.cards {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 24px;
  padding: 18px 18px 16px;
  min-height: 168px;
}

.card-icon {
  font-size: 22px;
  margin-bottom: 10px;
  color: white;
}

.card h3 {
  margin: 0 0 10px;
  font-family: 'SUSE', Arial, sans-serif;
  font-size: 17px;
  font-weight: 500;
}

.card p {
  margin: 0;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #9f9fa8;
}

.footer-note {
  margin-top: auto;
  padding-top: 60px;
  color: #909090;
  text-align: center;
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 116%;
  letter-spacing: -0.14px;
}

.footer-note a {
  color: #d8d8dd;
}

.help {
  position: absolute;
  right: 26px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  place-items: center;
  color: white;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 28px;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 1100px) {
  .app {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .close-sidebar-btn {
    display: grid;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    max-width: 85vw;
    height: 100vh;
    z-index: 1200;
    background: #0b0b0d;
    padding: 18px 16px 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-bottom {
    margin-top: 32px;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1100;
  }

  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }

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

  .frame {
    padding: 0px;
  }

  .main {
    border-radius: 22px;
    height: 100vh;
  }

  .content {
    min-height: 0;
    }
}

@media (max-width: 767px) {
  .topbar {
    padding: 0 16px 0 18px;
    gap: 12px;
  }

  .topbar-left {
    min-width: 0;
    font-size: 16px;
  }

  .topbar-right {
    gap: 8px;
  }

  .share-btn {
    display: none;
  }

  .content {
    padding: 40px 16px 22px;
  }

  .hero-title {
    font-size: 42px;
  }

  .prompt-box {
    padding: 24px 18px 18px;
  }

  .prompt-actions {
    position: static;
    margin-top: 28px;
    flex-direction: column;
    align-items: stretch;
    left: auto;
    right: auto;
    bottom: auto;
  }

  .mode-buttons {
    width: 100%;
  }

  .mode-btn {
    width: 100%;
    justify-content: center;
  }

  .right-tools {
    justify-content: flex-end;
  }

  .subscribe-chip {
    font-size: 14px;
    padding: 10px 14px;
  }

  .login-note {
    font-size: 12px!important;
    padding: 14px 16px 18px;
  }

  .help {
    right: 16px;
    bottom: 18px;
    width: 44px;
    height: 44px;
  }
}

.prompt-textarea {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
  color: #fff;
  padding: 0;
}

.prompt-textarea::placeholder {
  color: #fff;
  opacity: 0.3;
}

.mode-btn {
  text-decoration: none;
}

.model-dropdown {
  position: relative;
}

.model-dropdown-toggle {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.model-dropdown-toggle::-webkit-details-marker {
  display: none;
}

.model-dropdown-arrow {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  line-height: 0;
}

.model-dropdown-arrow svg {
  display: block;
  width: 24px;
  height: 24px;
  transform-origin: center;
  transition: transform 0.18s ease;
}

.model-dropdown[open] .model-dropdown-arrow svg {
  transform: rotate(180deg);
}

.model-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 180px;
  padding: 10px;
  border-radius: 14px;
  background: #111113;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  z-index: 30;
  display: grid;
  gap: 4px;
}

.model-dropdown-item {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #FFF;
  text-decoration: none;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.3;
}

.model-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.model-dropdown-item.active {
  color: #ff235f;
  background: rgba(255, 45, 85, 0.08);
}

/* =========================
   CONTENT CHAT
========================= */

.content-chat {
  justify-content: flex-start;
  padding: 0;
  width: 100%;
  min-height: 0;
  align-items: stretch;
}

.content-chat .login-note{
    display: none;
}

.chat-window {
  width: 100%;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 22px 8px 18px;
  min-height: 0;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

.chat-row {
  display: flex;
  width: 100%;
}

.chat-row-user {
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
}

.chat-row-ai {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 14px;
}

.chat-user-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  background: #d9d9d9;
  margin-top: 2px;
}

.chat-ai-logo {
  width: 44px;
  min-width: 44px;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.chat-ai-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}

.chat-message-block {
  max-width: 585px;
  width: 100%;
}

.chat-bubble {
  border-radius: 18px;
}

.chat-bubble-user {
  max-width: 420px;
  padding: 16px 22px;
  border: 1px solid #ffffff26;
  background: rgb(255 255 255 / 6%);
  color: #FFF;
  font-family: Outfit, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
}

.chat-bubble-ai {
  border: 1px solid #ffffff26;
  background: rgb(255 255 255 / 6%);
  padding: 16px 16px 14px;
  border-radius: 16px;
}

.chat-message-header {
  color: #FFF;
  font-family: Outfit, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 140%;
  margin-bottom: 8px;
}

.chat-message-status {
  color: rgba(255, 255, 255, 0.45);
  font-family: Outfit, Arial, sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 150%;
  margin-bottom: 16px;
}

.chat-media-frame {
  width: 100%;
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.chat-media-frame img,
.chat-media-frame video {
  display: block;
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.chat-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}

.chat-time {
  color: rgba(255, 255, 255, 0.35);
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.chat-action-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.75;
  transition: 0.2s ease;
}

.chat-action-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

/* =========================
   PROMPT CHAT
========================= */

.prompt-wrap-chat {
  width: 100%;
  max-width: none;
  margin-top: auto;
  border-radius: 22px;
  overflow: visible;
}

.prompt-wrap-chat .prompt-box {
  min-height: 140px;
  padding: 22px 22px 18px;
          background: rgb(255 255 255 / 2%);
        border-radius: 18px;
}

.prompt-textarea {
  width: 100%;
  min-height: 72px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: #FFF;
  opacity: 1;
  display: block;
}

.prompt-textarea::placeholder {
  color: #FFF;
  opacity: 0.24;
}

.prompt-wrap-chat .prompt-actions {
  position: static;
  margin-top: 12px;
}

.prompt-wrap-chat .login-note {
  padding: 10px 18px 12px;
  font-size: 14px;
  line-height: 140%;
}

.chat-attach-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.8;
  flex: 0 0 auto;
}

.chat-attach-btn:hover {
  opacity: 1;
}

.mode-buttons a.mode-btn {
  text-decoration: none;
}

.video-result {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.video-result video {
    max-width: 100%;
    border-radius: 12px;
}

/* NUEVOS CONTROLES DESKTOP/MOBILE */

.prompt-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.prompt-selectors {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex-direction: row;
}

.prompt-select-wrap {
  position: relative;
  min-width: 0;
}

.prompt-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 78px;
  height: 44px;
  padding: 0 34px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #FFF;
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  outline: none;
  cursor: pointer;
  box-shadow: none;
}

.prompt-select:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

.prompt-select-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-52%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}

/* =========================
   RESPONSIVE CHAT
========================= */

@media (max-width: 1100px) {
  .chat-window {
    max-width: 100%;
    padding: 0 16px 16px;
    height: 100%;
    min-height: 0;
    }
}

@media (max-width: 767px) {
  .chat-row-ai {
    gap: 10px;
  }

  .chat-ai-logo {
    width: 34px;
    min-width: 34px;
  }

  .chat-ai-logo img {
    width: 26px;
    height: 26px;
  }

  .chat-message-block {
    max-width: 100%;
  }

  .chat-bubble-user {
    max-width: calc(100% - 46px);
    padding: 14px 16px;
    font-size: 15px;
  }

  .chat-bubble-ai {
    padding: 14px;
  }

  .chat-message-header {
    font-size: 17px;
  }

  .chat-message-status {
    font-size: 14px;
  }

  .chat-meta-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .prompt-wrap-chat .prompt-box {
    padding: 18px 16px 16px;
  }
}

/* solo mobile menu de modos */
.mode-mobile-dropdown {
  display: none;
}

@media (max-width: 767px) {

.chat-messages {
    padding: 18px 0 22px;
    }

  .prompt-wrap-chat .prompt-actions {
    position: static;
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "mode mode"
      "selectors tools";
    align-items: end;
    gap: 12px;
  }

  .prompt-controls {
    display: contents;
  }

  .prompt-wrap-chat .mode-buttons {
    display: none;
  }

  .content-home .prompt-wrap .mode-buttons {
  display: none;
}

  .prompt-wrap-chat .mode-buttons > .mode-btn {
    display: none;
  }

  .mode-mobile-dropdown {
    display: block;
    position: relative;
    min-width: 0;
    grid-area: mode;
  }

  .mode-mobile-details {
    position: relative;
    width: 100%;
  }

  .mode-mobile-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 56px;
    width: 100%;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 45, 85, 0.75);
    background: rgba(255, 255, 255, 0.02);
    color: #ff235f;
    cursor: pointer;
    user-select: none;
    font-family: Outfit, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 150%;
  }

  .mode-mobile-summary::-webkit-details-marker {
    display: none;
  }

  .mode-mobile-current {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mode-mobile-current span {
    white-space: nowrap;
  }

  .mode-mobile-arrow {
    font-size: 18px;
    line-height: 1;
    color: #fff;
    opacity: 0.95;
    transition: transform 0.18s ease;
    display: flex;
    align-items: center;
    margin-top: 2px;
    flex: 0 0 auto;
  }

  .mode-mobile-details[open] .mode-mobile-arrow {
    transform: rotate(180deg);
  }

  .mode-mobile-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: 100%;
    min-width: 220px;
    padding: 8px;
    border-radius: 16px;
    background: #0b0b0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
    z-index: 30;
    display: grid;
    gap: 6px;
  }

  .mode-mobile-item {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-family: Outfit, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 140%;
  }

  .mode-mobile-item:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .mode-mobile-item.active {
    color: #ff235f;
    background: rgba(255, 45, 85, 0.1);
  }

  .prompt-mini-dropdown {
    width: 100%;
  }

  .prompt-mini-toggle {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    height: 46px;
  }

  .prompt-mini-menu {
    width: 100%;
    min-width: 100%;
  }

  .prompt-wrap-chat .right-tools {
    grid-area: tools;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    justify-self: end;
  }

  .prompt-wrap-chat .chat-attach-btn {
    width: 40px;
    height: 40px;
  }

  .prompt-wrap-chat .send-btn {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
  }

  .prompt-wrap-chat .login-note {
    font-size: 14px;
    line-height: 145%;
  }
}

/* =========================
   MINI DROPDOWNS DURACION / CALIDAD
========================= */

.prompt-selectors {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.prompt-mini-dropdown {
  position: relative;
}

.prompt-mini-toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 78px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.prompt-mini-toggle::-webkit-details-marker {
  display: none;
}

.prompt-mini-arrow {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.prompt-mini-dropdown[open] .prompt-mini-arrow {
  transform: rotate(180deg);
}

.prompt-mini-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 100%;
  padding: 8px;
  border-radius: 16px;
  background: #0b0b0f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  z-index: 35;
  display: grid;
  gap: 6px;
}

.prompt-mini-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  font-family: Outfit, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 140%;
}

.prompt-mini-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.prompt-mini-item.active {
  color: #ff235f;
  background: rgba(255, 45, 85, 0.1);
}

/* =========================
   HOME ANTIGUA SEPARADA DEL CHAT
========================= */

.content-home {
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-top: 120px;
}

/* desktop: mantiene el aspecto centrado */
.content-home .help {
  position: absolute;
}

/* mobile/tablet: la home antigua debe poder hacer scroll normal */
@media (max-width: 1100px) {
  body {
    overflow: auto;
  }

  .content-home {
    display: block;
    padding: 24px 16px 90px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .content-home .subscribe-chip,
  .content-home .hero-logo,
  .content-home .hero-title,
  .content-home .prompt-wrap,
  .content-home .cards,
  .content-home .footer-note {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }

  .content-home .hero-logo {
    margin-bottom: 22px;
    text-align: center;
  }

  .content-home .hero-title {
    margin-bottom: 22px;
  }

  .content-home .prompt-wrap {
    margin-top: 0;
  }

  .content-home .cards {
    margin-top: 20px;
  }

  .content-home .footer-note {
    margin-top: 28px;
    padding-top: 0;
  }

  .content-home .help {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 20;
  }
}

@media (max-width: 767px) {
  .content-home {
    padding: 20px 16px 90px;
  }

  .content-home .subscribe-chip {
    font-size: 14px;
    padding: 10px 14px;
  }

  .content-home .hero-title {
    font-size: 42px;
    line-height: 1.15;
    margin-bottom: 20px;
  }

  .content-home .cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .content-home .footer-note {
    font-size: 13px;
    line-height: 1.4;
  }
}

@media (max-width: 767px) {
  .prompt-wrap .prompt-actions {
    position: static;
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "mode mode"
      "selectors tools";
    align-items: end;
    gap: 12px;
  }

  .prompt-wrap .prompt-selectors {
    grid-area: selectors;
  }

  .prompt-wrap .mode-mobile-dropdown {
    grid-area: mode;
  }

  .prompt-wrap .right-tools {
    grid-area: tools;
  }
}

/* ================= VIDEO READY ================= */

.video-ready {
    animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* glow */
.video-highlight {
    box-shadow: 0 0 0 rgba(34,197,94,0.6);
    animation: pulseGlow 1s ease;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 rgba(34,197,94,0);
    }
    50% {
        box-shadow: 0 0 12px rgba(34,197,94,0.6);
    }
    100% {
        box-shadow: 0 0 0 rgba(34,197,94,0);
    }
}

/* texto ready */
.video-ready-text {
    font-size: 13px;
    color: #22c55e;
    opacity: 0;
    transform: translateY(5px);
    animation: fadeUp 0.4s ease forwards;
    animation-delay: 0.2s;
}

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

.image-wrapper {
    position: relative;
    display: inline-block; /* 🔥 ESTO ES LA CLAVE */
}

.image-preview-img {
    display: block;
    max-width: 120px;
    border-radius: 8px;
}

.remove-img-btn {
    position: absolute;
    top: -6px;   /* 👈 lo sacamos un poco fuera */
    right: -6px;

    width: 28px;  /* 👈 más grande */
    height: 28px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 0, 0, 0.95);
    color: white;

    font-size: 14px;
    font-weight: bold;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    padding: 0;

    z-index: 10;
}

/* Hover */
.remove-img-btn:hover {
    background: red;
}
.chat-message-status {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.status-changing {
    opacity: 0;
    transform: translateY(5px);
}

.chat-error-animated {
    animation: fadeSlideIn 0.35s ease forwards;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}