* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Upgrade Banner Styles */
.upgrade-banner {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
  max-height: 100px;
}

.upgrade-banner.hidden {
  max-height: 0;
  padding: 0 20px;
  opacity: 0;
}

.upgrade-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  width: 100%;
}

.upgrade-banner-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.upgrade-banner-text strong {
  font-weight: 600;
  color: #fff3cd;
}

.upgrade-banner-button {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.upgrade-banner-button:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.upgrade-banner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.upgrade-banner-close:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* No body padding needed since banner is not fixed positioned */

/* Mobile styles for upgrade banner */
@media (max-width: 768px) {
  .upgrade-banner {
    padding: 10px 15px;
  }
  
  .upgrade-banner-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .upgrade-banner-text {
    font-size: 13px;
  }
  
  .upgrade-banner-button {
    padding: 10px 24px;
    font-size: 13px;
  }
  
  /* No mobile body padding needed either */
}

/* Paywall Styles */
.paywall-message {
  margin-top: 20px;
  padding: 0;
}

.locked-ideas {
  display: flex;
  align-items: center;
  padding: 25px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.locked-ideas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.lock-icon {
  font-size: 2.5em;
  margin-right: 20px;
  opacity: 0.7;
  flex-shrink: 0;
}

.paywall-text {
  flex: 1;
  text-align: left;
}

.paywall-text h4 {
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 1.3em;
  font-weight: 600;
}

.paywall-text p {
  color: #6c757d;
  margin-bottom: 15px;
  line-height: 1.5;
}

.upgrade-btn {
  display: inline-block;
  background: linear-gradient(135deg, #1a9b96, #158d89);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(26, 155, 150, 0.3);
}

.upgrade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 155, 150, 0.4);
  text-decoration: none;
  color: white;
}

@media (max-width: 768px) {
  .locked-ideas {
    flex-direction: column;
    text-align: center;
  }
  
  .lock-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .paywall-text {
    text-align: center;
  }
}

body {
  background-color: #f7f9fc;
  color: #333;
  line-height: 1.6;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

/* App Layout with Sidebar */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Mobile Navigation Bar */
.mobile-nav-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #2c3e50;
  color: white;
  z-index: 1001;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-nav-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.mobile-nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-title {
  font-size: 18px;
  font-weight: 600;
  color: #ecf0f1;
}

.hamburger {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  position: absolute;
  transition: all 0.3s ease;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  bottom: -6px;
}

.mobile-nav-bar.menu-open .hamburger {
  background: transparent;
}

.mobile-nav-bar.menu-open .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-nav-bar.menu-open .hamburger::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* Mobile menu overlay */
@media (max-width: 767px) {
  .project-sidebar::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: -1;
  }
  
  .project-sidebar.open::before {
    opacity: 1;
    visibility: visible;
  }
}

/* Unified Sidebar System */
.sidebar {
  width: 300px;
  background: #1a9b96;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow: hidden !important; /* Constrain to viewport height */
  z-index: 1000;
  transform: translateX(0);
  transition: transform 0.3s ease;
  display: flex !important;
  flex-direction: column !important;
  border-right: 1px solid #158a81;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.sidebar.hidden {
  transform: translateX(-100%);
}

/* Legacy project-sidebar support */
.project-sidebar {
  width: 300px;
  background: #1a9b96; /* Darker Teal */
  color: white;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #158a81;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #158a81;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #1a9b96;
  z-index: 1001;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.2rem;
  color: white;
}

.brand-icon {
  font-size: 1.5rem;
}

.sidebar .sidebar-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
  min-height: 0;
}

.sidebar-section {
  margin-bottom: 15px;
  padding: 0 20px;
}

.sidebar-section:not(.projects-section) {
  margin-bottom: 10px;
}

/* Compact current project header */
.current-project-header {
  margin-bottom: 12px;
}

.current-project-header h3 {
  font-size: 1.3rem !important;
  margin-bottom: 10px !important;
}

.project-controls {
  display: flex;
  flex-direction: row;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  justify-content: space-between;
}

.project-controls .project-btn-text {
  font-size: 0.9rem;
  padding: 8px 12px;
  flex: 1;
  text-align: center;
  display: block;
  transition: all 0.2s ease;
  border-radius: 6px;
  font-weight: 500;
}

.sidebar-section h3 {
  color: #ecf0f1;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  font-weight: 600;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  display: block;
  padding: 8px 12px;
  color: #ecf0f1;
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 3px;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 500;
}

/* Dashboard header - appears as section label, not clickable module */
.nav-dashboard {
  display: block;
  padding: 8px 12px;
  color: #ecf0f1;
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  cursor: default;
  pointer-events: none; /* Disable clicking */
}

/* Icon styling for dashboard */
.nav-dashboard::before {
  content: "🏠 ";
  margin-right: 8px;
  font-size: 1rem;
}

/* Disabled navigation state for locked modules */
.nav-item.nav-disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background: rgba(128, 128, 128, 0.1) !important;
  color: #666 !important;
}

.nav-item.nav-disabled:hover {
  background: rgba(128, 128, 128, 0.1) !important;
  color: #666 !important;
}

.nav-item.nav-disabled .nav-status {
  opacity: 0.6;
}

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

.nav-status {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Status colors */
.nav-status,
.status-current,
.status-active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.status-complete {
  background: #28a745 !important;
  color: white !important;
}

.status-in-progress {
  background: #ffa500 !important;
  color: white !important;
}

.status-ready {
  background: #1a9b96 !important;
  color: white !important;
}

.status-locked,
.status-not-started {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #b3e5e5 !important;
}

.status-skipped {
  background: #6c757d !important;
  color: white !important;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover span {
  background: #ff6347;
}

.sidebar-header h3 {
  flex: 1;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ecf0f1;
}

/* Body margin adjustments for fixed sidebar */
body.sidebar-collapsed {
  margin-left: 0 !important;
}

/* Loading text styling */
.loading-text {
  color: #b3e5e5;
  font-style: italic;
  font-size: 0.9rem;
}

/* Recent projects in sidebar */
.recent-project-item {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: #ecf0f1;
}

.recent-project-item:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.add-project-btn {
  background: var(--primary-teal);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.add-project-btn:hover {
  background: #1A9B96;
  transform: scale(1.1);
}

.project-list {
  flex: 1;
  padding: 10px 0;
}

.project-item {
  padding: 15px 20px;
  border-bottom: 1px solid #34495e;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-item:hover {
  background: #34495e;
}

.project-item.active {
  background: #3498db;
  border-left: 4px solid var(--primary-teal);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
  font-weight: 600;
}

.project-item.active .project-name {
  color: #ffffff;
}

.project-name {
  font-weight: 500;
  font-size: 1.1rem;
  color: #ecf0f1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.project-date {
  font-size: 0.8rem;
  color: #bdc3c7;
  font-weight: 400;
  opacity: 0.8;
}

.project-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #ecf0f1;
  line-height: 1.3;
}

.project-type {
  font-size: 0.8rem;
  color: #bdc3c7;
  margin-bottom: 6px;
}

.project-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.not-started {
  background: #95a5a6;
}

.status-indicator.in-progress {
  background: var(--accent-yellow);
}

.status-indicator.completed {
  background: #28a745;
}

.status-text {
  color: #bdc3c7;
}

.main-essay-badge {
  position: absolute;
  top: 8px;
  right: 12px;
  background: var(--primary-coral);
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.project-delete-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: #e74c3c;
  color: white;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.project-item:hover .project-delete-btn {
  opacity: 1;
}

.project-delete-btn:hover {
  background: #c0392b;
  transform: scale(1.1);
}

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

/* Scrollable content area */
.sidebar-content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
  background-color: #1a9b96;
  min-height: 0;
}

/* Enhanced scrollbar styling for sidebar content */
.sidebar-content::-webkit-scrollbar {
  width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* CRITICAL SCROLLING FIX - Override any external CSS conflicts */
.sidebar {
  overflow: hidden !important;
}

.sidebar .sidebar-content {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

/* Ensure projects section doesn't interfere with scrolling */
.sidebar .sidebar-content .projects-section,
.sidebar .sidebar-content .projects-section .projects-container-expanded,
.sidebar .sidebar-content #projects-list {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  flex: none !important;
}

.sidebar-footer {
  padding: 6px 10px;
  border-top: 1px solid #158a81;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  justify-content: stretch;
  gap: 4px;
  background: #1a9b96;
  z-index: 1001;
  box-sizing: border-box;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.user-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-footer .download-all-btn {
  background: var(--primary-coral);
  color: white;
  padding: 6px 12px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  text-align: center;
  transition: background-color 0.2s;
  flex: 1;
  min-height: 28px;
}

.sidebar-footer .download-all-btn:hover {
  background: #FF5252;
}

.sidebar-footer .logout-btn {
  background: #7f8c8d;
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  text-decoration: none;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  transition: background-color 0.2s;
  flex: 1;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.sidebar-footer .logout-btn:hover {
  background: #6c7b7d;
}

/* Help and Account Button Styles - REMOVED conflicting column layout */

.help-btn, .account-btn {
  margin-bottom: 5px;
}

/* Sidebar footer button styles with higher specificity */
.sidebar-footer .help-btn {
  background: #3498db !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 3px !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  flex: 1 !important;
  min-height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.sidebar-footer .help-btn:hover {
  background: #2980b9 !important;
}

.sidebar-footer .account-btn {
  background: #2ecc71 !important;
  color: white !important;
  border: none !important;
  cursor: pointer !important;
  padding: 4px 8px !important;
  border-radius: 3px !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  flex: 1 !important;
  min-height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.sidebar-footer .account-btn:hover {
  background: #28a745 !important;
}

/* Project Button Styles */
.project-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: #6c7b7d;
}

.project-btn-text {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #2c3e50;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  min-width: 50px;
}

.project-btn-text:hover {
  background: white;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-btn-primary {
  background: var(--primary-teal);
  color: white;
  border: 1px solid var(--primary-teal);
}

.project-btn-primary:hover {
  background: #1A9B96;
  border-color: #1A9B96;
}

.project-btn-danger {
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.project-btn-danger:hover {
  background: #dc3545;
  border-color: #dc3545;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Expanded Projects Section */
.sidebar .sidebar-content .projects-section {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0;
  padding: 0 20px;
  min-height: 0;
}

.projects-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 8px;
}

.sidebar .projects-header-compact h4 {
  color: #ecf0f1;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  font-weight: 600;
}

.sidebar .project-btn-compact {
  background: var(--primary-teal);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-btn-compact:hover {
  background: #1A9B96;
  transform: scale(1.05);
}

.sidebar .projects-section .projects-container-expanded {
  flex: 1 1 auto;
  padding: 8px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  min-height: 0;
}

/* Removed individual project scrollbar styles - using unified sidebar scroll */

/* Project Category Styles */
.project-category {
  margin-bottom: 16px;
}

.category-header {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 6px 0;
  padding: 4px 8px;
  border-radius: 4px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Personal Statement Category */
.project-category:has(.category-header:contains("Personal")) .category-header,
.personal-statement-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-left: 3px solid #667eea;
}

/* Supplement Category */ 
.project-category:has(.category-header:contains("Supplement")) .category-header,
.supplement-header {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-left: 3px solid #f093fb;
}

/* Project Item Styling */
.category-projects {
  margin-left: 4px;
}

.project-item-enhanced {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  color: #ecf0f1;
  border-left: 2px solid transparent;
}

/* Personal Statement Projects */
.project-item-personal {
  background: rgba(102, 126, 234, 0.15);
  border-left-color: #667eea;
}

.project-item-personal:hover {
  background: rgba(102, 126, 234, 0.25);
  color: #ffffff;
}

.project-item-personal.active {
  background: rgba(102, 126, 234, 0.4);
  color: #ffffff;
  font-weight: 500;
}

/* Supplement Projects */
.project-item-supplement {
  background: rgba(240, 147, 251, 0.15);
  border-left-color: #f093fb;
}

.project-item-supplement:hover {
  background: rgba(240, 147, 251, 0.25);
  color: #ffffff;
}

.project-item-supplement.active {
  background: rgba(240, 147, 251, 0.4);
  color: #ffffff;
  font-weight: 500;
}

/* Uploaded Projects */
.project-item-uploaded {
  background: rgba(255, 193, 7, 0.15);
  border-left-color: #ffc107;
}

.project-item-uploaded:hover {
  background: rgba(255, 193, 7, 0.25);
  color: #ffffff;
}

.project-item-uploaded.active {
  background: rgba(255, 193, 7, 0.4);
  color: #ffffff;
  font-weight: 500;
}

/* Project Item Layout */
.project-name {
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 2px;
  line-height: 1.2;
}

.project-date {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.supplement-type-badge {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 2px;
  font-weight: 500;
}

.uploaded-type-badge {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 2px;
  font-weight: 500;
}

/* Enhanced loading state */
.projects-container-expanded .loading-text {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 20px;
  font-style: italic;
  font-size: 0.8rem;
}

/* Main Content Area */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: #f7f9fc;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  min-height: 100vh;
}

.header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

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

.header-text {
  text-align: center;
  flex: 1;
}

.header h1 {
  color: #1a73e8;
  margin-bottom: 5px;
}

.header h2 {
  font-weight: normal;
  font-size: 1.2rem;
  color: #5f6368;
}

.download-all-btn {
  background-color: #1a73e8;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s;
}

.download-all-btn:hover {
  background-color: #1765cc;
}

.logout-btn {
  background-color: #f8f9fa;
  color: #5f6368;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid #dadce0;
  transition: background-color 0.2s;
}

.logout-btn:hover {
  background-color: #e8eaed;
}

.screen {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

/* Override hidden class for modals when explicitly shown */
.modal-overlay:not(.hidden) {
  display: flex !important;
}

/* Ensure disclaimer modal is always on top when shown */
#disclaimer-modal {
  z-index: 99999 !important;
}

#disclaimer-modal:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Welcome Content */
.welcome-content {
  text-align: center;
}

.user-welcome {
  margin-bottom: 30px;
}

.welcome-content h2 {
  margin-bottom: 15px;
  color: #202124;
}

.welcome-content p {
  margin-bottom: 30px;
  color: #5f6368;
}

/* Process Overview Styles */
.process-overview {
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
  margin: 30px 0;
  text-align: left;
}

.process-overview h3 {
  margin: 0 0 20px 0;
  color: #202124;
  font-size: 18px;
  font-weight: 600;
}

.process-steps {
  margin-bottom: 20px;
}

.step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}

.step:last-child {
  margin-bottom: 0;
}

.step-number {
  background-color: #1a73e8;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content {
  color: #5f6368;
  line-height: 1.5;
}

.step-content strong {
  color: #202124;
  font-weight: 600;
}

.time-estimate {
  background-color: #fff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 16px;
  margin: 0;
  color: #5f6368;
  font-size: 14px;
  line-height: 1.4;
}

/* Brainstorming Follow-up Question Styles */
.question-context {
  background-color: #f8f9fa;
  border-left: 4px solid #1a73e8;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 0 8px 8px 0;
}

.question-context strong {
  color: #1a73e8;
  font-weight: 600;
}

.discussion-prompt {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 12px 16px;
  color: #1565c0;
  font-weight: 500;
  text-align: center;
  margin-bottom: 8px;
}

/* Custom Topic Selection Styles */
.custom-topic-item {
  border: 2px solid #e8f5e8;
  background-color: #f8fff8;
  border-radius: 12px;
  margin-top: 20px;
  padding: 16px;
}

.custom-topic-item:hover {
  border-color: #c8e6c9;
  background-color: #f1f8e9;
}

.custom-topic-item.selected {
  border-color: #4caf50;
  background-color: #e8f5e8;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.custom-topic-label {
  color: #2e7d32 !important;
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 12px;
  display: block;
}

.custom-topic-label strong {
  color: #1b5e20;
  font-weight: 600;
}

.custom-topic-input {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 2px solid #c8e6c9;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
  margin-top: 8px;
}

.custom-topic-input:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.custom-topic-input::placeholder {
  color: #81c784;
  font-style: italic;
}

.returning-user-message {
  background-color: #e8f5e8;
  color: #137b13;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #34a853;
}

.resume-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.name-input {
  margin-bottom: 20px;
}

.name-input label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

.name-input input {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 16px;
  margin: 0 auto;
}

/* Conversation Screen */
.progress-container {
  margin-bottom: 20px;
}

.progress-bar {
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

#progress-fill {
  height: 100%;
  background-color: #1a73e8;
  width: 0%;
  transition: width 0.3s ease;
}

#progress-text {
  text-align: right;
  font-size: 14px;
  color: #5f6368;
}

.conversation-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#conversation-history {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

.message {
  padding: 12px 16px;
  border-radius: 8px;
  max-width: 80%;
  white-space: pre-line;
}

.message.stacey {
  background-color: #e3f2fd;
  align-self: flex-start;
}

.message.user {
  background-color: #f1f3f4;
  align-self: flex-end;
}

.question-container {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #1a73e8;
}

#current-question {
  margin-bottom: 15px;
  font-weight: 500;
}

.question-context {
  margin-bottom: 8px;
  font-size: 14px;
  color: #5f6368;
  line-height: 1.4;
}

.question-context strong {
  color: #1a73e8;
}

.discussion-prompt {
  font-weight: 500;
  color: #202124;
}

#response-input {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 16px;
  margin-bottom: 15px;
  resize: vertical;
}

/* Summary Screen */
.summary-container {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  white-space: pre-line;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Buttons */
.primary-button {
  background-color: #ff6347; /* Peach/light-red */
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.primary-button:hover {
  background-color: #ff4500; /* Darker peach */
}

.primary-button:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.6;
}

.primary-button:disabled:hover {
  background-color: #cccccc; /* Prevent hover effect when disabled */
}

.secondary-button {
  background-color: transparent;
  color: #1a73e8;
  border: 1px solid #1a73e8;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.secondary-button:hover {
  background-color: #f2f8ff;
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e9ecef;
  border-left-color: #1a9b96;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

/* Global loading overlay with improved styling */
.loading-message {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #666;
  font-size: 16px;
}

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

/* Company Color Variables */
:root {
  --primary-teal: #20B2AA;
  --primary-coral: #FF6B6B;
  --accent-yellow: #FFD93D;
  --accent-orange: #FF8C42;
  --neutral-gray: #6C757D;
  --light-gray: #F8F9FA;
  --white: #FFFFFF;
  
  /* Module Colors */
  --brainstorming-primary: var(--primary-teal);
  --brainstorming-secondary: #E0F2F1;
  --freewriting-primary: var(--primary-coral);
  --freewriting-secondary: #FFEBEE;
  --story-sculpting-primary: var(--accent-yellow);
  --story-sculpting-secondary: #FFF9C4;
  --editing-primary: var(--accent-orange);
  --editing-secondary: #FFF3E0;
}

/* Module Navigation Styles - Compact Version */
.module-nav {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 10px 0;
  margin-bottom: 15px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.module-nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  padding: 0 20px;
}

.module-step {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
  font-size: 0.9em;
}

.module-step.active {
  border-color: #1a9b96;
  background: #e6f7f6;
  color: #1a9b96;
  font-weight: 600;
}

.module-step.completed {
  border-color: #28a745;
  background: #d4edda;
  color: #155724;
}

.module-step.locked {
  opacity: 0.5;
  cursor: not-allowed;
  color: #6c757d;
}

.module-step:not(.locked):hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.module-icon {
  font-size: 16px;
  margin-right: 6px;
}

.module-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.module-name {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 1px;
}

.module-status {
  font-size: 10px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.module-arrow {
  font-size: 14px;
  color: #6c757d;
  margin: 0 4px;
}

/* Module Screen Theming */
.module-screen[data-module="brainstorming"] {
  --module-primary: var(--brainstorming-primary);
  --module-secondary: var(--brainstorming-secondary);
}

.module-screen[data-module="freewriting"] {
  --module-primary: var(--freewriting-primary);
  --module-secondary: var(--freewriting-secondary);
}

.module-screen[data-module="story-sculpting"] {
  --module-primary: var(--story-sculpting-primary);
  --module-secondary: var(--story-sculpting-secondary);
}

.module-screen[data-module="editing"] {
  --module-primary: var(--editing-primary);
  --module-secondary: var(--editing-secondary);
}

/* Module Header Styles */
.module-header {
  text-align: center;
  margin-bottom: 40px;
}

.module-header h2 {
  color: var(--module-primary, var(--primary-teal));
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.module-header p {
  color: var(--neutral-gray);
  font-size: 1.1rem;
  margin: 0;
}

/* Coming Soon Styles */
.coming-soon {
  text-align: center;
  padding: 60px 40px;
  background: var(--module-secondary, var(--light-gray));
  border-radius: 16px;
  border: 2px dashed var(--module-primary, var(--primary-teal));
}

.coming-soon .icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.coming-soon h3 {
  color: var(--module-primary, var(--primary-teal));
  font-size: 1.8rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.coming-soon p {
  color: #202124;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.module-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 300px;
  margin: 0 auto;
}

.feature {
  background: var(--white);
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid var(--module-primary, var(--primary-teal));
  font-weight: 500;
  color: #202124;
  text-align: left;
}

/* Update existing brainstorming elements to use new colors */
.header h1 {
  color: #1a9b96; /* Darker Teal */
}

.primary-button {
  background-color: #ff6347; /* Peach/light-red */
}

.primary-button:hover {
  background-color: #ff4500; /* Darker peach */
}

.secondary-button {
  color: var(--primary-teal);
  border-color: var(--primary-teal);
}

.secondary-button:hover {
  background-color: var(--brainstorming-secondary);
}

.download-all-btn {
  background-color: var(--primary-coral);
}

.download-all-btn:hover {
  background-color: #FF5252;
}

.progress-bar #progress-fill {
  background-color: var(--primary-teal);
}

.question-container {
  border-left-color: var(--primary-teal);
}

.question-context strong {
  color: var(--primary-teal);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 20px 0 20px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
  margin: 0 0 15px 0;
  color: #d93025;
  font-size: 1.3rem;
}

.modal-body {
  padding: 20px;
  line-height: 1.6;
}

.modal-body p {
  margin-bottom: 15px;
  color: #202124;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-footer {
  padding: 0 20px 20px 20px;
  text-align: center;
}

.modal-footer .primary-button {
  min-width: 120px;
}

/* Idea Selection Styles */
.idea-selection-container {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
}

.idea-selection-container h3 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.idea-selection-container p {
  color: #666;
  margin-bottom: 20px;
}

.idea-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.idea-checkbox-item {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.idea-checkbox-item:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.idea-checkbox-item.selected {
  border-color: #28a745;
  background-color: #d4edda;
}

.idea-checkbox-item input[type="checkbox"] {
  margin-right: 12px;
  transform: scale(1.2);
}

.idea-text {
  font-weight: 500;
  line-height: 1.4;
}

.selection-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selection-count {
  color: #666;
  font-size: 0.9rem;
}

/* Idea Tabs Styles */
.idea-tabs {
  margin-bottom: 20px;
}

.tab-header h3 {
  color: #2c3e50;
  margin-bottom: 15px;
}

.tab-buttons {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.idea-tab-btn {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 6px 6px 0 0;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idea-tab-btn:hover {
  background: #e9ecef;
  border-color: #3498db;
}

.idea-tab-btn.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.selected-ideas {
  margin-top: 15px;
}

/* Freewriting Module Styles */
.freewriting-section {
  margin-bottom: 30px;
}

.freewriting-options {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.freewriting-options button {
  min-width: 200px;
}

.freewriting-intro {
  text-align: center;
  padding: 40px 20px;
  background: var(--freewriting-secondary);
  border-radius: 12px;
  border: 2px solid var(--freewriting-primary);
}

.freewriting-intro h3 {
  color: var(--freewriting-primary);
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.freewriting-intro p {
  color: #202124;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.prompt-container {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  border: 2px solid var(--freewriting-secondary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.prompt-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--freewriting-secondary);
}

.prompt-header h4 {
  color: var(--freewriting-primary);
  font-size: 1.4rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.topic-context {
  background: var(--freewriting-secondary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #5f6368;
  border-left: 4px solid var(--freewriting-primary);
}

.freewriting-prompt {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--freewriting-primary);
  margin-bottom: 25px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #202124;
  font-weight: 500;
}

.writing-area {
  margin-bottom: 25px;
}

.freewriting-textarea {
  width: 100%;
  min-height: 250px;
  padding: 20px;
  border: 2px solid #dadce0;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.freewriting-textarea:focus {
  outline: none;
  border-color: var(--freewriting-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.freewriting-textarea.word-count-met {
  border-color: #34a853;
}

.word-count {
  text-align: right;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
}

.word-count.met {
  color: #34a853;
}

.word-count.insufficient {
  color: var(--freewriting-primary);
}

#word-count-status {
  color: #5f6368;
  font-weight: normal;
}

.freewriting-actions {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.freewriting-actions button {
  flex: 1;
  min-width: 140px;
}

.completion-message {
  text-align: center;
  padding: 40px 20px;
  background: var(--freewriting-secondary);
  border-radius: 12px;
  border: 2px solid var(--freewriting-primary);
}

.completion-message h3 {
  color: var(--freewriting-primary);
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.completion-message p {
  color: #202124;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.completion-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.completion-actions .primary-button {
  flex: 1;
  max-width: 220px;
  min-width: 180px;
}

.completion-actions .secondary-button {
  flex: 1;
  max-width: 220px;
  min-width: 180px;
}

/* Edit mode notice */
.edit-notice {
  background: linear-gradient(135deg, #e8f5e8, #d4edda);
  border: 2px solid #34a853;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  text-align: center;
}

.edit-notice p {
  margin: 0;
  color: #0d5f0d;
  font-weight: 500;
  font-size: 0.95rem;
}

/* Change warning notice */
.change-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 2px solid #f39c12;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  text-align: left;
}

.change-warning p {
  margin: 0;
  color: #856404;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
}

.results-header {
  text-align: center;
  margin-bottom: 30px;
}

.results-header h3 {
  color: var(--freewriting-primary);
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.results-header p {
  color: #5f6368;
  font-size: 1.1rem;
}

.analysis-content {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  border: 2px solid var(--freewriting-secondary);
  margin-bottom: 30px;
  max-height: 600px;
  overflow-y: auto;
}

.prompt-response-pair {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--freewriting-secondary);
}

.prompt-response-pair:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.analysis-prompt {
  background: var(--freewriting-secondary);
  padding: 15px 20px;
  border-radius: 8px;
  border-left: 4px solid var(--freewriting-primary);
  margin-bottom: 15px;
  font-weight: 500;
  color: #202124;
}

.analysis-response {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  line-height: 1.6;
  color: #202124;
  white-space: pre-line;
}

.analysis-annotation {
  background: #e8f5e8;
  padding: 15px 20px;
  border-radius: 8px;
  border-left: 4px solid #34a853;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #137b13;
}

.analysis-annotation strong {
  color: #0d5f0d;
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.results-actions button {
  min-width: 200px;
}

#freewriting-progress-fill {
  background-color: var(--freewriting-primary);
}

/* Admin Override functionality removed */

/* Touch-Optimized UI Elements */
@media (max-width: 767px) {
  /* Minimum 44px touch targets for all interactive elements */
  .primary-button, .secondary-button {
    min-height: 48px;
    padding: 14px 20px;
    font-size: 18px;
    border-radius: 8px;
    margin: 8px 4px;
  }
  
  .nav-button {
    min-height: 48px;
    padding: 12px 20px;
    font-size: 16px;
  }
  
  /* Larger delete buttons for better touch targets */
  .project-delete-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
    opacity: 1; /* Always visible on mobile */
  }
  
  /* Touch-friendly form elements */
  .form-group input,
  .form-group select,
  .form-group textarea {
    min-height: 48px;
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 8px;
    border: 2px solid #dadce0;
  }
  
  /* Mobile-optimized text areas */
  .freewriting-textarea {
    min-height: 200px;
    padding: 16px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 8px;
  }
  
  #response-input {
    min-height: 120px;
    padding: 16px;
    font-size: 16px;
  }
  
  /* Better spacing for touch */
  .button-group {
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .freewriting-actions .main-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .freewriting-actions .main-actions button {
    flex: none;
    min-width: auto;
  }
  
  /* Touch feedback for interactive elements */
  .primary-button:active,
  .secondary-button:active,
  .nav-button:active,
  .mobile-nav-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  /* Larger prompt navigation buttons */
  .prompt-nav-btn {
    min-height: 50px;
    min-width: 50px;
    font-size: 16px;
    margin: 4px;
  }
  
  /* Better spacing for checkboxes and labels */
  .idea-checkbox-item {
    padding: 20px;
    margin-bottom: 12px;
  }
  
  .idea-checkbox-item input[type="checkbox"] {
    transform: scale(1.5);
    margin-right: 16px;
  }
  
  /* Progress indicators with better touch targets */
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
  
  /* Mobile modal optimizations */
  .modal-content {
    width: 95%;
    max-width: 95%;
    margin: 20px auto;
    border-radius: 12px;
  }
  
  .modal-header h2 {
    font-size: 1.3rem;
  }
  
  .modal-footer {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .modal-footer button {
    width: 100%;
    min-height: 48px;
  }
  
  /* Mobile new project form optimization */
  #new-project-modal .modal-content {
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }
  
  #new-project-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-group textarea {
    min-height: 100px;
    resize: vertical;
  }
  
  .form-group input[type="number"] {
    max-width: none;
  }
  
  /* Mobile conversation screen optimizations */
  .conversation-container {
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
  }
  
  #conversation-history {
    flex: 1;
    max-height: none;
    overflow-y: auto;
    margin-bottom: 20px;
  }
  
  .message {
    max-width: 90%;
    margin-bottom: 12px;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.4;
  }
  
  .question-container {
    flex-shrink: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    margin: 0 -15px;
    padding: 20px 15px;
    position: sticky;
    bottom: 0;
  }
  
  /* Mobile freewriting optimizations */
  .prompt-navigation {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .prompt-nav-buttons {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: none;
  }
  
  .freewriting-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 20px 0;
    margin: 20px -15px 0;
    border-top: 1px solid #e0e0e0;
    z-index: 10;
  }
  
  .navigation-buttons {
    margin-top: 15px;
    gap: 12px;
  }
  
  /* Summary screen mobile optimization */
  .summary-container {
    padding: 15px;
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.5;
  }
  
  .idea-selection-container {
    padding: 20px 15px;
    margin: 15px 0;
  }
  
  .selection-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .selection-actions button {
    width: 100%;
  }
  
  /* Progress bars mobile optimization */
  .progress-container {
    margin-bottom: 15px;
    padding: 0 5px;
  }
  
  .progress-bar {
    height: 12px;
    border-radius: 6px;
  }
  
  #progress-text,
  #freewriting-progress-text {
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
  }
  
  /* Welcome screen mobile optimization */
  .welcome-content {
    padding: 20px 10px;
  }
  
  .name-input input {
    width: 100%;
    max-width: none;
    font-size: 16px;
    padding: 16px;
    border-radius: 8px;
  }
  
  .resume-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .resume-buttons button {
    width: 100%;
  }
}

/* New Project Modal Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #202124;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 2px rgba(32, 178, 170, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.form-group input[type="number"] {
  max-width: 120px;
}

/* Modal size adjustment for forms */
.modal-content {
  max-width: 600px;
}

#new-project-modal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* New Project Modal Styling */
.project-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.project-option {
  display: flex;
  align-items: center;
  padding: 20px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.project-option:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.project-option.selected {
  border-color: #3498db;
  background: #f8fafb;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.project-option.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8f9fa;
}

.project-option.disabled:hover {
  border-color: #e9ecef;
  box-shadow: none;
}

.option-icon {
  font-size: 2rem;
  margin-right: 15px;
  flex-shrink: 0;
}

.option-content {
  flex: 1;
}

.option-content h3 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
}

.option-content p {
  margin: 0;
  color: #5a6c7d;
  font-size: 0.95rem;
  line-height: 1.4;
}

.option-radio {
  margin-left: 15px;
  flex-shrink: 0;
}

.option-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #3498db;
}

/* Large modal styling */
.large-modal {
  max-width: 700px;
}

/* Modal footer styling */
.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

/* Upload Essay Modal Specific Styling */
#upload-essay-modal .modal-content {
  max-width: 900px;
  width: 85vw;
  margin: 5% auto;
}

#upload-essay-modal .modal-body {
  padding: 30px;
}

#upload-essay-modal .modal-description {
  font-size: 1.1rem;
  color: #5a6c7d;
  margin-bottom: 25px;
  text-align: center;
}

#upload-essay-modal .input-group {
  margin-bottom: 25px;
}

#upload-essay-modal .input-group label {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
  margin-bottom: 8px;
}

#upload-essay-modal .input-group input[type="text"],
#upload-essay-modal .input-group input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

#upload-essay-modal .input-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#upload-essay-modal .input-group textarea {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

#upload-essay-modal .input-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#upload-essay-modal .input-help {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 5px;
  font-style: italic;
}

#upload-essay-modal .word-count-display {
  text-align: right;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

#upload-essay-modal .modal-footer {
  padding: 20px 30px;
  background: white;
  border-top: 2px solid #f1f3f5;
}

#upload-essay-modal .modal-footer .btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#upload-essay-modal .modal-footer .btn-primary {
  background: #e74c3c;
  border: none;
  color: white;
}

#upload-essay-modal .modal-footer .btn-primary:hover:not(:disabled) {
  background: #c0392b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

#upload-essay-modal .modal-footer .btn-primary:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

#upload-essay-modal .modal-footer .btn-secondary {
  background: #6c757d;
  border: none;
  color: white;
}

#upload-essay-modal .modal-footer .btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* Prompt Navigation Styles */
.prompt-navigation {
  background: var(--freewriting-secondary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 2px solid var(--freewriting-primary);
}

.prompt-navigation h4 {
  color: var(--freewriting-primary);
  margin-bottom: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

.prompt-nav-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.prompt-nav-btn {
  background: var(--white);
  border: 2px solid #dadce0;
  border-radius: 8px;
  padding: 8px 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  color: #5f6368;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.prompt-nav-btn:hover {
  border-color: var(--freewriting-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.prompt-nav-btn.current {
  background: var(--freewriting-primary);
  color: white;
  border-color: var(--freewriting-primary);
}

.prompt-nav-btn.completed {
  background: #34a853;
  color: white;
  border-color: #34a853;
}

.prompt-nav-btn.has-draft {
  background: #FFF3E0;
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.prompt-nav-btn.completed.has-draft {
  background: #34a853;
  color: white;
  border-color: #34a853;
}

.prompt-nav-btn::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-orange);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.prompt-nav-btn.has-draft::after {
  opacity: 1;
}

.prompt-nav-btn.completed::after {
  background: #fff;
  opacity: 1;
}

/* Updated Freewriting Actions */
.freewriting-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.main-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.nav-button {
  background: #f8f9fa;
  color: #5f6368;
  border: 1px solid #dadce0;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  flex: 1;
}

.nav-button:hover {
  background: #e9ecef;
  border-color: var(--freewriting-primary);
}

.nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-button:disabled:hover {
  background: #f8f9fa;
  border-color: #dadce0;
}

/* Draft status indicator in textarea */
.freewriting-textarea.has-draft {
  border-color: var(--accent-orange);
  background-color: #fffbf5;
}

/* Draft save indicator */
.draft-save-indicator {
  display: inline-block;
  margin-left: 15px;
  color: #34a853;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Progress indicator updates */
.freewriting-section .progress-container {
  background: var(--freewriting-secondary);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.freewriting-section #freewriting-progress-text {
  color: var(--freewriting-primary);
  font-weight: 600;
  text-align: center;
}

/* Thank You Overlay Styles */
.thank-you-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  animation: fadeIn 0.3s ease-in;
}

.thank-you-content {
  background: white;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.4s ease-out;
}

.thank-you-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #34a853;
}

.thank-you-content h3 {
  color: #202124;
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.thank-you-content p {
  color: #5f6368;
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { 
    opacity: 0;
    transform: translateY(-20px) scale(0.95); 
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1); 
  }
}

/* Story Sculpting Module Styles */
.sculpting-section {
  margin-bottom: 30px;
}

.sculpting-intro {
  text-align: center;
  padding: 40px 20px;
  background: var(--story-sculpting-secondary);
  border-radius: 12px;
  border: 2px solid var(--story-sculpting-primary);
}

.sculpting-intro h3 {
  color: var(--story-sculpting-primary);
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.sculpting-intro p {
  color: #202124;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.freewriting-check {
  background: white;
  padding: 25px;
  border-radius: 8px;
  margin-top: 20px;
  border: 2px solid #34a853;
}

.freewriting-check p {
  color: #137b13;
  margin-bottom: 20px;
}

/* Progress Steps */
.sculpting-progress {
  background: var(--story-sculpting-secondary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

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

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 60%;
  width: 80%;
  height: 2px;
  background: #e0e0e0;
  z-index: 1;
}

.step.active:not(:last-child)::after,
.step.completed:not(:last-child)::after {
  background: var(--story-sculpting-primary);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: var(--story-sculpting-primary);
  color: white;
}

.step.completed .step-number {
  background: #28a745;
  color: white;
}

.step.completed {
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

.step.completed::after {
  content: "Click to revisit";
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c3e50;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.step.completed:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Add a small arrow pointing up to the step */
.step.completed::before {
  content: "";
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #2c3e50;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 99;
}

.step.completed:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.step.completed:hover {
  transform: translateY(-2px);
}

.step.completed:hover .step-number {
  background: #2e8b57;
}

.step.completed .step-label {
  color: #34a853;
  font-weight: 500;
}

.step.completed:hover .step-label {
  color: #2e8b57;
}

.step-label {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

.step.active .step-label,
.step.completed .step-label {
  color: #202124;
  font-weight: 500;
}

/* Step Headers */
.step-header {
  margin-bottom: 25px;
  text-align: center;
}

.step-header h3 {
  color: var(--story-sculpting-primary);
  font-size: 1.6rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.step-header p {
  color: #5f6368;
  font-size: 1.1rem;
}

/* Outline Content - Text Bubbles */
.outline-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin: 30px 0;
}

.outline-bubble {
  background: white;
  border: 2px solid var(--story-sculpting-secondary);
  border-radius: 16px;
  padding: 20px;
  margin-left: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.outline-bubble.ai-message {
  margin-right: 60px;
  border-color: var(--story-sculpting-primary);
  background: var(--story-sculpting-secondary);
}

.outline-bubble.user-message {
  margin-left: 60px;
  background: #f8f9fa;
  border-color: #dadce0;
}

.outline-bubble::before {
  content: '';
  position: absolute;
  top: 20px;
  width: 0;
  height: 0;
  border-style: solid;
}

.outline-bubble.ai-message::before {
  left: -12px;
  border-width: 6px 12px 6px 0;
  border-color: transparent var(--story-sculpting-primary) transparent transparent;
}

.outline-bubble.user-message::before {
  right: -12px;
  border-width: 6px 0 6px 12px;
  border-color: transparent transparent transparent #dadce0;
}

.outline-section {
  margin-bottom: 20px;
}

.outline-section h4 {
  color: var(--story-sculpting-primary);
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.outline-section p {
  color: #202124;
  line-height: 1.6;
  margin-bottom: 8px;
}

.section-content {
  line-height: 1.7;
  color: #202124;
}

.section-content p {
  margin-bottom: 12px;
}

.section-content strong {
  color: var(--story-sculpting-primary);
  font-weight: 600;
}

.section-content em {
  font-style: italic;
  color: #5f6368;
}

.outline-reasoning {
  background: rgba(255, 255, 255, 0.7);
  border-left: 4px solid var(--story-sculpting-primary);
  padding: 15px;
  margin-top: 15px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #5f6368;
}

/* Feedback Forms */
.feedback-options {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin: 20px 0;
  border: 2px solid var(--story-sculpting-secondary);
}

.feedback-category h4 {
  color: var(--story-sculpting-primary);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.feedback-category label {
  display: block;
  margin-bottom: 12px;
  color: #202124;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.feedback-category label:hover {
  background: var(--story-sculpting-secondary);
}

.feedback-category input[type="checkbox"] {
  margin-right: 12px;
  transform: scale(1.2);
}

.detailed-feedback {
  margin: 20px 0;
}

.detailed-feedback label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: #202124;
}

.detailed-feedback textarea {
  width: 100%;
  min-height: 120px;
  padding: 15px;
  border: 2px solid #dadce0;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.detailed-feedback textarea:focus {
  outline: none;
  border-color: var(--story-sculpting-primary);
  box-shadow: 0 0 0 3px rgba(255, 211, 61, 0.1);
}

/* Draft Content */
.draft-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  border: 2px solid var(--story-sculpting-secondary);
  line-height: 1.8;
  font-size: 16px;
  color: #202124;
  white-space: pre-line;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.draft-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--story-sculpting-secondary);
  padding: 15px 20px;
  border-radius: 8px;
  margin: 10px 0 20px 0;
}

.word-count-info {
  font-weight: 600;
  color: var(--story-sculpting-primary);
}

.source-info {
  font-size: 0.9rem;
  color: #5f6368;
}

/* Analysis Content */
.analysis-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin: 30px 0;
}

.analysis-bubble {
  background: white;
  border: 2px solid var(--story-sculpting-secondary);
  border-radius: 16px;
  padding: 20px;
  margin-left: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.analysis-bubble.ai-message {
  margin-right: 60px;
  border-color: var(--story-sculpting-primary);
  background: var(--story-sculpting-secondary);
}

.analysis-bubble::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -12px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 12px 6px 0;
  border-color: transparent var(--story-sculpting-primary) transparent transparent;
}

.analysis-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--story-sculpting-secondary);
}

.analysis-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.analysis-section h4 {
  color: var(--story-sculpting-primary);
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.analysis-section p {
  color: #202124;
  line-height: 1.6;
  margin-bottom: 10px;
}

.analysis-highlight {
  background: var(--story-sculpting-secondary);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--story-sculpting-primary);
  margin: 15px 0;
}

/* Formatted Content Styles for Markdown-to-HTML Conversion */
.outline-content-formatted,
.analysis-content-formatted {
  color: #202124;
  line-height: 1.6;
  max-width: none;
  background: white;
  border: 2px solid var(--story-sculpting-secondary);
  border-radius: 16px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Brainstorming summary formatting */
.summary-container {
  color: #202124;
  line-height: 1.6;
}

.summary-container h1 {
  color: var(--brainstorming-primary);
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  text-align: center;
}

.summary-container h2 {
  color: var(--brainstorming-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 25px 0 15px 0;
  border-bottom: 2px solid var(--brainstorming-secondary);
  padding-bottom: 8px;
}

.summary-container ul {
  margin: 15px 0;
  padding-left: 25px;
}

.summary-container li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.summary-container strong {
  color: var(--brainstorming-primary);
  font-weight: 600;
}

.outline-content-formatted ul,
.analysis-content-formatted ul {
  margin: 15px 0;
  padding-left: 25px;
}

.outline-content-formatted li,
.analysis-content-formatted li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.outline-content-formatted ul ul,
.analysis-content-formatted ul ul {
  margin: 8px 0;
  padding-left: 20px;
}

.outline-content-formatted h1,
.analysis-content-formatted h1 {
  color: var(--story-sculpting-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 25px 0 15px 0;
  border-bottom: 2px solid var(--story-sculpting-secondary);
  padding-bottom: 8px;
}

.outline-content-formatted h2,
.analysis-content-formatted h2 {
  color: var(--story-sculpting-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 20px 0 12px 0;
}

.outline-content-formatted h3,
.analysis-content-formatted h3 {
  color: var(--story-sculpting-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 15px 0 10px 0;
}

.outline-content-formatted p,
.analysis-content-formatted p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.outline-content-formatted strong,
.analysis-content-formatted strong {
  color: var(--story-sculpting-primary);
  font-weight: 600;
}

.outline-content-formatted em,
.analysis-content-formatted em {
  font-style: italic;
  color: #5f6368;
}

/* Draft content formatting for markdown headers */
.draft-content h1 {
  color: var(--story-sculpting-primary);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 25px 0 15px 0;
  border-bottom: 2px solid var(--story-sculpting-secondary);
  padding-bottom: 8px;
}

.draft-content h2 {
  color: var(--story-sculpting-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 20px 0 12px 0;
}

.draft-content h3 {
  color: var(--story-sculpting-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 15px 0 10px 0;
}

.draft-content strong {
  color: var(--story-sculpting-primary);
  font-weight: 600;
}

.draft-content em {
  font-style: italic;
  color: #5f6368;
}

.draft-content p {
  margin-bottom: 15px;
}

/* Special styling for Story Sculpting sections */
.outline-content-formatted .section-divider {
  border-top: 2px solid var(--story-sculpting-secondary);
  margin: 30px 0 20px 0;
  padding-top: 20px;
}

.outline-content-formatted .why-this-works {
  background: rgba(255, 217, 61, 0.1);
  border-left: 4px solid var(--story-sculpting-primary);
  padding: 15px 20px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.outline-content-formatted .section-header {
  background: var(--story-sculpting-secondary);
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0 15px 0;
}

.outline-content-formatted .section-header h2,
.outline-content-formatted .section-header h3 {
  margin: 0;
  color: var(--story-sculpting-primary);
}

/* Better spacing for nested content */
.outline-content-formatted > h1:first-child {
  margin-top: 0;
}

.outline-content-formatted > h2:first-child {
  margin-top: 0;
}

/* Human Review Reminder */
.human-review-reminder {
  background: linear-gradient(135deg, #e8f5e8, #d4edda);
  border: 2px solid #34a853;
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
}

.reminder-content h4 {
  color: #0d5f0d;
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.reminder-content p {
  color: #137b13;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

.reminder-content strong {
  color: #0d5f0d;
}

/* Step Actions */
.step-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.step-actions button {
  min-width: 180px;
}

/* Mobile Responsive Design */
@media (max-width: 767px) {
  /* Show mobile navigation */
  .mobile-nav-bar {
    display: flex;
  }
  
  /* Adjust app layout for mobile */
  .app-layout {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  
  /* Transform sidebar to mobile slide-up */
  .project-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70vh;
    max-height: 500px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }
  
  .project-sidebar.open {
    transform: translateY(0);
  }
  
  /* Adjust main content for mobile */
  .main-content {
    flex: 1;
    padding-top: 60px; /* Space for mobile nav */
    overflow-y: auto;
    height: calc(100vh - 60px);
  }
  
  .app-container {
    max-width: 100%;
    padding: 15px;
    margin: 0;
  }
  
  /* Mobile-optimized header */
  .header {
    margin-bottom: 20px;
    padding-bottom: 15px;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .header h2 {
    font-size: 1rem;
  }
  
  /* Hide desktop add project button in mobile sidebar */
  .project-sidebar .add-project-btn {
    display: none;
  }
  
  /* Project list adjustments */
  .project-item {
    padding: 20px;
    font-size: 16px;
  }
  
  .project-title {
    font-size: 1rem;
    margin-bottom: 6px;
  }
  
  .project-type {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }
  
  /* Mobile module navigation */
  .module-nav-container {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .module-step {
    flex-direction: row;
    text-align: left;
    padding: 16px;
    min-width: auto;
  }
  
  .module-icon {
    margin-right: 12px;
    margin-bottom: 0;
    font-size: 20px;
  }
  
  .module-arrow {
    display: none;
  }
  
  .module-info {
    flex: 1;
  }
  
  .module-name {
    font-size: 16px;
  }
  
  .module-status {
    font-size: 14px;
  }
}

/* Desktop sidebar toggle functionality */
@media (min-width: 768px) {
  .project-sidebar.sidebar-hidden {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .main-content.sidebar-hidden {
    margin-left: 0;
    transition: margin-left 0.3s ease;
  }
  
  /* Ensure hamburger button styles */
  .mobile-nav-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }
  
  .mobile-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  /* Keep mobile nav bar hidden on desktop by default */
  .mobile-nav-bar {
    display: none;
    background: #1a9b96; /* Darker Teal */
  }
  
  /* Hamburger animation */
  .hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    position: relative;
    transition: background 0.3s ease;
  }
  
  .hamburger::before,
  .hamburger::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    position: absolute;
    transition: transform 0.3s ease;
  }
  
  .hamburger::before {
    top: -6px;
  }
  
  .hamburger::after {
    bottom: -6px;
  }
  
  .sidebar-hidden .hamburger {
    background: transparent;
  }
  
  .sidebar-hidden .hamburger::before {
    transform: rotate(45deg);
    top: 0;
  }
  
  .sidebar-hidden .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
  }
}

/* Tablet Responsive Design */
@media (min-width: 768px) and (max-width: 1023px) {
  .project-sidebar {
    width: 300px;
  }
  
  .app-container {
    max-width: 90%;
    padding: 25px;
  }
  
  .module-nav-container {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .module-step {
    min-width: 140px;
  }
}

/* Existing Story Sculpting Mobile Styles */
@media (max-width: 768px) {
  .progress-steps {
    flex-direction: column;
    gap: 20px;
  }
  
  .step:not(:last-child)::after {
    display: none;
  }
  
  .outline-bubble.ai-message {
    margin-right: 20px;
  }
  
  .outline-bubble.user-message {
    margin-left: 20px;
  }
  
  .step-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .step-actions button {
    min-width: auto;
  }
  
  .draft-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Editing Module Styles */
.draft-check {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #28a745;
}

.draft-status h4 {
  color: #28a745;
  margin-bottom: 8px;
}

.draft-preview-summary {
  margin: 15px 0;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.link-button {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
}

.link-button:hover {
  color: #0056b3;
}

.draft-text {
  background: white;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  line-height: 1.5;
  max-height: 300px;
  overflow-y: auto;
}

.draft-text.collapsed {
  max-height: 100px;
  overflow: hidden;
}

/* Platform Selection Styles */
.platform-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.platform-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.platform-card:hover {
  border-color: #007bff;
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.platform-card.active {
  border-color: #007bff;
  background: #e7f3ff;
  box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.platform-card .platform-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 8px;
  flex-shrink: 0;
}

.platform-card.active .platform-icon {
  background: #007bff;
  color: white;
}

.platform-info h4 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.platform-limit {
  color: #007bff;
  font-weight: 600;
  margin: 0 0 5px 0;
  font-size: 14px;
}

.platform-desc {
  color: #666;
  margin: 0;
  font-size: 13px;
}

/* Add click hint */
.platform-card::after {
  content: "Click to select";
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 11px;
  color: #999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.platform-card {
  position: relative;
}

.platform-card:hover::after {
  opacity: 1;
}

.platform-card.active::after {
  content: "✓ Selected";
  color: #007bff;
  opacity: 1;
}

/* Editing Suggestions Formatting */
.suggestion-section {
  margin-bottom: 30px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  overflow: hidden;
}

.suggestion-header {
  background: #f8f9fa;
  padding: 15px 20px;
  margin: 0;
  border-bottom: 1px solid #e1e4e8;
  color: #24292e;
  font-size: 1.1rem;
}

.before-after-suggestion,
.suggestion-item.before-after {
  border-bottom: 1px solid #f1f3f4;
  padding: 20px;
  transition: background-color 0.2s ease;
  background: #fff;
  border: 2px solid #e1e4e8;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.before-after-suggestion:last-child,
.suggestion-item.before-after:last-child {
  border-bottom: none;
}

.before-after-suggestion:hover,
.suggestion-item.before-after:hover {
  background-color: #f8f9fa;
}

.suggestion-checkbox {
  margin-top: 15px;
  padding: 12px 15px;
  background: #e7f3ff;
  border-radius: 6px;
  border: 1px solid #b8deff;
  border-top: 2px solid #007bff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.suggestion-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.suggestion-checkbox label {
  cursor: pointer;
  font-weight: 600;
  color: #007bff;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  user-select: none;
}

.suggestion-checkbox label:hover {
  color: #0056b3;
  text-decoration: underline;
}

.before-after-content {
  /* Checkbox is now at bottom, no left margin needed */
}

.before-section, .after-section, .why-section {
  margin-bottom: 15px;
}

.before-section h5, .after-section h5, .why-section h5 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.before-section h5 {
  color: #d73a49;
}

.after-section h5 {
  color: #28a745;
}

.why-section h5 {
  color: #6f42c1;
}

.text-content, .explanation-content {
  background: #f6f8fa;
  padding: 12px 15px;
  border-radius: 6px;
  border-left: 4px solid #e1e4e8;
  line-height: 1.5;
  font-family: 'Georgia', serif;
}

.before-section .text-content {
  border-left-color: #d73a49;
}

.after-section .text-content {
  border-left-color: #28a745;
}

.explanation-content {
  border-left-color: #6f42c1;
  font-style: italic;
  background: #f8f4ff;
}

/* Contextual Suggestions with Context Lines */
.contextual-suggestion {
  font-family: 'Georgia', serif;
  line-height: 1.6;
}

.contextual-suggestion .context-line {
  padding: 4px 8px;
  color: #6a737d;
  background: #f6f8fa;
  border-left: 2px solid #e1e4e8;
  margin: 2px 0;
  font-size: 0.95em;
}

.contextual-suggestion .change-line.highlighted {
  padding: 8px 12px;
  background: #fff5b4;
  border-left: 4px solid #d4a72c;
  margin: 4px 0;
  font-weight: 500;
  color: #24292e;
  border-radius: 4px;
}

.before-section .contextual-suggestion .change-line.highlighted {
  background: #ffeef0;
  border-left-color: #d73a49;
}

.after-section .contextual-suggestion .change-line.highlighted {
  background: #dcffe4;
  border-left-color: #28a745;
}

/* Visual separator between context and changes */
.contextual-suggestion .context-line:first-child,
.contextual-suggestion .context-line:last-child {
  border-radius: 3px;
}

/* Suggestions Loading State - Updated to match JavaScript structure */
.suggestions-loading {
  text-align: center;
  padding: 40px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e1e4e8;
}

.suggestions-loading .loading-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.suggestions-loading p {
  margin: 0;
  color: #666;
  font-size: 14px;
  text-align: center;
}

.suggestions-loading small {
  color: #999;
  font-size: 12px;
  display: block;
  margin-top: 5px;
}

/* Update loading-spinner to match our standard */
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e9ecef;
  border-left-color: #1a9b96;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

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

/* Fallback suggestions styling */
.fallback-suggestions {
  padding: 20px;
  background: #fff9e6;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  margin: 20px 0;
}

.raw-suggestions {
  line-height: 1.6;
  color: #333;
}

.raw-suggestions h4, .raw-suggestions h5 {
  margin: 15px 0 10px 0;
  color: #2c3e50;
}

.code-block {
  background: #f8f9fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 15px;
  margin: 10px 0;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Text difference highlighting */
.text-removed {
  background-color: #ffeef0;
  color: #d73a49;
  text-decoration: line-through;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 500;
}

.text-added {
  background-color: #e6ffed;
  color: #28a745;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Special styling for accuracy section with highlights */
.before-after-suggestion .text-content {
  line-height: 1.7;
  font-size: 14px;
}

.before-after-suggestion .text-removed,
.before-after-suggestion .text-added {
  display: inline;
  margin: 0 1px;
}

/* Code diff-style view */
.diff-view {
  background: #f8f9fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  margin: 15px 0;
  overflow: hidden;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
}

.diff-line {
  display: flex;
  align-items: flex-start;
  padding: 8px 12px;
  line-height: 1.5;
  border-bottom: 1px solid #e1e4e8;
}

.diff-line:last-child {
  border-bottom: none;
}

.diff-removed {
  background-color: #ffeef0;
  color: #d73a49;
}

.diff-added {
  background-color: #e6ffed;
  color: #28a745;
}

.diff-marker {
  display: inline-block;
  width: 20px;
  text-align: center;
  font-weight: bold;
  margin-right: 8px;
  flex-shrink: 0;
  user-select: none;
}

.diff-content {
  flex: 1;
  font-family: 'Georgia', serif;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Enhanced highlighting within diff content */
.diff-content .text-removed {
  background-color: rgba(215, 58, 73, 0.2);
  color: inherit;
  text-decoration: line-through;
  padding: 1px 2px;
  border-radius: 2px;
}

.diff-content .text-added {
  background-color: rgba(40, 167, 69, 0.2);
  color: inherit;
  font-weight: 600;
  padding: 1px 2px;
  border-radius: 2px;
}

/* Explanation section styling */
.why-section {
  margin-top: 15px;
  padding: 15px;
  background: #f8f4ff;
  border-left: 4px solid #6f42c1;
  border-radius: 0 6px 6px 0;
}

.why-section h5 {
  margin: 0 0 8px 0;
  color: #6f42c1;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.why-section .explanation-content {
  background: transparent;
  border: none;
  padding: 0;
  font-style: italic;
  color: #5a5a5a;
  line-height: 1.5;
}

/* Final Essay Complete Section Styles */
.final-essay-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  padding: 15px;
  background: #17a2b8;
  border-radius: 8px;
  border: 2px solid #138496;
}

.final-stat {
  text-align: center;
  color: white;
  flex: 1;
  max-width: 120px;
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 3px;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.95;
  font-weight: 500;
}

.final-essay-container {
  margin: 30px 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.final-essay-text {
  padding: 30px;
  font-family: 'Georgia', serif;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  background: white;
  border: none;
  min-height: 300px;
}

.final-essay-text p {
  margin: 0 0 20px 0;
  text-align: justify;
  text-indent: 20px;
}

.final-essay-text p:first-child {
  text-indent: 0;
}

.final-essay-text p:last-child {
  margin-bottom: 0;
}

/* Word Count Warning Styles */
.word-count-warning {
  margin: 0 0 20px 0;
  padding: 15px 20px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-left: 4px solid #ff6b35;
  border-radius: 8px;
}

.warning-content h4 {
  margin: 0 0 10px 0;
  color: #856404;
  font-size: 1.1rem;
}

.warning-content p {
  margin: 0;
  color: #856404;
  line-height: 1.5;
}

.warning-link {
  color: #17a2b8;
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}

.warning-link:hover {
  color: #138496;
  text-decoration: none;
}

/* Word Count Optimization Features */
.word-savings {
  margin: 10px 0;
  text-align: center;
}

.savings-badge {
  background: #28a745;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

/* Word Count Suggestion Headers */
.suggestion-item.before-after .suggestion-header {
  border-bottom: 2px solid #e1e4e8;
  padding-bottom: 12px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.suggestion-item.before-after .suggestion-header h5 {
  color: #24292e;
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
}

.word-savings-badge {
  background: #28a745;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.savings-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Before/After Comparison */
.before-after-comparison {
  margin-bottom: 20px;
}

.before-section, .after-section {
  margin-bottom: 15px;
}

.before-section h6, .after-section h6 {
  color: #666;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.before-section h6 {
  color: #d73a49;
}

.after-section h6 {
  color: #28a745;
}

.text-content {
  background: #f8f9fa;
  padding: 12px 15px;
  border-radius: 6px;
  border-left: 4px solid #e1e4e8;
  line-height: 1.6;
  font-size: 14px;
}

.before-section .text-content {
  border-left-color: #d73a49;
}

.after-section .text-content {
  border-left-color: #28a745;
}

/* Suggestion Footer with Checkbox */
.suggestion-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e1e4e8;
}

.suggestion-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.suggestion-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.suggestion-toggle .checkmark {
  font-weight: 600;
  color: #0366d6;
  font-size: 0.95rem;
}

/* Real-time word count status styling */
.over-limit {
  color: #dc3545 !important;
  font-weight: 600;
}

.under-limit {
  color: #ffc107 !important;
  font-weight: 600;
}

.perfect-limit {
  color: #28a745 !important;
  font-weight: 600;
}

/* Word savings summary */
.savings-total {
  color: #28a745;
  font-weight: 600;
  font-size: 1rem;
}

.no-savings {
  color: #6c757d;
  font-style: italic;
}

/* Word Count Summary Box */
.word-count-summary {
  background: #e7f3ff;
  border: 2px solid #17a2b8;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.word-count-summary h4 {
  margin: 0 0 15px 0;
  color: #17a2b8;
  font-size: 1.2rem;
}

.word-count-summary p {
  margin: 8px 0;
  color: #333;
  font-size: 1rem;
}

.savings-preview {
  color: #6c757d;
  font-style: italic;
  font-size: 0.9rem !important;
}

/* Prompt Recommendations Styling */
.prompt-suggestions {
  margin: 30px 0;
}

.prompt-suggestions h4 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.prompt-list {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.prompt-recommendation {
  margin-bottom: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  border-radius: 0 8px 8px 0;
  transition: all 0.3s ease;
}

.prompt-recommendation:hover {
  background: #e7f3ff;
  border-left-color: #0056b3;
  transform: translateX(5px);
}

.prompt-recommendation:last-child {
  margin-bottom: 0;
}

.prompt-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
}

.prompt-number {
  background: #007bff;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 50%;
  min-width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prompt-title-section {
  flex: 1;
}

.prompt-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.4;
  font-weight: 600;
}

.prompt-score {
  background: #28a745;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  display: inline-block;
}

.prompt-section {
  margin-bottom: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.section-title {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #007bff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

.evidence-list {
  /* Container for evidence items */
}

.evidence-item {
  margin: 8px 0;
  padding: 10px 15px;
  background: white;
  border-radius: 6px;
  border-left: 3px solid #28a745;
  font-style: italic;
  color: #444;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.prompt-explanation {
  margin-top: 10px;
  padding: 15px;
  background: white;
  border-radius: 6px;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid #e0e0e0;
}

.prompt-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.section-header {
  margin: 20px 0 10px 0;
  color: #333;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 2px solid #007bff;
  padding-bottom: 5px;
}

/* Final reminder and completion styles */
.final-reminder {
  margin: 30px 0;
}

.reminder-box {
  background: linear-gradient(135deg, #ffeaa7, #fab1a0);
  padding: 25px;
  border-radius: 12px;
  border-left: 5px solid #e17055;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.reminder-box h4 {
  margin: 0 0 15px 0;
  color: #2d3436;
  font-size: 1.2rem;
}

.reminder-box p {
  margin: 0;
  color: #2d3436;
  line-height: 1.6;
}

.completion-celebration {
  text-align: center;
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.celebration-message h3 {
  margin: 0 0 15px 0;
  color: #2d3436;
  font-size: 1.5rem;
  font-weight: bold;
}

.celebration-message p {
  margin: 0;
  color: #2d3436;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.6;
}

/* Custom Notification System */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.custom-notification {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 350px;
  font-weight: 500;
}

.custom-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.custom-notification.success {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.custom-notification.error {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.custom-notification.warning {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #212529;
}

.custom-notification.info {
  background: linear-gradient(135deg, #17a2b8, #007bff);
}

.notification-icon {
  font-size: 1.2em;
  flex-shrink: 0;
}

.notification-message {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2em;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0;
  margin-left: 8px;
  flex-shrink: 0;
}

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

/* Word Count Optimization Section Styles */
.optimization-tip {
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
}

.optimization-tip p {
  margin: 0;
  color: #0c5460;
  font-size: 0.95rem;
  line-height: 1.5;
}

.wordcount-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 25px 0;
  padding: 20px;
  background: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wordcount-stat {
  text-align: center;
  color: white;
  flex: 1;
  max-width: 140px;
}

.wordcount-stat .stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wordcount-stat .stat-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  font-weight: 500;
}

/* Special styling for over/under status */
.wordcount-stat:last-child .stat-number {
  font-size: 2rem;
}

.wordcount-stat:last-child .stat-label {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Mobile responsive adjustments for final section */
@media (max-width: 768px) {
  .final-essay-stats {
    flex-direction: column;
    gap: 20px;
    padding: 15px;
  }
  
  .final-stat {
    max-width: none;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .final-essay-text {
    padding: 20px;
    font-size: 15px;
    line-height: 1.7;
  }
  
  .prompt-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .prompt-number {
    align-self: flex-start;
  }
  
  /* Word count mobile adjustments */
  .wordcount-stats {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  .wordcount-stat {
    max-width: none;
  }
  
  .wordcount-stat .stat-number {
    font-size: 1.8rem;
  }
}

/* Iterative Word Count Optimization Styles */
.word-count-continue {
  margin: 30px 0;
  padding: 25px;
  background: #f8f9fa;
  border: 2px solid #17a2b8;
  border-radius: 12px;
  text-align: center;
}

.optimization-progress {
  margin-bottom: 25px;
}

.optimization-progress h4 {
  margin: 0 0 15px 0;
  color: #17a2b8;
  font-size: 1.3rem;
  font-weight: 600;
}

.progress-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.progress-stat {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.progress-stat .stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #333;
}

.progress-stat .stat-label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.progress-stat.words-reduced .stat-value {
  color: #28a745;
}

.progress-stat.current-count .stat-value {
  color: #17a2b8;
}

.progress-stat.still-over .stat-value {
  color: #dc3545;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  margin: 20px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745 0%, #17a2b8 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.continue-options {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
  flex-wrap: wrap;
}

.continue-btn {
  padding: 12px 24px;
  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: 8px;
}

.continue-btn.primary {
  background: #17a2b8;
  color: white;
}

.continue-btn.primary:hover {
  background: #138496;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.continue-btn.secondary {
  background: #6c757d;
  color: white;
}

.continue-btn.secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.optimization-message {
  margin: 15px 0;
  padding: 15px;
  background: #e7f3ff;
  border-left: 4px solid #17a2b8;
  border-radius: 0 8px 8px 0;
  color: #333;
  line-height: 1.5;
}

.iteration-counter {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

/* Mobile responsive adjustments for iterative word count */
@media (max-width: 768px) {
  .progress-stats {
    flex-direction: column;
    gap: 15px;
  }
  
  .progress-stat {
    min-width: auto;
  }
  
  .continue-options {
    flex-direction: column;
    align-items: center;
  }
  
  .continue-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .word-count-continue {
    padding: 20px 15px;
  }
  
  .optimization-progress h4 {
    font-size: 1.2rem;
  }
  
  .progress-stat .stat-value {
    font-size: 1.5rem;
  }
}

/* Collapsible Prompt Recommendations */
.prompt-recommendations-header {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.prompt-recommendations-header:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.prompt-recommendations-header h4 {
  margin: 0 0 8px 0;
  color: #495057;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prompt-recommendations-header .prompt-hint {
  margin: 0;
  color: #6c757d;
  font-size: 0.9em;
}

.toggle-indicator {
  font-size: 0.8em;
  color: #6c757d;
  transition: transform 0.3s ease;
}

.prompt-suggestions-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.3s ease;
  opacity: 1;
}

.prompt-suggestions-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: -20px;
}

/* Enhanced essay formatting */
.final-essay-container p {
  margin-bottom: 1.2em;
  line-height: 1.7;
  text-align: justify;
}

.final-essay-container p:last-child {
  margin-bottom: 0;
}

/* Editing step backtrack functionality */
.editing-progress .step.clickable {
  cursor: pointer !important;
  transition: all 0.2s ease;
}

.editing-progress .step.clickable:hover {
  transform: translateY(-2px);
}

.editing-progress .step.completed.clickable:hover .step-number {
  background: #2e8b57;
  transform: scale(1.1);
}

/* Editing notifications */
.editing-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

.editing-notification.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.editing-notification.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.editing-notification.info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

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

.notification-message {
  font-weight: 500;
  margin-right: 10px;
}

.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

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

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile responsive adjustments for notifications */
@media (max-width: 768px) {
  .editing-notification {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
  
  @keyframes slideInRight {
    from {
      transform: translateY(-100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* API Error Message Styling */
.api-error-message {
  background: #fff3cd;
  border: 2px solid #ffeaa7;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  max-width: 600px;
  margin: 20px auto;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

.api-error-message h4 {
  color: #856404;
  margin: 0 0 15px 0;
  font-size: 1.3rem;
}

.api-error-message p {
  color: #664d03;
  margin: 0 0 25px 0;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.error-actions button {
  min-width: 180px;
}

.error-details {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 10px;
  margin-top: 15px;
}

.error-details small {
  color: #6c757d;
  font-family: monospace;
  word-break: break-all;
}

@media (max-width: 768px) {
  .error-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .error-actions button {
    min-width: auto;
    width: 100%;
    max-width: 280px;
  }
}

/* Idea Selection Styles - Single Selection with Radio Buttons */
.idea-selection-container {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
  border: 2px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.idea-selection-container h3 {
  color: var(--brainstorming-primary);
  font-size: 1.4rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

.selection-instructions {
  background: #f8f9fa;
  border-left: 4px solid var(--brainstorming-primary);
  padding: 20px;
  margin-bottom: 25px;
  border-radius: 0 8px 8px 0;
}

.selection-instructions p {
  margin: 0 0 15px 0;
  line-height: 1.6;
  color: #333;
}

.selection-instructions p:last-child {
  margin-bottom: 0;
}

.clone-suggestion {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.idea-radio-buttons {
  margin: 25px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.idea-radio-item {
  position: relative;
  background: white;
  border: 3px solid #e9ecef;
  border-radius: 16px;
  padding: 24px 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.idea-radio-item:hover {
  border-color: #1a9b96;
  box-shadow: 0 4px 16px rgba(26, 155, 150, 0.15);
  transform: translateY(-2px);
}

.idea-radio-item.selected {
  border-color: #1a9b96;
  background: linear-gradient(135deg, #f8fdfc, #e8f7f6);
  box-shadow: 0 4px 20px rgba(26, 155, 150, 0.2);
}

.idea-radio-item input[type="radio"] {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 3px solid #dee2e6;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.idea-radio-item input[type="radio"]:checked {
  border-color: #1a9b96;
  background: #1a9b96;
}

.idea-radio-item input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.idea-radio-item label {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #2c3e50;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}

.idea-radio-item.selected label {
  color: #1a9b96;
  font-weight: 600;
}

/* Add a subtle animation when selecting */
.idea-radio-item input[type="radio"]:checked {
  animation: radioSelect 0.3s ease;
}

@keyframes radioSelect {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
  .idea-radio-item {
    padding: 20px 20px;
    min-height: 70px;
    gap: 15px;
  }
  
  .idea-radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
  }
  
  .idea-radio-item label {
    font-size: 1rem;
  }
}

.idea-option {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.idea-option:hover {
  border-color: var(--brainstorming-primary);
  background: #f8fffe;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 155, 150, 0.15);
}

.idea-option.selected {
  border-color: var(--brainstorming-primary);
  background: #e6f7f6;
  box-shadow: 0 4px 12px rgba(26, 155, 150, 0.2);
}

.idea-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.idea-option .radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #dee2e6;
  border-radius: 50%;
  display: inline-block;
  margin-right: 15px;
  position: relative;
  transition: all 0.3s ease;
  vertical-align: top;
  margin-top: 2px;
}

.idea-option:hover .radio-custom {
  border-color: var(--brainstorming-primary);
}

.idea-option.selected .radio-custom {
  border-color: var(--brainstorming-primary);
  background: var(--brainstorming-primary);
}

.idea-option.selected .radio-custom::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.idea-content {
  display: inline-block;
  width: calc(100% - 35px);
  vertical-align: top;
}

.idea-title {
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.idea-description {
  color: #666;
  line-height: 1.5;
  font-size: 0.95rem;
}

.selection-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.selection-count {
  color: #666;
  font-size: 0.9rem;
  font-style: italic;
}

/* Clone button styling */
#clone-for-different-idea {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#clone-for-different-idea:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .idea-selection-container {
    padding: 20px;
    margin: 20px 0;
  }
  
  .selection-instructions {
    padding: 15px;
  }
  
  .idea-option {
    padding: 15px;
  }
  
  .selection-actions {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .selection-actions button {
    width: 100%;
  }
}

/* Version Toggle Styles */
.version-toggle {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.toggle-header h4 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.toggle-header p {
  margin: 0 0 15px 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.version-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.version-btn {
  padding: 8px 16px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  background: white;
  color: #495057;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.version-btn:hover {
  border-color: #007bff;
  background: #f8f9fa;
}

.version-btn.active {
  border-color: #007bff;
  background: #007bff;
  color: white;
}

.version-btn.active:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.version-stats {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  background: white;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.stat-comparison {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-label {
  font-weight: 600;
  color: #495057;
}

.stat-change {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.stat-change.positive {
  color: #28a745;
  background: #d4edda;
}

.stat-change.negative {
  color: #dc3545;
  background: #f8d7da;
}

.stat-change.neutral {
  color: #6c757d;
  background: #e9ecef;
}

/* Intrigue Guidance Styles */
.suggestion-item.intrigue-guidance {
  background: #fff;
  border: 2px solid var(--editing-primary, #ff7043);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(255, 112, 67, 0.1);
}

.suggestion-item.intrigue-guidance .suggestion-header {
  border-bottom: 2px solid var(--editing-secondary, #FFF3E0);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.suggestion-item.intrigue-guidance .suggestion-header h5 {
  color: var(--editing-primary, #ff7043);
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
}

.guidance-content {
  margin-bottom: 15px;
}

.guidance-section {
  margin-bottom: 15px;
}

.guidance-section h6 {
  color: var(--editing-primary, #ff7043);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.guidance-text {
  background: var(--editing-secondary, #FFF3E0);
  padding: 12px 15px;
  border-radius: 8px;
  line-height: 1.5;
  color: #333;
  border-left: 4px solid var(--editing-primary, #ff7043);
}

.guidance-note {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px 15px;
  margin-top: 15px;
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.guidance-note em {
  font-style: normal;
  color: #495057;
}

/* Mobile responsiveness for intrigue guidance */
@media (max-width: 768px) {
  .suggestion-item.intrigue-guidance {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .guidance-section h6 {
    font-size: 0.9rem;
  }
  
  .guidance-text {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .guidance-note {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* Opening and Closing Guidance Styles */
.guidance-item {
  background: #fff;
  border: 2px solid #007bff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.guidance-moment {
  margin-bottom: 12px;
  padding: 12px 15px;
  background: #f8f9ff;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.guidance-moment strong {
  color: #007bff;
  font-weight: 600;
}

.guidance-why {
  margin-bottom: 12px;
  padding: 12px 15px;
  background: #e6f3ff;
  border-radius: 8px;
}

.guidance-why strong {
  color: #0056b3;
  font-weight: 600;
}

.guidance-suggestion {
  padding: 12px 15px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
}

.guidance-suggestion strong {
  color: #b8860b;
  font-weight: 600;
}

/* Mobile responsiveness for guidance items */
@media (max-width: 768px) {
  .guidance-item {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .guidance-moment,
  .guidance-why,
  .guidance-suggestion {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}


/* Sidebar Layout Fixes - Work with External CSS */
.sidebar {
  display: flex \!important;
  flex-direction: column \!important;
}

.sidebar .sidebar-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Critical for Firefox */
}

.sidebar .sidebar-content .sidebar-section:first-child {
  flex-shrink: 0; /* Don't shrink the navigation section */
}

.sidebar .sidebar-content .projects-section {
  flex: none; /* Don't grow - let natural content size determine height */
  display: flex;
  flex-direction: column;
}

.sidebar .projects-container-expanded {
  flex: none !important;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  /* Remove individual scrolling - let sidebar-content handle it */
}

/* Allow natural content flow within sidebar - removed aggressive scroll blocking */
#projects-list,
.projects-list,
.category-projects,
.projects-container-expanded {
  /* Allow natural height and scrolling behavior */
  overflow: visible;
  max-height: none;
  height: auto;
}

/* Custom scrollbar styling for project containers if needed */
#projects-list::-webkit-scrollbar,
.projects-list::-webkit-scrollbar,
.category-projects::-webkit-scrollbar,
.projects-container-expanded::-webkit-scrollbar {
  width: 6px;
}

#projects-list::-webkit-scrollbar-track,
.projects-list::-webkit-scrollbar-track,
.category-projects::-webkit-scrollbar-track,
.projects-container-expanded::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

#projects-list::-webkit-scrollbar-thumb,
.projects-list::-webkit-scrollbar-thumb,
.category-projects::-webkit-scrollbar-thumb,
.projects-container-expanded::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* Text Size Overrides - More Specific */
.sidebar .projects-header-compact > h4 {
  font-size: 1.2rem \!important;
  font-weight: 600;
  margin: 0;
}

.sidebar .projects-header-compact .project-btn-compact {
  font-size: 0.85rem \!important;
  padding: 6px 12px;
}

/* Footer Button Alignment - REMOVED conflicting column layout */

/* Responsive height optimizations for smaller screens */
@media (max-height: 800px) {
  /* For laptops with limited vertical space (like 11" screens) */
  body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  
  .app-layout {
    height: auto;
    min-height: 100vh;
  }
  
  .sidebar,
  .project-sidebar {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  .main-content {
    min-height: calc(100vh - 60px);
    height: auto;
  }
  
  /* Compact sidebar content for limited height */
  .sidebar-section {
    margin-bottom: 10px;
  }
  
  .sidebar-section h3 {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }
  
  .project-btn-text,
  .nav-item {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  
  .nav-dashboard {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-bottom: 6px;
  }
  
  /* Reduce header padding */
  .sidebar-header {
    padding: 15px 20px;
  }
  
  .sidebar-brand {
    font-size: 1.1rem;
  }
  
  /* Compact module progress indicators */
  .module-item {
    padding: 8px 12px;
    margin-bottom: 4px;
  }
  
  .progress-bar {
    height: 6px;
  }
  
  /* Reduce upgrade banner size */
  .upgrade-banner {
    padding: 8px 15px;
    max-height: 60px;
  }
  
  .upgrade-banner-text {
    font-size: 12px;
  }
  
  .upgrade-banner-button {
    padding: 6px 15px;
    font-size: 12px;
  }
}

@media (max-height: 700px) {
  /* Even more compact for very small heights */
  .sidebar-header {
    padding: 10px 15px;
  }
  
  .sidebar-section {
    margin-bottom: 8px;
    padding: 0 15px;
  }
  
  .project-btn-text,
  .nav-item {
    padding: 4px 10px;
    font-size: 0.85rem;
  }
  
  .nav-dashboard {
    padding: 4px 10px;
    font-size: 0.75rem;
    margin-bottom: 4px;
  }
  
  .current-project-header h3 {
    font-size: 1.1rem !important;
    margin-bottom: 6px !important;
  }
  
  .module-item {
    padding: 6px 10px;
    margin-bottom: 2px;
  }
  
  /* Further reduce upgrade banner */
  .upgrade-banner {
    padding: 6px 10px;
    max-height: 45px;
  }
  
  .upgrade-banner-text {
    font-size: 11px;
  }
  
  .upgrade-banner-button {
    padding: 4px 12px;
    font-size: 11px;
  }
  
  /* Compact main content areas */
  .page-header {
    padding: 15px 20px;
  }
  
  .page-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }
  
  .page-header p {
    font-size: 0.9rem;
  }
}

@media (max-height: 600px) {
  /* Ultra-compact for very constrained heights */
  .sidebar-header {
    padding: 8px 12px;
  }
  
  .sidebar-brand {
    font-size: 1rem;
  }
  
  .current-project-header h3 {
    font-size: 1rem !important;
  }
  
  .sidebar-section h3 {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }
  
  .module-item {
    padding: 4px 8px;
    margin-bottom: 1px;
  }
  
  .project-btn-text,
  .nav-item {
    padding: 3px 8px;
    font-size: 0.8rem;
  }
  
  .nav-dashboard {
    padding: 3px 8px;
    font-size: 0.7rem;
    margin-bottom: 3px;
  }
  
  /* Hide upgrade banner on very small heights */
  .upgrade-banner {
    display: none;
  }
  
  /* Adjust main content top spacing when banner is hidden */
  .main-content {
    padding-top: 0;
  }
  
  /* Compact form elements */
  .form-group {
    margin-bottom: 12px;
  }
  
  .form-control,
  textarea {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  /* Compact buttons */
  .btn,
  .primary-button,
  .secondary-button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  /* Compact modals */
  .modal-header {
    padding: 12px 20px;
  }
  
  .modal-body {
    padding: 15px 20px;
  }
  
  .modal-footer {
    padding: 12px 20px;
  }
}

/* Additional fixes for fixed height issues on small screens */
@media (max-height: 800px) and (orientation: landscape) {
  /* Landscape mode on small screens needs special handling */
  .page-header {
    padding: 10px 20px;
  }
  
  .page-header h1 {
    font-size: 1.6rem;
    margin-bottom: 5px;
  }
  
  .content-section {
    padding: 15px 20px;
  }
  
  /* Reduce textarea min-heights */
  textarea.form-control {
    min-height: 80px;
  }
}

/* JavaScript-applied height classes for dynamic responsiveness */
body.height-small {
  /* Applied when viewport height <= 800px */
}

body.height-small .sidebar-section {
  margin-bottom: 10px;
}

body.height-small .sidebar-section h3 {
  font-size: 0.8rem;
  margin-bottom: 8px;
}

body.height-small .upgrade-banner {
  padding: 8px 15px;
  max-height: 60px;
}

body.height-very-small {
  /* Applied when viewport height <= 700px */
}

body.height-very-small .sidebar-header {
  padding: 10px 15px;
}

body.height-very-small .sidebar-section {
  margin-bottom: 8px;
  padding: 0 15px;
}

body.height-very-small .upgrade-banner {
  padding: 6px 10px;
  max-height: 45px;
}

body.height-ultra-small {
  /* Applied when viewport height <= 600px */
}

body.height-ultra-small .upgrade-banner {
  display: none;
}

body.height-ultra-small .sidebar-header {
  padding: 8px 12px;
}

body.height-ultra-small .sidebar-section h3 {
  font-size: 0.75rem;
  margin-bottom: 6px;
}

/* Upgrade Button Styling */
.upgrade-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.upgrade-btn:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
  color: white !important;
  text-decoration: none !important;
}

.upgrade-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3) !important;
}

/* Responsive adjustments for upgrade button */
@media (max-height: 800px) {
  .upgrade-btn {
    padding: 6px 12px !important;
    font-size: 0.9rem !important;
  }
}

@media (max-height: 700px) {
  .upgrade-btn {
    padding: 4px 10px !important;
    font-size: 0.85rem !important;
  }
}

@media (max-height: 600px) {
  .upgrade-btn {
    padding: 3px 8px !important;
    font-size: 0.8rem !important;
  }
}



/* =============================================================================
   CUSTOM MODAL SYSTEM FOR ALERTS AND CONFIRMATIONS
   ============================================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(-30px) scale(0.9);
  transition: all 0.3s ease;
}

.modal-overlay.active .custom-modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 24px 24px 0 24px;
  text-align: center;
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}

.modal-icon.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.modal-icon.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.modal-icon.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.modal-icon.info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.modal-icon.confirm {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.modal-body {
  padding: 16px 24px 24px 24px;
  text-align: center;
}

.modal-message {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  white-space: pre-line;
}

.modal-actions {
  padding: 0 24px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-btn:active {
  transform: translateY(0);
}

.modal-btn.primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.modal-btn.primary:hover {
  background: linear-gradient(135deg, #5a6fd8, #6b4190);
}

.modal-btn.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.modal-btn.success:hover {
  background: linear-gradient(135deg, #0d9668, #047857);
}

.modal-btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.modal-btn.danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.modal-btn.secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.modal-btn.secondary:hover {
  background: #e5e7eb;
}

/* Responsive modal */
@media (max-width: 768px) {
  .custom-modal {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header,
  .modal-body,
  .modal-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-btn {
    width: 100%;
  }
}

/* Brainstorming restart note */
.restart-brainstorming-note {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  border-radius: 4px;
}

.restart-brainstorming-note p {
  margin: 0;
  color: #495057;
  font-size: 0.9rem;
  line-height: 1.4;
}

.restart-brainstorming-note strong {
  color: #2c3e50;
}

/* Session restart note */
.restart-session-note {
  margin-top: 15px;
  padding: 12px;
  background: #f8f9fa;
  border-left: 4px solid #6c757d;
  border-radius: 4px;
}

.restart-session-note p {
  margin: 0;
  color: #495057;
  font-size: 0.85rem;
  line-height: 1.4;
}

.restart-session-note strong {
  color: #2c3e50;
}

/* Height responsive */
@media (max-height: 700px) {
  .modal-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
    margin-bottom: 12px;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
  
  .modal-header,
  .modal-body,
  .modal-actions {
    padding-top: 16px;
    padding-bottom: 16px;
  }
}

/* ============================================================================= 
   FIXES FOR SMALL SCREENS (11" laptops and similar)
   ============================================================================= */

/* Responsive sidebar adjustments */
@media (max-height: 768px) {
  .sidebar-header {
    padding: 15px 20px;
  }
  
  .sidebar-footer .logout-btn,
  .sidebar-footer .download-all-btn,
  .sidebar-footer .help-btn,
  .sidebar-footer .account-btn {
    padding: 5px 10px !important;
    font-size: 11px !important;
    min-height: 26px !important;
  }
}

/* Very small screens */
@media (max-height: 600px) {
  .sidebar-header {
    padding: 12px 15px;
  }
  
  .sidebar-footer {
    padding: 6px 12px !important;
  }
  
  .sidebar-footer .logout-btn,
  .sidebar-footer .download-all-btn,
  .sidebar-footer .help-btn,
  .sidebar-footer .account-btn {
    padding: 4px 8px !important;
    font-size: 10px !important;
    min-height: 24px !important;
  }
}

/* Fix content being cut off at top on page load */
.main-content {
  scroll-padding-top: 20px;
}

/* Ensure content starts at top on page load */
body.loaded .main-content {
  scroll-behavior: auto;
}

/* Character counter states for brainstorming */
.character-counter.insufficient {
  color: #ef4444;
  font-weight: 600;
}

.character-counter.warning {
  color: #f59e0b;
  font-weight: 600;
}

.character-counter.danger {
  color: #dc2626;
  font-weight: 700;
}

/* Minimum word indicator for brainstorming */
.min-indicator {
  margin-left: 10px;
  font-size: 0.9em;
  color: #6b7280;
  font-weight: normal;
}

.character-counter.insufficient .min-indicator {
  color: #ef4444;
  font-weight: 600;
}

