/* ========== Smart FAQ Center — Next-Gen Vibrant UI (Theme System) ========== */
:root {
  /* --- Light Mode (Frost) --- */
  --bg: #f0f9ff;
  /* Sky 50 - Pale Blue */
  --surface: rgba(255, 255, 255, 0.7);
  /* Tinted Glass */
  --surface-highlight: #ffffff;
  --text: #0f172a;
  /* Slate 900 */
  --text-secondary: #475569;
  /* Slate 600 */
  --border: #cbd5e1;
  /* Slate 300 */

  /* Brand Colors */
  --brand-primary: #3b82f6;
  --brand-secondary: #10b981;
  --brand-accent: #f59e0b;
  --brand-purple: #8b5cf6;

  --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --brand-gradient-green: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  --brand-gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);

  --shadow-sm: 0 2px 4px rgba(148, 163, 184, 0.2);
  --shadow-md: 0 8px 20px rgba(148, 163, 184, 0.25);
  --shadow-lg: 0 20px 50px rgba(148, 163, 184, 0.3);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Dark Mode (Twilight) --- */
[data-theme="dark"] {
  --bg: #1e1b4b;
  /* Indigo 950 - Deep Blue */
  --surface: rgba(30, 27, 75, 0.6);
  /* Dark Glass */
  --surface-highlight: #312e81;
  /* Indigo 900 */
  --text: #e0e7ff;
  /* Indigo 50 */
  --text-secondary: #a5b4fc;
  /* Indigo 200 */
  --border: #4338ca;
  /* Indigo 700 */

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  /* Dynamic Background Gradient */
  background-image:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.15), transparent 60%),
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.15), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(16, 185, 129, 0.1), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Particle Canvas */
#bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Global Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

button,
input,
textarea {
  font-family: inherit;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  flex: 1;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Header - Restored Premium Style */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s, border-color 0.3s;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-gradient);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  flex-shrink: 0;
}

.title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.subtle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

.foot-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--surface-highlight);
  transform: rotate(15deg);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

/* Buttons - Restored Ghost Style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.96);
}

.btn.primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  border: none;
}

.btn.primary:hover {
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.btn.primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
}

.btn.primary:hover::after {
  left: 150%;
  transition: 0.5s ease-in-out;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  /* Subtle fill */
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn.ghost:hover {
  background: var(--surface-highlight);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.btn.ghost.is-active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.1);
}

/* Inputs */
input[type="search"],
input[type="text"],
textarea {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
}

input:focus,
textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
  background: var(--surface-highlight);
}

/* Landing Page */
.landing {
  padding: 40px 24px;
  text-align: center;
}

.landing h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(to right, var(--text), var(--brand-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
  width: 100%;
  perspective: 1000px;
}

.choice {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.4s, box-shadow 0.4s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform-style: preserve-3d;
  box-shadow: var(--shadow-sm);
}

.choice:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-primary);
  background: var(--surface-highlight);
}

.choice .ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transform: translateZ(20px);
}

.choice:nth-child(1) .ico {
  background: var(--brand-gradient);
}

.choice:nth-child(2) .ico {
  background: var(--brand-gradient-green);
}

.choice:nth-child(3) .ico {
  background: var(--brand-gradient-purple);
}

.choice h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text);
  transform: translateZ(10px);
}

.choice p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transform: translateZ(5px);
}

/* FAQ Accordion */
.group {
  margin-bottom: 32px;
  animation: fadeIn 0.5s ease backwards;
}

.cat-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-left: 5px solid hsl(var(--cat-h, 220), 70%, 50%);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.cat-head:hover {
  border-color: var(--brand-primary);
  background: var(--surface-highlight);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.cat-title {
  font-weight: 800;
  font-size: 1.2rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  background: rgba(128, 128, 128, 0.15);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-left: auto;
}

.group .cat-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s, opacity 0.3s;
  opacity: 0;
}

.group.open .cat-body {
  max-height: 5000px;
  opacity: 1;
  transition: max-height 0.6s;
}

.q {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  transition: background 0.2s;
  background: rgba(128, 128, 128, 0.05);
  border-bottom: 1px solid rgba(128, 128, 128, 0.05);
}

.q:hover {
  background: var(--surface-highlight);
  color: var(--brand-primary);
}

.a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s, padding 0.3s;
  background: rgba(128, 128, 128, 0.02);
}

.a.open {
  max-height: 1000px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border);
}

.a p {
  padding: 24px 24px 0;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Pills */
.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.pill {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.pill.active {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transform: scale(1.05);
}

/* AI Chat */
.chat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 300px;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
}

.bubble {
  max-width: 85%;
  padding: 18px 22px;
  border-radius: 24px;
  margin-bottom: 20px;
  line-height: 1.7;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* AI Character */
.ai-floater {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  z-index: 50;
  pointer-events: none;
}

.ai-card {
  pointer-events: auto;
  background: var(--surface-highlight);
  border: 2px solid var(--border);
  border-radius: 30px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  animation: float 6s infinite;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-card img {
  width: 320px;
  height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.ai-balloon {
  pointer-events: auto;
  background: var(--surface-highlight);
  border: 3px solid var(--brand-primary);
  color: var(--text);
  padding: 20px 26px;
  border-radius: 24px;
  border-bottom-right-radius: 4px;
  max-width: 380px;
  box-shadow: var(--shadow-md);
  margin-bottom: 70px;
  animation: popIn 0.4s backwards;
  animation-delay: 0.2s;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

@media (max-width: 768px) {
  .header {
    padding: 12px 0;
  }

  .bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .foot-actions {
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .ai-floater {
    right: 16px;
    bottom: 16px;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
  }

  .ai-card {
    width: 200px;
    height: 200px;
  }

  .ai-card img {
    width: 180px;
    height: 180px;
  }

  .ai-balloon {
    margin-bottom: 10px;
    max-width: 90vw;
    font-size: 1rem;
  }

  .landing h1 {
    font-size: 1.8rem;
  }

  .choices {
    grid-template-columns: 1fr;
  }
}
/* AI Chat Links */
.bubble.bot a {
  color: #00d4ff;
  text-decoration: underline;
  font-weight: 600;
  word-break: break-all;
}
.bubble.bot a:hover {
  color: #66e5ff;
  text-decoration: none;
}

/* Text Wrap Fixes */
.bubble, .ai-balloon {
  overflow-wrap: break-word;
  word-break: break-word;
  word-wrap: break-word;
}
 
 / *   C h a t   B u b b l e   C o l o r   D i f f e r e n t i a t i o n   * /  
 