/* chat.css – messages, input area, code blocks, thinking indicators */
/* NovaX Edition - Monochrome, compact, premium glass aesthetic */

/* ----------------------------------------- */
/* CSS Variables & Root Settings             */
/* ----------------------------------------- */
/* :root consolidated in base.css */


/* ----------------------------------------- */
/* Base Styles & Reset                       */
/* ----------------------------------------- */
* {
  box-sizing: border-box;
}

/* ----------------------------------------- */
/* chat container & layout                   */
/* ----------------------------------------- */
.view-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.view-chat.idle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* FIX */
  align-items: center;
  height: 100%;
}

.view-chat.idle .chat-container {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 0;
}

.view-chat.idle .messages {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  overflow: hidden;
}

.view-chat.idle .welcome-screen {
  margin-bottom: 0;
  transform: translateY(-80px);
}

.view-chat.idle .input-area {
  position: sticky;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 20;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  position: relative;
}

.messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 60px 0px 40px 0px;
  /* Reduced top padding for better spacing */
  max-width: var(--messages-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;

  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox: hide scrollbar */

  /* MOBILE SCROLL FIX */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

/* Webkit: hide scrollbar */
.messages::-webkit-scrollbar {
  display: none;
}

/* First message should start near the top */
.messages>.message:first-child {
  margin-top: 0;
}

.view-chat.idle .messages {
  max-width: 100%;
  padding-top: 20px !important;
  padding-bottom: 20px !important;
  justify-content: center !important;
  height: auto !important;
  display: flex;
  flex-direction: column !important;
}

/* ----------------------------------------- */
/* message bubbles - MINIMAL MONOCHROME      */
/* ----------------------------------------- */
.message {
  width: 100%;
  display: flex;
  justify-content: center;
  animation: messageFade 0.25s ease;
  position: relative;
}

@keyframes messageFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Assistant messages - transparent */
.message.assistant .content {
  background: transparent;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  max-width: 760px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  box-shadow: none;
}

.message.assistant .content:hover {
  background: rgba(255, 255, 255, 0.02);
}

.message:hover .content {
  transform: none;
}

/* User messages - right-aligned bubble */
.message.user {
  display: flex;
  justify-content: flex-end;
}

.message.user .content {
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 12px 16px;
  max-width: 520px;
  color: var(--text-primary);
  transition: transform 0.15s ease, background 0.2s ease;
}


.message .content {
  transition: transform 0.15s ease, background 0.2s ease;
}

.message:hover .content {
  transform: translateY(-2px);
}

/* System messages */
.message.system {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  text-align: center;
  font-size: 0.9em;
  color: #e6e6e6;
  align-self: center;
  max-width: 90%;
}

.welcome-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  text-align: center;
}

.welcome-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.05));
  object-fit: contain;
}

#welcome-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.03em;
}

.welcome-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 40px !important;
  text-align: center;
  font-weight: 400;
}

.suggested-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  width: 100%;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 22px;
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.prompt-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Typing cursor for streaming */
.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background: rgba(255, 255, 255, 0.6);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50%,
  100% {
    opacity: 0;
  }

  25%,
  75% {
    opacity: 1;
  }
}

/* Message Actions - Minimal, invisible until hover */
.message-actions {
  max-width: 720px;
  margin: 0 auto 8px auto;
  padding: 0 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  gap: 8px;
}

.message.assistant:hover .message-actions,
.message.user:hover .message-actions {
  opacity: 1;
}

.action-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.action-btn:hover {
  color: white;
  background: transparent;
}

.action-btn i {
  font-size: 14px;
}

/* Message Reactions */
.message-reactions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  flex-wrap: wrap;
}

.message:hover .message-reactions {
  opacity: 1;
}

.reaction-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: #888;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.reaction-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.reaction-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.reaction-btn[data-count]::after {
  content: attr(data-count);
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-primary);
  color: black;
  font-size: 9px;
  padding: 2px 4px;
  border-radius: 10px;
  min-width: 14px;
  text-align: center;
}

/* Bookmark button */
.bookmark-btn {
  margin-left: auto;
}

.bookmark-btn.active {
  color: #fbbf24;
  border-color: #fbbf24;
}

.bookmark-btn.active i {
  color: #fbbf24;
}

/* ----------------------------------------- */
/* Typography Improvements                    */
/* ----------------------------------------- */
.ai .content h1,
.ai .content h2,
.ai .content h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 28px 0 14px;
  color: #ffffff;
}

.ai .content h1 {
  font-size: 2em;
}

.ai .content h2 {
  font-size: 1.5em;
}

.ai .content h3 {
  font-size: 1.17em;
}

.ai .content p {
  margin-bottom: 16px;
}

.ai .content p:last-child {
  margin-bottom: 0;
}

.ai .content ul,
.ai .content ol {
  margin: 16px 0 20px 24px;
}

.ai .content li {
  margin-bottom: 10px;
}

.ai .content strong {
  font-weight: 600;
  color: #ffffff;
}

.ai .content code:not(pre code) {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ----------------------------------------- */
/* Table Styling - Premium Dark Glass        */
/* ----------------------------------------- */
.message .content table,
.final-answer table,
.stream-container table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
}

.message .content table thead,
.final-answer table thead,
.stream-container table thead {
  background: rgba(255, 255, 255, 0.06);
}

.message .content table th,
.final-answer table th,
.stream-container table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #ffffff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.message .content table td,
.final-answer table td,
.stream-container table td {
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.5;
}

.message .content table tbody tr:last-child td,
.final-answer table tbody tr:last-child td,
.stream-container table tbody tr:last-child td {
  border-bottom: none;
}

.message .content table tbody tr:hover,
.final-answer table tbody tr:hover,
.stream-container table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.message .content table tbody tr:nth-child(even),
.final-answer table tbody tr:nth-child(even),
.stream-container table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

/* Responsive table wrapper for overflow */
.message .content .table-wrapper,
.final-answer .table-wrapper,
.stream-container .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border-radius: 12px;
}

/* ----------------------------------------- */
/* thinking indicators - MONOCHROME          */
/* ----------------------------------------- */
.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.thinking-squares {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: rotateNeural 1.4s linear infinite;
}

.thinking-squares .square {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 2px;
}

.thinking-squares .square:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.thinking-squares .square:nth-child(2) {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.thinking-squares .square:nth-child(3) {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.thinking-squares .square:nth-child(4) {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes rotateNeural {
  100% {
    transform: rotate(360deg);
  }
}

.message.ai.thinking {
  padding: 0;
  border-radius: 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  align-items: center;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.3;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Brain loader - monochrome */
.brain-loader {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 28px;
}

.brain-loader i {
  font-size: 24px;
  animation: brainPulse 1.4s ease-in-out infinite;
}

.brain-loader span {
  color: #aaa;
  font-size: 14px;
}

@keyframes brainPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.response-appear {
  opacity: 0;
  transform: translateY(6px);
  animation: responseFade 0.3s var(--transition-default) forwards;
}

@keyframes responseFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------- */
/* code blocks - IMPROVED                    */
/* ----------------------------------------- */
.code-block-wrapper {
  border-radius: 12px;
  overflow: hidden;
  background: #0b0b0b;
  margin: 16px 0;
  position: relative;
  border: 1px solid var(--border-subtle);
}

.code-block-wrapper:hover .code-toolbar {
  opacity: 1;
}

.code-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(4px);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.lang-label {
  font-size: 12px;
  color: #999;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.code-toolbar button {
  background: transparent;
  border: none;
  color: #ddd;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.code-toolbar button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.code-toolbar button.copied {
  color: #4ade80;
}

.code-toolbar button.copied i {
  animation: checkPop 0.2s ease;
}

@keyframes checkPop {
  0% {
    transform: scale(0.8);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: transparent;
}

pre code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  display: block;
}

/* ----------------------------------------- */
/* input area - MINIMAL AESTHETIC            */
/* ----------------------------------------- */
.input-area {
  position: sticky;
  bottom: 0;
  padding: 18px 24px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  border-top: none;
  background: transparent;
  backdrop-filter: blur(10px);
  z-index: 3;
  flex-shrink: 0;
  width: 100%;
}

.input-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.02), transparent);
  pointer-events: none;
}

.input-wrapper {
  width: min(720px, 92%);
  margin: 0 auto;

  background: linear-gradient(180deg, #050505 0%, #0a0a0a 100%) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.03);

  padding: 6px 12px 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;

  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.view-chat.idle .input-wrapper {
  width: min(720px, 90%);
}

.input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.message-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;

  color: var(--text-primary);
  font-size: 16px;
  font-weight: 400;

  padding: 14px 0;
  resize: none;
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.5;
  caret-color: var(--accent);
  font-family: inherit;
}

.message-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.message-input:focus,
.message-input:focus-visible {
  border: none;
  outline: none !important;
  box-shadow: none;
}


.message-input::placeholder {
  color: #555;
  user-select: none;
}

.message-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Voice input button */
.voice-input-btn {
  background: transparent;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  margin-right: 4px;
}

.input-wrapper.typing-active .voice-input-btn {
  display: none;
}

.voice-input-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  transform: scale(1.02);
}

.voice-input-btn.listening {
  color: #ef4444;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.action-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* model pill & search toggle - MONOCHROME */
.model-pill,
.search-toggle {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 40px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #ddd;
  font-size: 13px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.model-pill {
  height: 38px;
}

.model-pill i {
  font-size: 18px;
}

.model-pill span#modelLabel {
  display: inline;
}

.model-pill .chevron {
  font-size: 12px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.model-pill.active .chevron {
  transform: rotate(180deg);
}

.search-toggle.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: var(--border-strong);
}

.model-pill:hover,
.search-toggle:hover {
  background: rgba(20, 20, 20, 0.9);
  transform: translateY(-1px);
}

/* send button - MONOCHROME FORCE */
.send-btn,
.send-btn.disabled,
.send-btn:disabled,
.send-btn:not(:disabled) {
  background: #ffffff !important;
  border: none !important;
  color: #000000 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.send-btn.disabled,
.send-btn:disabled {
  background: #333333 !important;
  color: #666666 !important;
  cursor: not-allowed;
  opacity: 0.6 !important;
}

.action-group .send-btn,
#sendBtn,
.action-group .voice-input-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
  border: none !important;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-group .send-btn:hover,
#sendBtn:hover,
.action-group .voice-input-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-2px) scale(1.02);
}

.plus-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: scale(1.02);
}

.send-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.send-btn i {
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.send-btn:not(:disabled):hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.send-btn:not(:disabled):hover::before {
  opacity: 1;
}

.send-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.send-btn.loading {
  display: none !important;
}

.send-btn.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* stop button */
.stop-btn {
  background: rgba(239, 68, 68, 0.15); /* Red tinted background */
  padding: 8px 20px;
  border-radius: 40px;
  color: #ef4444; /* Solid red text/icon */
  font-weight: 600;
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
  display: none;
  transition: all 0.15s ease;
  font-size: 14px;
  align-items: center;
  gap: 8px;
}

.stop-btn.visible {
  display: inline-flex;
}

.stop-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  transform: scale(1.02);
}

.stop-btn i {
  font-size: 14px;
}

/* Hide Regenerate button on all but the last message */
.message:not(:last-child) .action-btn[title="Regenerate response"] {
  display: none !important;
}

/* Thinking Text animation */
.thinking-text {
  display: inline-flex;
  align-items: center;
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  animation: pulse-op 1.5s infinite ease-in-out;
  margin-left: 8px;
}

@keyframes pulse-op {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}


/* ----------------------------------------- */
/* Toast notifications                       */
/* ----------------------------------------- */
.toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  padding: 12px 24px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10000;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast-error {
  border-bottom: 2px solid #ef4444;
}

.toast-success {
  border-bottom: 2px solid #10b981;
}

.toast-info {
  border-bottom: 2px solid #6366f1;
}

/* ----------------------------------------- */
/* Scroll to bottom button                   */
/* ----------------------------------------- */
.scroll-bottom-btn {
  position: absolute;
  bottom: 100px;
  right: 30px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--color-primary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scroll-bottom-btn.visible {
  display: flex;
}

.scroll-bottom-btn:hover {
  transform: translateY(-2px);
  background: var(--color-primary);
  color: black;
}

.scroll-bottom-btn.hidden {
  display: none;
}

/* ----------------------------------------- */
/* model dropdown menu - MONOCHROME          */
/* ----------------------------------------- */
.model-dropdown {
  position: relative;
}

.dropdown-menu.model-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  min-width: 180px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.dropdown-menu.model-menu.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.model-menu-item {
  padding: 10px 14px;
  border-radius: 8px;
  color: #eee;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.model-menu-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-primary);
}

.model-menu-item i {
  font-size: 16px;
  opacity: 0.7;
}

.model-menu-item.active i {
  opacity: 1;
}

/* Delete item in dropdown */
.delete-item {
  color: #ef4444;
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
  padding-top: 10px;
}

.delete-item:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ----------------------------------------- */
/* Shortcuts panel                           */
/* ----------------------------------------- */
.view-shortcuts {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  z-index: 1000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  max-width: 320px;
  width: 100%;
  display: none;
}

.view-shortcuts.visible {
  display: block;
  animation: slideIn 0.2s ease;
}

.shortcuts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: white;
}

.shortcuts-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.close-shortcuts {
  background: transparent;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
}

.close-shortcuts:hover {
  color: white;
}

.shortcuts-grid {
  display: grid;
  gap: 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ddd;
  font-size: 13px;
}

.shortcut-item kbd {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 11px;
  color: var(--color-primary);
  min-width: 60px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ----------------------------------------- */
/* Suggested prompts - MONOCHROME, VISIBLE   */
/* ----------------------------------------- */
/* ===== WELCOME CHIPS V2 ===== */
.suggested-prompts {
  margin-top: 30px;
  gap: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  visibility: visible;
  opacity: 1;
  z-index: 10;
}

.prompt-chip {
  position: relative;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: fit-content;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  gap: 8px;
}

.prompt-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(120deg,
      rgba(120, 80, 255, 0.3),
      rgba(0, 200, 255, 0.2),
      transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.prompt-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.prompt-chip:hover::before {
  opacity: 1;
}

@media (max-width: 768px) {
  .suggested-prompts {
    gap: 10px;
    padding: 0 24px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }

  .prompt-chip {
    font-size: 14px;
    padding: 10px 18px;
    white-space: normal;
    /* allow text wrap on very small screens */
  }

  .welcome-text {
    margin-top: 10px !important;
    min-height: 80px !important;
  }
}


/* ----------------------------------------- */
/* File preview - monochrome                  */
/* ----------------------------------------- */
.file-preview {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  max-width: 70%;
  color: var(--text-primary);
  justify-content: flex-start;
}

.file-preview .bubble {
  background: transparent;
}

/* ----------------------------------------- */
/* Navigation & sidebar - compact            */
/* ----------------------------------------- */
.nav-item,
.history-item,
.profile-area,
.nav-section {
  padding: 8px 10px;
}

.nav-text,
.message .content,
.prompt-chip {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* ----------------------------------------- */
/* Astrology mode - adapted                   */
/* ----------------------------------------- */
.message.assistant {
  backdrop-filter: blur(6px);
}

body.astrology-mode .message.assistant {
  background: linear-gradient(135deg, rgba(90, 60, 160, 0.15), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(140, 100, 255, 0.2);
}

/* ----------------------------------------- */
/* responsive adjustments - COMPACT          */
/* ----------------------------------------- */
@media (max-width: 768px) {
  .input-wrapper {
    width: 100%;
    padding: 4px 8px 4px 12px;
    margin-bottom: env(safe-area-inset-bottom);
  }

  /* Fix for iOS safe areas */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .input-area {
      padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
  }
}

.chat-container {
  padding: 16px 16px 12px;
}

.messages {
  padding: 20px 16px 120px 16px;
  gap: 10px;
}

.message .content {
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.6;
}

.message.user .content {
  max-width: 85%;
}

.message.assistant .content {
  padding-left: 14px;
}

.model-pill span#modelLabel {
  display: none;
}

.model-pill {
  padding: 8px;
}

.scroll-bottom-btn {
  bottom: 90px;
  right: 20px;
}

.toast {
  bottom: 90px;
  font-size: 13px;
  padding: 8px 16px;
}

.suggested-prompts {
  gap: 8px;
  padding: 12px;
}

.prompt-chip {
  font-size: 13px;
  padding: 8px 16px;
}

/* Recommendations after chip click */
.recommendations-container {
  max-width: 600px;
  margin: 20px auto;
  padding: 0 16px;
  animation: fadeIn 0.4s ease;
}

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-item {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.rec-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.rec-item i {
  margin-right: 12px;
  color: #fbbf24;
}

@media (max-width: 480px) {
  .welcome-content h1 {
    font-size: 24px !important;
  }

  .welcome-content p {
    font-size: 14px !important;
  }

  .chat-container {
    padding: 12px 10px 8px;
  }

  .messages {
    gap: 8px;
    padding: 60px 12px 80px 12px;
    /* Increased top padding for floating header */
  }

  .message .content {
    padding: 10px 12px;
    font-size: 14px;
  }

  .message.user .content {
    max-width: 85%;
  }

  .message.assistant .content {
    padding-left: 12px;
  }

  .input-area {
    padding: 12px 16px;
  }

  .input-wrapper {
    padding: 4px 6px 4px 10px;
  }

  .action-group {
    gap: 4px;
  }

  .send-btn {
    width: 36px;
    height: 36px;
  }

  .send-btn i {
    font-size: 14px;
  }

  .scroll-bottom-btn {
    bottom: 80px;
    right: 15px;
    width: 36px;
    height: 36px;
  }

  .toast {
    bottom: 80px;
    font-size: 12px;
    padding: 6px 14px;
  }
}

/* ----------------------------------------- */
/* scrollbar styling                         */
/* ----------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* ----------------------------------------- */
/* animations & utilities                    */
/* ----------------------------------------- */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.message-enter {
  animation: slideIn 0.2s ease forwards;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 25%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Utility classes */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.main {
  z-index: 2;
}

.sidebar {
  z-index: 5;
}

.sidebar-overlay {
  z-index: 4;
}

.welcome-text {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-chat.idle .welcome-text {
  opacity: 1;
  transform: translateY(0);
}

.view-chat:not(.idle) .welcome-text {
  opacity: 0;
  transform: translateY(-10px);
}

.astro-intro {
  text-align: center;
  animation: fadeIn 0.6s ease-in-out;
}

.astro-glow {
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(90deg, #9f7aea, #667eea);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glowPulse 2s infinite alternate;
}

.astro-intro .example {
  opacity: 0.7;
  font-size: 13px;
}

@keyframes glowPulse {
  from {
    filter: drop-shadow(0 0 4px #9f7aea);
  }

  to {
    filter: drop-shadow(0 0 12px #667eea);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.plus-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  /* open upward */
  left: 0;
  min-width: 180px;
  background: rgba(15, 15, 15, 0.98);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 9999;
}

.plus-dropdown.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.generated-image {
  margin-top: 10px;
}

.generated-image img {
  max-width: 100%;
  border-radius: 14px;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.image-btn {
  background: transparent;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
}

.image-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.image-loading {
  margin-top: 10px;
}

.shimmer {
  width: 100%;
  height: 300px;
  border-radius: 16px;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 25%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    background-position: -200% 0;
  }
}

.generated-image {
  position: relative;
  margin-top: 10px;
}

.generated-image img {
  max-width: 100%;
  border-radius: 16px;
}

.image-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

.overlay-btn {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  padding: 6px 8px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 12px;
}

.image-mode-active {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#imageBtn {
  display: none !important;
}

.premium-locked {
  filter: blur(3px);
  pointer-events: none;
  opacity: 0.6;
}

/* Global disabled state */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Retry button */
.retry-btn {
  margin: 12px auto;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
}

.message .content p {
  margin: 0 0 12px 0;
  line-height: 1.6;
}

.message .content strong {
  font-weight: 600;
}

.message .content ul,
.message .content ol {
  margin: 10px 0 10px 20px;
  padding-left: 20px;
}

.message .content li {
  margin-bottom: 6px;
}

.message .content h1,
.message .content h2,
.message .content h3 {
  margin: 16px 0 8px;
}

.message .content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 16px 0;
}

@media (max-width: 768px) {
  .messages {
    scrollbar-width: none;
    /* Firefox */
  }

  .messages::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }
}

.messages::-webkit-scrollbar {
  width: 6px;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.premium-badge {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: black;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.6);
  animation: premiumGlow 2s infinite alternate;
}

@keyframes premiumGlow {
  from {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
  }

  to {
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.8);
  }
}

body.premium-active .logo-img {
  filter: drop-shadow(0 0 10px gold);
}

@media (max-width: 768px) {

  .messages {
    padding: 10px 10px 16px 10px;
  }

  .message .content {
    padding: 10px 12px;
    font-size: 14px;
  }

  .input-wrapper {
    width: 95%;
    border-radius: 14px;
  }

  .input-area {
    padding: 12px;
  }

  .welcome-text {
    font-size: 26px;
    min-height: auto;
  }

}

@media (max-width: 768px) {

  .sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .toggle-sidebar {
    display: block;
  }

}

@media (max-width: 768px) {
  .message-input {
    font-size: 16px;
    /* Prevent iOS zoom */
  }
}

.view-chat,
.view-explore,
.view-settings {
  animation: fadeInView 0.25s ease;
}

@keyframes fadeInView {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.messages::-webkit-scrollbar {
  width: 6px;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ========== GLASS UI SYSTEM ========== */

.glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

/* Mobile scroll fixes for settings */
@media (max-width: 768px) {
  .main {
    overflow-y: auto;
    height: 100dvh;
  }

  .view-settings {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ===== PREMIUM BADGE V2 ===== */

.premium-badge {
  position: relative;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  overflow: hidden;
  z-index: 1;
}

.premium-badge::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  padding: 2px;
  background: linear-gradient(270deg,
      #ff00cc,
      #3333ff,
      #00f0ff,
      #ff00cc);
  background-size: 400% 400%;
  animation: premiumGradient 6s ease infinite;
  z-index: -1;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

@keyframes premiumGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ===== WELCOME HERO V2 ===== */

#welcome-screen {
  width: 100%;
  margin: auto 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

#welcome-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.15);
  margin-top: 0;
}

@keyframes textShimmer {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

#welcome-subtitle {
  margin-top: 12px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

/* Founder badge */
.founder-badge {
  margin-left: 12px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 500;
  letter-spacing: 0.3px;
}

#authModal .toast {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}

/* MOBILE SCROLL FIX */
@media (max-width: 768px) {

  .messages {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }

  .chat-container {
    min-height: 0;
  }

}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 6px 0;
}

.model-option.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.web-search-placeholder {
  color: #aaa;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.web-search-placeholder i {
  font-size: 16px;
}

.dot-animation::after {
  content: '';
  animation: dotFade 1.5s infinite;
}

@keyframes dotFade {
  0% {
    content: '';
  }

  25% {
    content: '.';
  }

  50% {
    content: '..';
  }

  75% {
    content: '...';
  }

  100% {
    content: '';
  }
}

/* Mobile input adjustments */
@media (max-width: 768px) {
  .input-wrapper {
    width: 98%;
    padding: 4px 8px 4px 12px;
    margin-bottom: env(safe-area-inset-bottom);
  }

  .send-btn,
  .voice-input-btn {
    width: 36px;
    height: 36px;
  }

  .send-btn i,
  .voice-input-btn i {
    font-size: 14px;
  }

  /* Hide mic when typing */
  .input-wrapper.typing-active .voice-input-btn {
    display: none;
  }

  /* Ensure plus dropdown is above keyboard */
  .plus-dropdown {
    bottom: calc(100% + 8px);
    left: 0;
  }
}

/* Web search placeholder animation */
.web-search-placeholder {
  color: #aaa;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.web-search-placeholder i {
  font-size: 16px;
}

.dot-animation::after {
  content: '';
  animation: dotFade 1.5s infinite;
}

@keyframes dotFade {
  0% {
    content: '';
  }

  25% {
    content: '.';
  }

  50% {
    content: '..';
  }

  75% {
    content: '...';
  }

  100% {
    content: '';
  }
}

/* Reasoning block */
.reasoning-block {
  margin: 12px 0;
  border-left: 3px solid #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.reasoning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  color: #ccc;
  font-size: 14px;
  transition: background 0.2s;
}

.reasoning-header:hover {
  background: rgba(139, 92, 246, 0.1);
}

.reasoning-icon {
  font-size: 16px;
}

.reasoning-title {
  flex: 1;
  font-weight: 500;
}

.reasoning-chevron {
  font-size: 12px;
  transition: transform 0.2s;
}

.reasoning-block.expanded .reasoning-chevron {
  transform: rotate(180deg);
}

.reasoning-content {
  display: none;
  padding: 0 16px 16px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #aaa;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
}

.reasoning-block.expanded .reasoning-content {
  display: block;
}

.final-answer {
  margin-top: 16px;
}

.error-message {
  color: #f88;
  padding: 12px;
  border: 1px solid #f88;
  border-radius: 8px;
  margin: 8px 0;
}

/* Reasoning block */
.reasoning-block {
  margin: 16px 0 8px;
  border-left: 3px solid #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.reasoning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  color: #ccc;
  font-size: 14px;
  transition: background 0.2s;
}

.reasoning-header:hover {
  background: rgba(139, 92, 246, 0.1);
}

.reasoning-header:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

.reasoning-icon {
  font-size: 16px;
}

.reasoning-title {
  flex: 1;
  font-weight: 500;
}

.reasoning-chevron {
  font-size: 12px;
  transition: transform 0.2s;
}

.reasoning-block.expanded .reasoning-chevron {
  transform: rotate(180deg);
}

.reasoning-content-container {
  transition: height 0.2s ease;
}

.reasoning-content {
  padding: 0 16px 16px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #aaa;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
}

.final-answer {
  margin-top: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.message {
  opacity: 0;
  transform: translateY(10px);
  animation: msgIn 0.25s ease forwards;
}

@keyframes msgIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stream-container {
  white-space: pre-wrap;
  word-break: break-word;
}

.message.assistant {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.message.assistant .bubble {
  width: 100%;
}

.message-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-self: flex-end;
  /* or flex-start depending on design */
}

/* Make messages wider on mobile (like ChatGPT) */
@media (max-width: 768px) {
  .message .content {
    max-width: 95% !important;
    padding: 12px 16px !important;
    font-size: 15px;
  }

  .message.user .content {
    max-width: 90% !important;
  }

  .message.assistant .content {
    max-width: 100% !important;
  }

  .messages {
    padding-left: 8px;
    padding-right: 8px;
  }
}

.message.assistant {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.message.assistant .bubble {
  width: 100%;
}

.message-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  align-self: flex-end;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.message.assistant:hover .message-actions,
.message.user:hover .message-actions {
  opacity: 1;
}

.action-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.reasoning-block {
  margin: 16px 0 8px;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  overflow: hidden;
  transition: background 0.2s ease;
}

.reasoning-block:hover {
  background: rgba(255, 255, 255, 0.03);
}

.reasoning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.reasoning-header:hover {
  color: #e4e4e7;
}

@media (max-width: 768px) {
  .reasoning-block {
    margin: 12px 0 6px;
  }

  .reasoning-header {
    padding: 8px 12px;
    font-size: 13px;
  }

  .reasoning-content {
    padding: 0 12px 12px 12px;
    font-size: 13px;
  }
}

.reasoning-icon {
  font-size: 14px;
  color: #71717a;
}

.reasoning-title {
  flex: 1;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.reasoning-chevron {
  font-size: 12px;
  transition: transform 0.2s;
}

.reasoning-block.expanded .reasoning-chevron {
  transform: rotate(180deg);
}

.reasoning-content-container {
  transition: height 0.2s ease;
}

.reasoning-content {
  padding: 0 16px 16px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #aaa;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
}

.final-answer {
  margin-top: 8px;
}

.message-actions {
  opacity: 0 !important;
}

.message.assistant:hover .message-actions,
.message.user:hover .message-actions {
  opacity: 1 !important;
}

.generated-image {
  max-width: 512px;
  border-radius: 12px;
  margin-top: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ===== LIVE STREAMING THINK INDICATOR ===== */
.streaming-think-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #888;
  font-size: 13px;
  font-style: italic;
  padding: 4px 0;
  min-height: 24px;
}

.streaming-think-indicator .think-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  flex-shrink: 0;
  animation: pulseDot 1.2s ease-in-out infinite;
}

.streaming-think-indicator .think-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 24px);
  opacity: 0.7;
}

.streaming-think-indicator.done .think-pulse-dot {
  background: #10b981;
  animation: none;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}

/* ===== IMPROVED REASONING BLOCK ===== */
/* Remove all duplicates - single consolidated ruleset */
.reasoning-block {
  margin: 14px 0 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  overflow: hidden;
  transition: background 0.2s ease;
}

.reasoning-block:hover {
  background: rgba(255, 255, 255, 0.035);
}

.reasoning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  color: #888;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.reasoning-header:hover {
  color: #ccc;
}

.reasoning-icon {
  font-size: 14px;
}

.reasoning-title {
  flex: 1;
  letter-spacing: 0.02em;
}

.reasoning-chevron {
  font-size: 11px;
  transition: transform 0.25s ease;
  opacity: 0.5;
}

.reasoning-block.expanded .reasoning-chevron {
  transform: rotate(180deg);
}

.reasoning-content {
  display: none;
  padding: 12px 16px 16px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: #999;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  max-height: 400px;
  overflow-y: auto;
}

.reasoning-block.expanded .reasoning-content {
  display: block;
}

.final-answer {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .reasoning-block {
    margin: 10px 0 4px;
  }

  .reasoning-header {
    padding: 8px 12px;
    font-size: 13px;
  }

  .reasoning-content {
    padding: 10px 12px 12px 12px;
    font-size: 13px;
    max-height: 300px;
  }

  .streaming-think-indicator {
    font-size: 12px;
  }
}

/* ========================================= */
/* ChatGPT UI Override (Chat) */
/* ========================================= */
.messages {
  max-width: 800px;
  /* ChatGPT width */
  padding-left: 1rem;
  padding-right: 1rem;
}

.message {
  padding: 1rem 0;
  border-bottom: none !important;
}

.message .content {
  background: transparent !important;
  color: var(--text-primary) !important;
  font-size: 16px;
  line-height: 1.6;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Transparency ensured - no backgrounds */
.message.user .content {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  max-width: 85%;
}

/* Input Area */
.input-area {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  background: transparent !important;
  border-top: none !important;
  box-shadow: none !important;
}

.input-wrapper {
  background: linear-gradient(180deg, #222 0%, #000 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 100px !important;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6) !important;
  padding: 8px 18px !important;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 255, 255, 0.05) !important;
  transform: translateY(-2px);
}

.message-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff !important;
  font-size: 16px !important;
  padding: 12px 0;
  resize: none;
  max-height: 180px;
  overflow-y: auto;
}

.message-input::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
}

.send-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white !important;
  border-radius: 12px !important;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.send-btn:not(:disabled):hover {
  background: white !important;
  color: black !important;
  transform: translateY(-1px);
}

/* Code Blocks */
.code-block-wrapper {
  background: #0d0d0d !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  margin: 1.5rem 0 !important;
}

.code-toolbar {
  background: #2a2b32 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px 8px 0 0 !important;
  padding: 6px 12px !important;
  opacity: 1 !important;
  /* Always visible like ChatGPT */
  position: relative !important;
  top: 0 !important;
  right: 0 !important;
  justify-content: space-between;
}

/* ----------------------------------------- */
/* File preview bubbles (per-message/global) */
/* ----------------------------------------- */
.file-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.file-preview-bubble {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px 12px;
  gap: 10px;
  max-width: fit-content;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.file-thumb {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  background: #222;
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-icon {
  font-size: 16px;
  color: var(--color-primary);
}

.file-name {
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.remove-file {
  cursor: pointer;
  color: #ff4b4b;
  font-size: 14px;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.remove-file:hover {
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------- */
/* Website Builder Styles                    */
/* ----------------------------------------- */
.website-builder-card {
  padding: 24px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.website-builder-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
}

.website-builder-card .card-content {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.website-builder-card i {
  color: var(--text-primary);
  opacity: 0.8;
}

.website-builder-card .text-group {
  flex: 1;
}

.website-builder-card h4 {
  font-size: 18px;
  margin: 0 0 4px 0;
  color: white;
}

.website-builder-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.action-btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(16, 163, 127, 0.3);
}

/* Website Grid */
.website-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.website-item {
  background: rgba(15, 15, 15, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.website-item:hover {
  background: rgba(25, 25, 25, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

.website-item .site-info h5 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.website-item .site-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.website-item .rating {
  color: #fbbf24;
  font-weight: 600;
}

.website-item .site-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-card.full-modal {
  max-width: 1200px;
  width: 95vw;
  height: 90vh;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.close-modal {
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: white;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-body.no-padding {
  padding: 0;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.preview-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-btn-icon {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.action-btn-icon:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.color-input {
  width: 100%;
  height: 44px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
}

/* Dashboard Styles */
.view-dashboard {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.view-explore {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.view-settings {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* -------- scrollbar for views -------- */
.view-dashboard::-webkit-scrollbar,
.view-explore::-webkit-scrollbar,
.view-settings::-webkit-scrollbar {
  width: 6px;
}

.view-dashboard::-webkit-scrollbar-thumb,
.view-explore::-webkit-scrollbar-thumb,
.view-settings::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.view-dashboard .view-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.view-dashboard .view-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card:hover {
  transform: translateY(-4px);
}

/* Colorful icon backgrounds per stat */
.stat-card:nth-child(1) .stat-icon {
  color: #6366f1;
}

.stat-card:nth-child(2) .stat-icon {
  color: #8b5cf6;
}

.stat-card:nth-child(3) .stat-icon {
  color: #ec4899;
}

.stat-card:nth-child(4) .stat-icon {
  color: #f59e0b;
}

.stat-icon {
  font-size: 28px;
  opacity: 0.9;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.section-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.dashboard-section {
  margin: 32px 0;
}

.dashboard-section>h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.recent-activity-section {
  margin-top: 8px;
}

.activity-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.activity-item.empty {
  justify-content: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 30px;
  pointer-events: none;
  font-size: 14px;
}

.activity-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.activity-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
}

.premium-card {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  border: 1px solid rgba(255, 200, 0, 0.15);
  background: rgba(255, 180, 0, 0.05);
}

.premium-info p {
  margin: 0 0 12px 0;
  font-size: 16px;
}

/* -------- Explore Styles -------- */
.view-explore .view-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.view-explore .view-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.explore-section {
  margin-bottom: 40px;
}

.explore-section .section-header {
  margin-bottom: 16px;
}

.explore-section .section-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: white;
}

.explore-section .section-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.explore-grid,
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.explore-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #d4d4d8;
  line-height: 1.5;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.explore-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.explore-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.07);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.explore-card:hover::before {
  opacity: 1;
}

.explore-card .card-title {
  font-weight: 600;
  font-size: 15px;
  color: white;
  margin-bottom: 6px;
}

.explore-card .card-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.blur-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.lock-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  letter-spacing: 0.05em;
}

/* Comparison table */
.comparison-table {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table thead th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.comparison-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-card.full-modal {
  max-width: 1200px;
  width: 95vw;
  height: 90vh;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.close-modal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.close-modal:hover {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-body.no-padding {
  padding: 0;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.preview-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #888;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn-icon:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.color-input {
  width: 100%;
  height: 44px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
}

.modal-header .close-modal {
  z-index: 10;
  position: relative;
  cursor: pointer;
}

/* Responsive - mobile dashboard */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    font-size: 22px;
  }

  .stat-value {
    font-size: 18px;
  }

  .explore-grid,
  .prompt-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .view-dashboard .view-content,
  .view-explore .view-content {
    padding: 20px 16px 80px;
  }

  .activity-title {
    max-width: 180px;
  }
}

@media (max-width: 480px) {

  .explore-grid,
  .prompt-grid {
    grid-template-columns: 1fr;
  }
}

/* === GLOBAL OVERRIDES FOR MONOCHROME === */
.action-group .send-btn,
#sendBtn,
.action-group .voice-input-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
  border: none !important;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.action-group .send-btn:hover,
#sendBtn:hover,
.action-group .voice-input-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px);
}

.send-btn.disabled,
.send-btn:disabled {
  background: rgba(51, 51, 51, 0.6) !important;
  color: #888 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  border: none !important;
}

.view-chat.idle .messages {
  justify-content: center !important;
  flex: 1 !important;
  display: flex;
  flex-direction: column !important;
  padding: 40px 0 !important;
  height: 100% !important;
}


/* === SMOOTH STREAMING UTILS === */
.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--text-primary);
  margin-left: 4px;
  vertical-align: middle;
  animation: cursorBlink 0.8s infinite;
  border-radius: 1px;
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.stream-container {
  white-space: pre-wrap;
  display: inline;
}

.message.generating {
  opacity: 0.9;
  border-left-color: var(--accent) !important;
}


@media (max-width: 768px) {
  #welcome-screen {
    min-height: max-content;
    margin-top: auto !important;
    margin-bottom: auto !important;
  }
}

.input-wrapper {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 10px 14px;
  backdrop-filter: blur(14px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
}

.input-wrapper {
  background: linear-gradient(145deg, #0a0a0a, #141414);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 8px 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* --- Travel Mode: Hotel Cards (Premium ChatGPT Style) --- */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 15px;
  width: 100%;
}

.hotel-card {
  position: relative;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.hotel-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color, #00ffcc);
}

.hotel-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #222;
}

.hotel-info {
  padding: 14px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.hotel-info h3 {
  font-size: 15px;
  margin: 0 0 5px 0;
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
}

.hotel-info p {
  color: #aaa;
  font-size: 13px;
  margin: 0 0 12px 0;
}

.hotel-info button {
  margin-top: auto;
  width: 100%;
  background: linear-gradient(90deg, #00ffcc, #00e6b8);
  color: #000;
  border: none;
  padding: 11px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.hotel-info button:hover {
  opacity: 0.9;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: gold;
  color: black;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: bold;
  z-index: 2;
}

.sponsored-tag {
  background: rgba(255, 165, 0, 0.2);
  color: #ffa500;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 8px;
}

/* travel.css ────────────────────────────────────────────── */
/* Premium Discovery UI for Hotels & Activities             */

.travel-sections-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  margin: 12px 0;
  animation: slideUpFade 0.4s ease forwards;
}

.travel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label i {
  color: #ffb800; /* Gold for Elite Choice */
}

/* ── Hotel Grid ────────────────────────────────────────── */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
}

.hotel-grid.solo {
  grid-template-columns: 1fr;
}

/* ── Hotel Card ────────────────────────────────────────── */
.hotel-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.hotel-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.hotel-card.elite-glass-style {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hotel-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hotel-card:hover img {
  transform: scale(1.05);
}

.partner-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hotel-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

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

.hotel-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.rating-badge {
  background: rgba(255, 184, 0, 0.1);
  color: #ffb800;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hotel-loc {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.amenity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.amenity-chips .chip {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hotel-curation {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.curation-item {
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.curation-item i {
  color: #00ff88;
  font-size: 11px;
}

.hotel-action-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
}

.price-wrap {
  display: flex;
  flex-direction: column;
}

.price-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.price-unit {
  font-size: 11px;
  color: var(--text-muted);
}

.elite-select-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.elite-select-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* ── Activity Grid ─────────────────────────────────────── */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

/* ── Animations ────────────────────────────────────────── */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .hotel-grid {
    grid-template-columns: 1fr;
  }
  
  .hotel-title {
    font-size: 16px;
  }
  
  .price-val {
    font-size: 18px;
  }
}

