body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #fff;
  color: #1b1b1b;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: #15003e;
  color: white;
  display: flex; /* Changed to flex for alignment */
  justify-content: space-between; /* Distribute items */
  align-items: center;
  padding: 1rem 2rem;
}

main {
  flex-grow: 1;
}

header img.logo {
  height: 40px;
  margin-right: 1rem;
}

.header-left-group {
  display: flex;
  align-items: center;
  gap: 1rem; /* Space between logo and title */
}

header strong {
  white-space: nowrap;
  font-size: 2.4rem; /* Twice the slogan size (1.2rem * 2 = 2.4rem) */
}

.header-slogan {
  font-size: 1.2rem;
  line-height: 1.2;
  color: white;
  margin: 0;
  max-width: 400px;
  flex-grow: 1; /* Allow slogan to take up available space */
  text-align: center; /* Center the slogan text */
  white-space: nowrap; /* Ensure slogan stays on one line */
  margin-right: 1rem; /* Add some space if user info pushes it */
}

.cta-button {
  background-color: white;
  color: #15003e;
  border: 2px solid white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
}

header .cta-button:hover {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem;
  background-color: #f5f5f5;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.4;
  color: #3e92b5;
  max-width: 1000px;
  margin: 0 auto;
  white-space: normal;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
}

.card-icon {
  font-size: 2rem;
  color: #ef8e87;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card a {
  color: #3e92b5;
  font-weight: 600;
  text-decoration: none;
}

.more-btn {
  background-color: transparent;
  border: 1px solid #3e92b5;
  color: #3e92b5;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  align-self: flex-start;
  transition: all 0.3s ease;
}

.more-btn:hover {
  background-color: #3e92b5;
  color: white;
}

.card-instructions {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.85rem;
  text-align: left;
  line-height: 1.5;
  color: #374151;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding-top 0.5s ease-out;
}

.card.expanded .card-instructions {
  max-height: 500px; /* Adjust if content is taller */
  padding-top: 1rem;
}

.card-instructions p, .card-instructions ul {
  margin: 0 0 0.5rem 0;
  padding: 0;
}

.card-instructions ul {
  padding-left: 1.25rem;
  list-style-position: outside;
}

.card-instructions li {
  margin-bottom: 0.25rem;
}

.dynamic-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.dropdown-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 600px;
  background-color: #15003e;
  padding: 1.5rem;
  border-radius: 10px;
}

.dropdown-wrapper textarea,
.dropdown-wrapper input[type="file"] {
  background-color: #ffffff;
  color: #1b1b1b;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  appearance: none;
  outline: none;
  width: 100%;
  resize: none;
  min-height: 150px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.dropdown-wrapper textarea:focus,
.dropdown-wrapper input[type="file"]:focus {
  outline: 2px solid #3e92b5;
}

footer {
  text-align: center;
  font-size: 0.8rem;
  padding: 1.5rem 2rem;
  background-color: #15003e;
}

footer .footer-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

footer .footer-link {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: text-decoration 0.3s ease;
}

footer .footer-link:hover {
  text-decoration: underline;
}

.button-group {
  display: flex;
}

/* Input Container Styles */
.input-container {
  position: relative;
  width: 100%;
  min-height: 200px;
}

.main-input {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  resize: vertical;
  box-sizing: border-box;
  background-color: white;
  transition: all 0.3s ease;
}

.main-input:focus {
  outline: none;
  border-color: #3e92b5;
  box-shadow: 0 0 0 3px rgba(62, 146, 181, 0.1);
}

.file-explorer-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: transparent;
  border: none;
  font-size: 1.5rem;
  color: #3e92b5;
  cursor: pointer;
  z-index: 5;
}

.input-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(62, 146, 181, 0.1);
  border: 2px dashed #3e92b5;
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.overlay-content {
  text-align: center;
  color: #15003e;
}

.overlay-icon {
  font-size: 3rem;
  color: #3e92b5;
  margin-bottom: 1rem;
}

.overlay-content p {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

/* File Preview */
.file-preview {
  background-color: #f0f8ff;
  border: 1px solid #3e92b5;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.remove-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Analyze Button */
.analyze-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  height: 52px; /* Fixed height for consistent sizing */
  flex-grow: 1; /* Allows it to take up remaining space */
  /* Removed: width property */
}

.analyze-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* Add to Queue Button */
.add-to-queue-btn {
  background-color: #3e92b5;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  height: 52px; /* Fixed height for consistent sizing */
  flex-basis: 160px; /* Preferred width */
  flex-shrink: 0; /* Prevent it from shrinking */
  /* Removed: width property */
}

.add-to-queue-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.input-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem; /* Reverted: Space between the two buttons */
  margin-top: 0;
}

.queue-status-text {
  color: #ffffff;
  text-align: center;
  margin: 0.5rem 0 0.5rem 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}

/* Queue Section Styles */
.queue-section {
  padding: 2rem;
  background-color: #f5f5f5;
}

.queue-container {
  max-width: 600px;
  margin: 0 auto;
  background-color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.queue-container h3 {
  margin-top: 0;
  color: #15003e;
}

.queued-items-list {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.queued-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9f9f9;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.remove-queued-item-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* Prevent shrinking */
}

.clear-queue-btn {
  background-color: #ef8e87;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

/* Results Section */
.results-section {
  padding: 2rem;
  background-color: #ffffff;
}

.results-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.risk-score {
  text-align: center;
  background-color: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  transition: all 0.3s ease;
}

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

.analysis-section {
  background-color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.analysis-section h3 {
  margin: 0 0 1rem 0;
  color: #15003e;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.analysis-section h3 i {
  color: #3e92b5;
}

.analysis-section ul {
  margin: 0;
  padding-left: 1.5rem;
}

.analysis-section li {
  margin-bottom: 0.5rem;
  color: #374151;
  line-height: 1.5;
}

/* Text Input */
#textInput {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  resize: vertical;
  box-sizing: border-box;
}

#textInput:focus {
  outline: 2px solid #3e92b5;
  border-color: #3e92b5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .results-container {
    grid-template-columns: 1fr;
  }
  
  .analysis-content {
    grid-template-columns: 1fr;
  }
  
  .upload-content h3 {
    font-size: 1.2rem;
  }
  
  .upload-icon {
    font-size: 2rem;
  }
}

.all-results-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.analysis-card {
  background-color: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: 1fr 2fr; /* Adjusted for consistent layout */
  gap: 2rem;
  position: relative; /* Needed for blur overlay */
}

.analysis-card h3 {
  font-size: 1.5rem;
  color: #15003e;
  margin-bottom: 1.5rem;
  grid-column: 1 / -1; /* Span across both columns */
}

.analysis-card .risk-score {
  padding: 1rem;
}

.analysis-card .score-circle {
  width: 100px;
  height: 100px;
  font-size: 2rem;
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* New: Blur effect for results content */
.analysis-content.results-blurred {
  filter: blur(8px); /* Apply blur */
  pointer-events: none; /* Prevent interaction with blurred content */
  user-select: none; /* Prevent selecting blurred text */
}

/* New: Overlay to hint at blurred content and cover interaction */
.analysis-card:has(.results-blurred)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7); /* Semi-transparent overlay */
  z-index: 5; /* Above blurred content but below button */
  border-radius: 15px; /* Match card radius */
  cursor: not-allowed;
}

/* New: Style for Checkout for Results button */
.checkout-for-results-btn {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content; /* Adjust width to content */
  margin: 1rem auto 0; /* Center horizontally below blurred content */
  display: block; /* Takes full width and centers with margin auto */
  z-index: 10; /* Above blur overlay */
  position: absolute; /* Position over blur */
  bottom: 2rem; /* Adjust as needed */
  left: 50%;
  transform: translateX(-50%);
}

.checkout-for-results-btn:hover {
  background-color: #059669;
}

/* --- New: Pricing Section Styles --- */
.pricing-section {
  padding: 4rem 2rem;
  text-align: center;
  background-color: #f9fafb;
}

.pricing-section h2 {
  font-size: 2.5rem;
  color: #15003e;
  margin-bottom: 3rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background-color: white;
  padding: 2.5rem 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.pricing-card h3 {
  font-size: 1.8rem;
  color: #15003e;
  margin-bottom: 1rem;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3e92b5;
  margin-bottom: 1.5rem;
}

.pricing-card .price span {
  font-size: 1.2rem;
  font-weight: normal;
  color: #6b7280;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  text-align: center;
  width: 100%;
}

.pricing-card ul li {
  margin-bottom: 0.8rem;
  color: #374151;
  font-size: 1.05rem;
}

.pricing-card ul li i {
  color: #10b981;
  font-size: 1.2rem;
}

.select-plan-btn {
  background-color: #15003e;
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: auto; /* Push button to the bottom of the card */
}

.select-plan-btn:hover {
  background-color: #3e92b5;
} 

/* --- New: Authentication Section Styles --- */
.auth-section {
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(249, 250, 251, 0.95);
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

.auth-container {
  background-color: white;
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  margin: 0 auto;
}

.auth-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.auth-close-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.auth-form h2 {
  font-size: 2rem;
  color: #15003e;
  margin-bottom: 2rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: calc(100% - 2rem); /* Account for padding */
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
}

.auth-form button {
  background-color: #3e92b5;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.auth-form button:hover {
  background-color: #2d7a9a;
}

.auth-form p {
  margin-top: 1.5rem;
  color: #6b7280;
}

.auth-form p a {
  color: #3e92b5;
  text-decoration: none;
  font-weight: 600;
}

.auth-form p a:hover {
  text-decoration: underline;
}

/* --- My Scans Section Styles (Modal) --- */
.my-scans-section,
.results-section { /* Grouped for shared modal styles */
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(21, 0, 62, 0.8); /* Darker overlay */
  backdrop-filter: blur(5px);
  z-index: 1000;
  overflow-y: auto; /* Allow scrolling if content is long */
  padding: 4rem 2rem;
}

/* New: Loading Modal Styles */
.loading-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(21, 0, 62, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1001; /* Above other modals */
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-container {
  background-color: white;
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.loading-container h2 {
  font-size: 1.5rem;
  color: #15003e;
  margin-bottom: 1.5rem;
}


.my-scans-container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  position: relative;
}

.my-scans-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.my-scans-close-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.my-scans-container h2 {
  font-size: 2.5rem;
  color: #15003e;
  margin-bottom: 2rem;
  text-align: center;
}

/* New, correct fix for spacing */
.my-scans-section .all-results-container {
  gap: 0.5rem; /* This controls the space between scan cards */
}

/* New: Filter Panel Styles */
.filter-panel {
  padding: 1.5rem;
  background-color: #f9fafb;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid #e5e7eb;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group h4 {
  margin: 0 0 0.8rem 0;
  color: #374151;
  font-size: 1rem;
}

.filter-group label {
  margin-right: 1.5rem;
  color: #4b5563;
}

.filter-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.filter-actions button {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#applyFiltersBtn {
  background-color: #3e92b5;
  color: white;
}

#applyFiltersBtn:hover {
  background-color: #2d7a9a;
}

#resetFiltersBtn {
  background-color: #e5e7eb;
  color: #4b5563;
}

#resetFiltersBtn:hover {
  background-color: #d1d5db;
}

/* Header adjustments for user info */
.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
  font-weight: 600;
}

.user-info .cta-button {
  background-color: #ffc107; /* Highlight for user actions */
  color: #15003e;
  border: 2px solid #ffc107;
}

.user-info .cta-button:hover {
  background-color: transparent;
  color: #ffc107;
  border: 2px solid #ffc107;
}

.analysis-card-collapsible {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.25rem; /* Further reduced space between cards */
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  cursor: pointer;
  background-color: #f7fafc;
  border-bottom: 1px solid #edf2f7;
}

.collapsible-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #2d3748;
}

/* New: Styles for the right side of the collapsible header */
.header-right-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.risk-score-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  min-width: 20px;
  text-align: center;
}

.risk-score-badge.low-risk { background-color: #10b981; }
.risk-score-badge.medium-risk { background-color: #f59e0b; }
.risk-score-badge.high-risk { background-color: #ef4444; }

.collapsible-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #718096;
}

.expand-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #a0aec0;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
  display: flex;
  gap: 2rem;
}

.analysis-card-collapsible.active .collapsible-content {
  max-height: 1000px; /* Adjust as needed */
  padding: 1.5rem;
  border-top: 1px solid #edf2f7;
}

/* Chat Widget Styles */
#chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1001;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#chat-button {
  background-color: #007aff;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

#chat-button:hover {
  transform: scale(1.1);
}

#chat-button i {
  font-size: 1.5rem;
}

#chat-window-container {
  display: none;
  flex-direction: column;
  width: 370px; /* Increased width */
  height: 550px; /* Increased height */
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  background-color: #ffffff;
  overflow: hidden; /* Ensure child elements adhere to border radius */
  position: relative;
}

#chat-window-header {
  background-color: #f8f8f8;
  color: #000;
  padding: 15px; /* Increased padding */
  border-bottom: 1px solid #e5e5ea;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

#chat-window-header h3 {
    margin: 0;
    font-size: 1rem;
}

#close-chat-btn {
  background: none;
  border: none;
  color: #d1d1d6;
  font-size: 20px; /* Adjusted size */
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

#chat-messages-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 10px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
}

#chat-input-container {
  display: flex;
  padding: 10px;
  border-top: 1px solid #e5e5ea;
  background-color: #f8f8f8;
  align-items: center;
}

#user-message-input {
  flex-grow: 1;
  border: none;
  border-radius: 18px;
  padding: 10px 15px;
  font-size: 1rem;
  background-color: #ffffff;
  outline: none;
  border: 1px solid #e5e5ea;
}

#send-user-message-btn {
  background-color: transparent;
  color: #007aff;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  padding: 8px 15px; /* Adjusted padding */
  margin-left: 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
}

#send-user-message-btn:hover {
  color: #0056b3;
}

/* New, Simplified Chat Bubble Styles */
.message {
  display: flex;
  margin: 5px 10px;
  padding: 0;
  max-width: 100%;
}

.message .bubble {
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 1rem;
  line-height: 1.4;
  word-wrap: break-word;
  max-width: 75%;
}

.message.sent {
  justify-content: flex-end;
  align-self: flex-end; /* Overriding previous align-self */
  background-color: transparent; /* Remove previous background */
  color: white; /* Text color for sent messages */
}

.message.sent .bubble {
  background-color: #007aff;
}

.message.received {
  justify-content: flex-start;
  align-self: flex-start; /* Overriding previous align-self */
  background-color: transparent; /* Remove previous background */
  color: #000; /* Text color for received messages */
}

.message.received .bubble {
  background-color: #e5e5ea;
}

.user-list-item {
  padding: 1rem;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.user-list-item:hover {
  background-color: #f9fafb;
}

.user-list-item.selected {
  background-color: #007aff;
  color: white;
}

.user-list-item .user-info {
  display: flex;
  flex-direction: column;
}

.user-list-item .user-name {
  font-weight: bold;
}

.user-list-item .last-message-time {
  font-size: 0.8rem;
  color: #8e8e93;
}

.user-list-item.selected .last-message-time {
  color: #f9fafb;
}


/* Admin Chat Styles */
.admin-chat-container {
  display: flex;
  height: 100vh;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#user-list-container {
  width: 320px;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  background-color: #f9fafb;
}

#user-list-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

#user-list-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

#user-list {
  overflow-y: auto;
  flex-grow: 1;
}

#user-list .has-new-message .user-name {
  font-weight: bold;
  color: #007aff;
}

#chat-window {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

#chat-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f8f8f8;
}

#chat-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

#chat-messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#no-user-selected {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #8e8e93;
  font-size: 1.2rem;
}

#chat-input-container {
  display: flex;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  background-color: #f8f8f8;
}

#message-input {
  flex-grow: 1;
  border: 1px solid #d1d5db;
  border-radius: 18px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  outline: none;
}

#message-input:disabled {
  background-color: #f9fafb;
}

#send-button {
  background-color: #007aff;
  color: white;
  border: none;
  border-radius: 18px;
  padding: 0.75rem 1.5rem;
  margin-left: 1rem;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

#send-button:hover {
  background-color: #0056b3;
}

#send-button:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
}

#admin-login-container {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background-color: #f9fafb;
  text-align: center;
}

#admin-login-container h2 {
  margin-bottom: 1.5rem;
}

#admin-login-container input {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 5px;
}

#admin-login-btn {
  width: 100%;
  padding: 0.8rem;
  background-color: #3e92b5;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.trial-text {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: -1rem;
  margin-bottom: 1rem;
}

/* End Chat Confirmation Modal */
#confirm-end-chat-modal {
  display: none;
  position: absolute;
  z-index: 1002;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fefefe;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 300px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h3 {
  margin-top: 0;
}

.modal-buttons button {
  padding: 10px 20px;
  margin: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

#confirm-yes-btn {
  background-color: #007aff;
  color: white;
}

#confirm-no-btn {
  background-color: #e5e5ea;
  color: black;
}

/* FAQ Section Styles */
.faq-section {
  padding: 4rem 2rem;
  background-color: #fff;
  text-align: center;
  position: relative;
  z-index: 10;
}

.faq-section h2 {
  font-size: 2.5rem;
  color: #15003e;
  margin-bottom: 3rem;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1b1b1b;
}

.faq-question i {
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
}

.faq-answer p {
  margin: 0;
  padding-top: 1rem;
  color: #374151;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px; /* Adjust as needed */
  padding: 1rem;
}

.faq-item.active .faq-question i {
  transform: rotate(45deg);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

#faqModal.modal {
  overflow: hidden;
}

#faqModal .faq-section {
  padding: 0;
  text-align: left;
}

#faqModal .faq-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

#faqModal .faq-container {
  display: block;
}

#faqModal .faq-item {
  padding: 0.6rem 0;
}

#faqModal .faq-question {
  font-size: 0.95rem;
  font-weight: 600;
}

#faqModal .faq-answer p {
  font-size: 0.85rem;
  line-height: 1.5;
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
}

.close-btn:hover,
.close-btn:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}