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

:root {
  --emerald-50: #f0fdf4;
  --emerald-100: #dcfce7;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-600: #475569;
  --slate-900: #0f172a;
  --white: #ffffff;
  --gray-200: #e5e7eb;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--slate-50);
  color: var(--slate-900);
  line-height: 1.6;
}

/* Header & Navigation */
header {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--emerald-600);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--slate-600);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
  color: var(--emerald-600);
}

/* Hamburger Menu - Better Design */
.hamburger {
  display: none;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background-color: var(--slate-900);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Menu */
.nav-menu {
  display: none;
  position: fixed;
  left: 0;
  top: 60px;
  width: 100%;
  height: calc(100vh - 60px);
  background-color: var(--white);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.nav-menu.active {
  display: block;
  animation: slideInLeft 0.3s ease;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  width: 100%;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 1rem 2rem;
  width: 100%;
  border-bottom: 1px solid var(--gray-200);
  text-decoration: none;
  color: var(--slate-600);
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-menu a:hover {
  background-color: var(--emerald-50);
  color: var(--emerald-600);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  min-height: calc(100vh - 200px);
  padding: 3rem 0;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--emerald-50) 0%, var(--slate-50) 100%);
  border-radius: 12px;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--slate-900);
}

.hero p {
  font-size: 1.25rem;
  color: var(--slate-600);
  margin-bottom: 2rem;
}

.hero .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--emerald-600);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--emerald-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
  background-color: var(--slate-100);
  color: var(--slate-900);
  border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
  background-color: var(--emerald-50);
  border-color: var(--emerald-600);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--slate-900);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Chat Interface */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 600px;
  background-color: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--white);
}

.message {
  display: flex;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
  margin-bottom: 0.5rem;
}

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

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

.message.assistant {
  justify-content: flex-start;
}

.message-content {
  max-width: 75%;
  padding: 0.875rem 1.125rem;
  border-radius: 12px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message.user .message-content {
  background-color: var(--emerald-600);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
  background-color: #f3f4f6;
  color: var(--slate-900);
  border-bottom-left-radius: 4px;
}

.message-content strong {
  font-weight: 600;
}

.message-content br {
  display: block;
  content: "";
  margin: 0.25rem 0;
}

.message-content div {
  margin: 0.25rem 0;
}

.chat-input-area {
  padding: 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 0.75rem;
  background-color: var(--slate-50);
}

.chat-input-area input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.chat-input-area input:focus {
  outline: none;
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.chat-input-area button {
  padding: 0.875rem 1.5rem;
  white-space: nowrap;
  font-weight: 600;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Analyzer Section */
.analyzer-container {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}

.analyzer-form {
  margin-bottom: 2rem;
}

.analysis-result {
  background-color: var(--emerald-50);
  padding: 2rem;
  border-radius: 12px;
  border-left: 4px solid var(--emerald-600);
  display: none;
}

.analysis-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.score-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}

.analysis-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.analysis-item {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

.analysis-item h4 {
  color: var(--emerald-600);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.analysis-item p {
  color: var(--slate-600);
  font-size: 0.9rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--emerald-600);
  box-shadow: 0 8px 16px rgba(5, 150, 105, 0.1);
  transform: translateY(-4px);
}

.card h3 {
  color: var(--emerald-600);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--slate-600);
  font-size: 0.95rem;
}

/* Chat Page Responsive Layout */
.chat-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  margin-bottom: 3rem;
}

.chat-sidebar {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.chat-sidebar h3 {
  color: var(--emerald-600);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.chat-sidebar ul {
  list-style: none;
  padding: 0;
}

.chat-sidebar li {
  margin-bottom: 0.75rem;
}

.chat-sidebar a {
  color: var(--emerald-600);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.chat-sidebar a:hover {
  background-color: var(--emerald-50);
}

/* Footer */
footer {
  background-color: var(--slate-900);
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  border-top: 1px solid var(--gray-200);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--emerald-500);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--emerald-500);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--slate-400);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    position: static;
    height: auto;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  nav ul {
    gap: 1rem;
  }

  .chat-container {
    height: 800px;
  }

  .message-content {
    max-width: 90%;
  }

  .header-content {
    padding: 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  main {
    padding: 1.5rem 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu.active {
    display: flex;
    flex-direction: column;
  }

  nav {
    display: none;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    margin-top: 2rem;
  }

  .chat-input-area {
    flex-direction: column;
    gap: 0.5rem;
  }

  .chat-input-area button {
    width: 100%;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.hidden {
  display: none;
}

.error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #dc2626;
}

.success {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--emerald-600);
}

/* Contact Page Layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* FAQ Section */
.faq-section {
  margin: 4rem 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.faq-item {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--emerald-600);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.1);
}

.faq-item h4 {
  color: var(--emerald-600);
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.faq-item p {
  color: var(--slate-600);
  margin: 0;
}

/* Contact Responsive */
@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }
}
