:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-glass: rgba(17, 24, 39, 0.65);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary-accent: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  --deal-gradient: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
  --bubble-user: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --bubble-bot: rgba(30, 41, 59, 0.85);
  --bubble-border: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.3);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.8);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bubble-user: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --bubble-bot: #ffffff;
  --bubble-border: rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --deal-gradient: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(236, 72, 153, 0.1) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Header & Nav */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 2.5rem;
  backdrop-filter: blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-badge {
  font-size: 0.7rem;
  color: #818cf8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  border-color: var(--primary-accent);
  transform: translateY(-2px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* Main Container Layout */
.main-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .main-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* Left Hero Content */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Deal Banner */
.deal-banner {
  background: var(--deal-gradient);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(10px);
}

.deal-banner-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.deal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ec4899;
  letter-spacing: 0.05em;
}

.deal-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.deal-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.deal-copy-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.deal-copy-btn:hover {
  border-color: var(--primary-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.deal-copy-btn code {
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: #38bdf8;
}

/* Feature grid cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feature-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Trust Bar */
.trust-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-stars {
  color: #f59e0b;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.trust-divider {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
}

/* Chat Widget Container */
.chat-container {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  height: 700px;
  max-height: 85vh;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

/* Chat Header */
.chat-header {
  padding: 1.25rem 1.5rem;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.bot-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.bot-avatar-online {
  width: 12px;
  height: 12px;
  background-color: #22c55e;
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  right: 0;
}

.chat-header-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.verified-badge {
  color: #38bdf8;
  font-size: 0.9rem;
}

.chat-header-text p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.chat-header-tools {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

/* Chat Messages Area */
.chat-messages {
  flex: 1;
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Message Items */
.message-row {
  display: flex;
  gap: 0.75rem;
  max-width: 88%;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.message-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-row.bot {
  align-self: flex-start;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.msg-avatar.bot {
  background: var(--primary-gradient);
  color: #fff;
}

.msg-avatar.user {
  background: #3b82f6;
  color: #fff;
}

.message-bubble-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.message-bubble {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.55;
  position: relative;
  word-break: break-word;
}

.message-row.user .message-bubble {
  background: var(--bubble-user);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.message-row.bot .message-bubble {
  background: var(--bubble-bot);
  color: var(--text-primary);
  border: 1px solid var(--bubble-border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.message-bubble p {
  margin-bottom: 0.5rem;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble ul, .message-bubble ol {
  padding-left: 1.25rem;
  margin: 0.4rem 0;
}

.message-bubble li {
  margin-bottom: 0.25rem;
}

.message-bubble strong {
  font-weight: 600;
  color: inherit;
}

.message-bubble code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
  color: #38bdf8;
}

.message-bubble a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

.message-row.user .message-meta {
  justify-content: flex-end;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: var(--transition-smooth);
}

.copy-btn:hover {
  color: var(--text-primary);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  background: var(--bubble-bot);
  border: 1px solid var(--bubble-border);
  border-radius: var(--radius-md);
  width: fit-content;
  align-self: flex-start;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* Quick Prompt Suggestions */
.quick-prompts-wrapper {
  padding: 0.4rem 1.25rem 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.quick-prompts-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-prompts-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 0.25rem;
}

.quick-prompts-container::-webkit-scrollbar {
  height: 3px;
}
.quick-prompts-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

.prompt-chip {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.prompt-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary-accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Chat Input Bar */
.chat-input-wrapper {
  padding: 1rem 1.25rem;
  background: var(--bg-glass);
  border-top: 1px solid var(--border-subtle);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.5rem 0.35rem 1.25rem;
  transition: var(--transition-smooth);
}

.chat-form:focus-within {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-primary);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.45);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}
