:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent: #f43f5e;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 1rem;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: 5rem;
}

/* Page Layout */
.app-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: white;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--text-main);
}

/* Navigation Grid */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.nav-card {
  background: var(--bg-card);
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-height: 200px;
  justify-content: center;
}

.nav-card:hover, .nav-card:focus {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.nav-card.active {
  border-color: var(--primary);
  background: #f5f3ff;
}

.nav-card i {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.nav-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.nav-card p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Content Area */
.content-section {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
  border: 1px solid #e2e8f0;
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

.content-section h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  border-bottom: 4px solid var(--primary);
  display: inline-block;
  padding-bottom: 0.5rem;
}

/* Style Toggle */
.style-toggle {
  display: flex;
  background: white;
  padding: 0.35rem;
  border-radius: 100px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
}

.style-btn {
  padding: 0.6rem 1.5rem;
  border: none;
  background: transparent;
  border-radius: 100px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  font-size: 0.9rem;
}

.style-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.style-btn:hover:not(.active) {
  color: var(--primary);
  background: #f5f3ff;
}

/* Chatbot Section */
/* Floating Chat Widget */
.chatbot-section {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 380px;
    max-width: calc(100vw - 4rem);
    max-height: 500px;
    z-index: 2000;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: white;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chatbot-section.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    transition: all 0.2s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.chat-toggle i {
    width: 28px;
    height: 28px;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-chat:hover {
    opacity: 1;
}

@media (max-width: 640px) {
    .chatbot-section {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 80%;
        border-radius: 1rem 1rem 0 0;
    }
}

.chat-header {
  background: var(--primary);
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  max-width: 85%;
  font-size: 1rem;
  line-height: 1.5;
}

.message.bot {
  background: white;
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

.message.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
}

.chat-input-area {
  padding: 1.5rem;
  background: white;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 1rem;
}

.chat-input-area input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 100px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-area input:focus {
  border-color: var(--primary);
}

.chat-input-area button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: 100px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-input-area button:hover {
  background: var(--primary-dark);
}

/* Chatbot Suggestions */
.chat-suggestions {
  padding: 0.5rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: white;
}

.suggestion-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-pill:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Typing Indicator */
.typing {
  display: flex;
  gap: 4px;
  padding: 0.25rem 0;
}

.typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Persona Modal */
.persona-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.persona-modal {
  background: white;
  padding: 3rem;
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.persona-modal h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.persona-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.persona-btn {
  padding: 1.25rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.persona-btn:hover {
  background: #f5f3ff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.persona-btn strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.persona-btn span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Accessibility & Utils */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (max-width: 640px) {
  .nav-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 2.5rem 1rem;
  }

  .content-section {
    padding: 1.5rem;
  }
}

