/* Google Fonts: Plus Jakarta Sans & Be Vietnam Pro */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Be+Vietnam+Pro:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

/* Design Tokens (Sugar & Steam Theme) */
:root {
  --primary: #e91e8c;           /* Strawberry Pink */
  --primary-hover: #b30069;
  --secondary: #880e4f;         /* Deep Berry */
  --secondary-light: #a82d68;
  --background: #fff7f9;        /* Clotted Cream */
  --surface: #ffffff;
  --surface-dim: #e1d8db;
  --surface-container-low: #fbf1f5;
  --surface-container: #f5ebef;
  --surface-container-high: #efe6ea;
  --text-primary: #1b1b1c;      /* Charcoal Ink */
  --text-secondary: #594048;
  --mint-glaze: #b3ecf3;
  --mint-glaze-dark: #2a646a;
  --lemon-curd: #fff9c4;
  --border-light: #e1bdc8;
  --shadow-sm: 0 4px 12px rgba(136, 14, 79, 0.04);
  --shadow-md: 0 10px 30px rgba(233, 30, 140, 0.08);
  --shadow-lg: 0 20px 40px rgba(233, 30, 140, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: relative;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(233, 30, 140, 0.08);
  flex-shrink: 0;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-circle {
  width: 38px;
  height: 38px;
  background-color: rgba(233, 30, 140, 0.1);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-circle span {
  color: var(--primary);
  font-weight: 800;
  font-size: 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.logo-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-title span {
  color: var(--primary);
  font-weight: 300;
}

nav {
  display: flex;
  gap: 32px;
  font-weight: 500;
}

nav a {
  color: var(--text-secondary);
  font-size: 15px;
  position: relative;
  padding: 4px 0;
}

nav a:hover, nav a.active {
  color: var(--primary);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid rgba(233, 30, 140, 0.1);
}

.btn-icon:hover {
  color: var(--primary);
  background-color: rgba(233, 30, 140, 0.05);
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary-light));
  color: var(--surface);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(233, 30, 140, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 140, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Main Layout Grid */
main {
  flex: 1;
  padding-top: 24px;
  padding-bottom: 24px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  min-height: 0;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  width: 100%;
  height: 100%;
  align-items: stretch;
  min-height: 0;
}

/* LEFT COLUMN: Chat Interface */
.chat-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-box {
  background-color: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(233, 30, 140, 0.06);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--surface-container-low);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--surface);
  flex-shrink: 0;
}

/* Chat Options Dropdown Menu */
.options-wrapper {
  position: relative;
  display: inline-block;
}

.options-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background-color: var(--surface);
  border: 1px solid rgba(233, 30, 140, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 50;
  min-width: 180px;
  animation: fadeInDropdown 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.options-dropdown.show {
  display: block;
}

.dropdown-item {
  width: 100%;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-align: left;
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: rgba(233, 30, 140, 0.05);
  color: var(--primary);
}

.dropdown-item svg {
  color: inherit;
  flex-shrink: 0;
}

.chat-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 2px solid var(--surface-container-low);
  object-fit: cover;
}

.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border: 2px solid var(--surface);
  border-radius: var(--radius-full);
}

.chat-title {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 700;
}

.chat-subtitle {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

/* Chat History / Messages */
.chat-history {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-height: 0;
  background-image: radial-gradient(rgba(233, 30, 140, 0.03) 1px, transparent 1px);
  background-size: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 85%;
  animation: messageAppear 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.bot {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  max-width: 80%;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--surface-container-low);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.msg-content {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  line-height: 1.5;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  word-break: break-word;
}

.chat-message.bot .msg-content {
  background-color: var(--surface);
  color: var(--text-primary);
  border: 1px solid rgba(233, 30, 140, 0.08);
  border-top-left-radius: 0;
}

.chat-message.user .msg-content {
  background: linear-gradient(135deg, var(--primary), var(--secondary-light));
  color: var(--surface);
  border-top-right-radius: 0;
  box-shadow: 0 4px 15px rgba(233, 30, 140, 0.1);
}

/* Typing Indicator Animation */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 6px 2px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  opacity: 0.4;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Suggestions & Input area */
.chat-footer {
  padding: 0 20px 20px 20px;
  flex-shrink: 0;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  padding: 6px 12px;
  background-color: var(--surface-container-low);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid rgba(233, 30, 140, 0.08);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.chip:hover {
  background-color: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 30, 140, 0.15);
}

.input-wrapper {
  position: relative;
  display: flex;
}

.chat-input {
  width: 100%;
  border: 2px solid var(--surface-container);
  background-color: var(--surface-container-low);
  border-radius: var(--radius-md);
  padding: 12px 52px 12px 16px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  color: var(--text-primary);
}

.chat-input:focus {
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.btn-send {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-color: var(--primary);
  color: var(--surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-send:hover {
  background-color: var(--primary-hover);
  transform: translateY(-50%) scale(1.05);
}

.btn-send svg {
  /* SVG icon nằm ngang hướng sang phải mặc định */
}

/* RIGHT COLUMN: Visual & Trust Section */
.visuals-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.hero-card {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-card:hover .hero-img {
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(136, 14, 79, 0.85) 0%, rgba(136, 14, 79, 0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  color: var(--surface);
}

.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.2;
}

.hero-desc {
  font-size: 14px;
  opacity: 0.9;
  max-width: 440px;
  line-height: 1.5;
}

/* Floating Info Chip */
.floating-chip {
  position: absolute;
  top: 24px;
  right: 24px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--surface);
  animation: floatAnim 4s ease-in-out infinite;
}

@keyframes floatAnim {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.floating-icon {
  width: 38px;
  height: 38px;
  background-color: var(--surface-container-low);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.floating-text-primary {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.floating-text-secondary {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  flex-shrink: 0;
}

.stat-card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(233, 30, 140, 0.05);
  padding: 16px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
}

.stat-icon-wrapper.pink {
  background-color: rgba(233, 30, 140, 0.05);
  color: var(--primary);
}

.stat-icon-wrapper.yellow {
  background-color: #fefce8;
  color: #ca8a04;
}

.stat-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.stat-subtitle {
  font-size: 12px;
  font-weight: 500;
}

.stat-subtitle.pink {
  color: var(--primary);
}

.stat-subtitle.yellow {
  color: #ca8a04;
}

/* Thin Footer Section */
.thin-footer {
  background-color: var(--surface);
  border-top: 1px solid rgba(233, 30, 140, 0.08);
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.footer-content-thin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-content-thin p {
  margin: 0;
  white-space: nowrap;
}

.footer-links-thin {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links-thin span {
  white-space: nowrap;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: rgba(233, 30, 140, 0.15);
  border-radius: var(--radius-full);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary);
}

/* RESPONSIVENESS */
@media (max-width: 1024px) {
  .visuals-container {
    display: none;
  }
  
  .grid-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .footer-content-thin {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .footer-links-thin {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  header .container {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  
  nav {
    display: none;
  }
  
  .hero-title {
    font-size: 26px;
  }
}
