:root {
  --blue-deep: #003087;
  --blue-mid: #0051c8;
  --blue-light: #e8f0ff;
  --green: #00875a;
  --amber: #e06b00;
  --gold: #c9a227;
  --white: #ffffff;
  --off: #f7f9fc;
  --grey: #8896a7;
  --dark: #111827;
  --border: #d1dcf0;
}

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

body {
  font-family: "DM Sans", sans-serif;
  background: linear-gradient(135deg, #001a5e 0%, #003087 40%, #0051c8 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 80, 200, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: rgba(0, 135, 90, 0.15);
  top: -100px;
  right: -100px;
}

.orb-2 {
  width: 200px;
  height: 200px;
  background: rgba(201, 162, 39, 0.1);
  bottom: -50px;
  left: -50px;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.header {
  background: linear-gradient(135deg, #001a5e, #003087);
  padding: 24px 24px 18px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.logo-box {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.header-title {
  color: var(--white);
}

.header-title h1 {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.header-title h1 span {
  color: #7bb3ff;
}

.header-title p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
  font-weight: 500;
}

.lang-badges,
.disclaimer-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lang-badges {
  margin-bottom: 8px;
}

.lang-badge,
.disc-badge {
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.lang-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
}

.disc-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 9.5px;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.disclaimer-badges {
  padding-bottom: 2px;
}

.plan-section,
.quick-section {
  background: var(--off);
  border-bottom: 1px solid var(--border);
}

.plan-section {
  padding: 32px 20px 16px;
}

.quick-section {
  padding: 16px 20px;
}

.plan-label,
.quick-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.plan-label {
  margin-bottom: 8px;
}

.quick-label {
  margin-bottom: 10px;
}

.plan-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.plan-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--grey);
  cursor: pointer;
  transition: all 0.2s;
}

.plan-pill:hover,
.plan-pill:focus-visible {
  border-color: var(--blue-mid);
  color: var(--blue-mid);
  outline: none;
}

.plan-pill.active {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  color: var(--white);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.quick-btn:hover,
.quick-btn:focus-visible {
  border-color: var(--blue-mid);
  background: var(--blue-light);
  transform: translateY(-1px);
  outline: none;
}

.quick-btn .icon {
  font-size: 20px;
}

.quick-btn .label {
  font-size: 10px;
  font-weight: 600;
  color: var(--dark);
}

.quick-btn .sub {
  font-size: 9px;
  color: var(--grey);
}

.chat-area {
  height: 280px;
  overflow-y: auto;
  padding: 16px 20px;
  background: var(--off);
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-area::-webkit-scrollbar {
  width: 4px;
}

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

.chat-area::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: msgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.msg.user {
  align-items: flex-end;
}

.msg.bot {
  align-items: flex-start;
}

.msg-sender {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--grey);
  padding: 0 4px;
}

.bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
}

.msg.user .bubble {
  background: var(--blue-deep);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.msg.bot .bubble {
  background: var(--white);
  color: var(--dark);
  border: 1.5px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.result-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  max-width: 92%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  animation: msgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
}

.result-header.covered {
  background: var(--green);
}

.result-header.partial {
  background: var(--amber);
}

.result-header.requires-auth {
  background: var(--blue-mid);
}

.result-rows {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.result-row-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}

.icon-green {
  background: #e8f5f0;
  color: var(--green);
}

.icon-amber {
  background: #fff3e0;
  color: var(--amber);
}

.icon-blue {
  background: var(--blue-light);
  color: var(--blue-mid);
}

.result-row-text {
  flex: 1;
}

.result-row-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.result-row-body {
  font-size: 12.5px;
  color: var(--dark);
  margin-top: 1px;
  line-height: 1.4;
}

.result-footer {
  padding: 8px 14px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.result-footer-text {
  font-size: 10.5px;
  color: var(--grey);
  line-height: 1.4;
  flex: 1;
}

.wa-btn {
  background: #25d366;
  color: var(--white);
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.wa-btn:hover,
.wa-btn:focus-visible {
  background: #128c4e;
  transform: scale(1.03);
  outline: none;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

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

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

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.input-area {
  padding: 14px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-wrap {
  flex: 1;
  background: var(--off);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  transition: border-color 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--blue-mid);
}

#userInput {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 0;
  font-family: "DM Sans", sans-serif;
  font-size: 13.5px;
  color: var(--dark);
  outline: none;
}

#userInput::placeholder {
  color: var(--grey);
}

.send-btn {
  width: 44px;
  height: 44px;
  background: var(--blue-deep);
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.send-btn:hover,
.send-btn:focus-visible {
  background: var(--blue-mid);
  transform: scale(1.05);
  outline: none;
}

.send-btn:active {
  transform: scale(0.95);
}

.powered-by {
  padding: 10px;
  text-align: center;
  font-size: 10px;
  color: var(--grey);
  background: var(--white);
  border-top: 1px solid var(--border);
  letter-spacing: 0.3px;
}

.powered-by strong {
  color: var(--blue-deep);
}

.demo-banner {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--gold);
  color: #1a1200;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 5px 12px;
  border-radius: 20px;
  z-index: 100;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 560px) {
  body {
    padding: 12px;
    align-items: stretch;
  }

  .card {
    max-width: none;
    border-radius: 20px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chat-area {
    height: 320px;
  }

  .result-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .wa-btn {
    justify-content: center;
  }
}
