/* Hero Chat Demo Styles */
.hero-chat-demo {
  width: 100%;
  height: 500px;
  position: relative;
}

.chat-demo-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  height: 100%;
  background: rgba(26, 26, 26, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Chat Interface */
.chat-interface {
  display: flex;
  flex-direction: column;
  background: rgba(15, 15, 15, 0.6);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

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

.chat-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
}

.chat-context {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'SF Mono', monospace;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Chat Messages */
.chat-message {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.chat-message.animate-in {
  opacity: 1;
  transform: translateY(0);
}

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

.chat-message.user .message-text {
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 12px 12px 0 12px;
  max-width: 80%;
  font-size: 0.875rem;
}

.chat-message.ai .message-content {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.ai-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.chat-message.ai .message-text {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 0 12px 12px 12px;
  max-width: 80%;
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-message.ai.final .message-text {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

/* Typing Animation */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 0.5rem 1rem;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: typing-dot 1.4s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-dot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Chat Input */
.chat-input-container {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.typing-indicator {
  position: absolute;
  bottom: 100%;
  left: 1rem;
  right: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.typing-indicator.hidden {
  display: none;
}

.cursor {
  animation: blink 1s infinite;
  color: #8b5cf6;
  font-weight: normal;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.chat-input-wrapper {
  position: relative;
}

.chat-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
  cursor: text;
}

/* Preview Pane */
.preview-pane {
  display: flex;
  flex-direction: column;
  background: #f9fafb;
  position: relative;
  overflow: hidden;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgb(3, 7, 18);
  border-bottom: 2px solid rgba(250, 204, 21, 0.5);
}

.preview-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.preview-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 9999px;
  font-size: 0.75rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #facc15;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-dot.published {
  background: #22c55e;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-text {
  color: #facc15;
  font-weight: 500;
}

.preview-status:has(.status-dot.published) {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.preview-status:has(.status-dot.published) .status-text {
  color: #22c55e;
}

.preview-title {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.preview-controls {
  display: flex;
  gap: 0.5rem;
}

.preview-control {
  padding: 0.25rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.preview-control:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.preview-control.active {
  color: #8b5cf6;
}

.preview-control svg {
  width: 16px;
  height: 16px;
}

.preview-content {
  flex: 1;
  overflow: auto;
  padding: 2rem;
  background: white;
}

/* Preview Page States */
.preview-page {
  min-height: 100%;
}

.page-placeholder {
  animation: fadeIn 0.3s ease;
}

.placeholder-header {
  height: 40px;
  background: #e5e7eb;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.placeholder-content {
  space-y: 1rem;
}

.placeholder-line {
  height: 12px;
  background: #f3f4f6;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.placeholder-line.short {
  width: 60%;
}

/* Page Creating Animation */
.page-creating {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  position: relative;
}

.creating-animation {
  position: relative;
  width: 80px;
  height: 80px;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 2px solid #8b5cf6;
  border-radius: 50%;
  animation: pulseRing 2s ease-out infinite;
}

.pulse-ring.delay-1 {
  animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
  animation-delay: 1s;
}

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Page Structure */
.page-structure {
  animation: slideUp 0.5s ease;
}

.page-header-skeleton {
  height: 60px;
  background: #e5e7eb;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.page-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-skeleton {
  height: 100px;
  background: #f3f4f6;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.section-skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Page with Content */
.page-with-content {
  animation: fadeIn 0.5s ease;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.content-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.content-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 1rem 0;
}

.content-placeholder {
  height: 60px;
  background: #e5e7eb;
  border-radius: 4px;
}

.content-placeholder.short {
  width: 70%;
}

.team-placeholder {
  height: 120px;
  background: #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.content-section.highlight {
  background: rgba(139, 92, 246, 0.05);
  border: 2px solid transparent;
  animation: highlightSection 1s ease;
}

.content-section.highlighting {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

@keyframes highlightSection {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Image Placeholder */
.image-placeholder {
  width: 100%;
  height: 100%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: all 0.3s ease;
}

.image-placeholder.loaded {
  background: transparent;
}

.team-photo {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0e7ff 0%, #cffafe 100%);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.5s ease;
}

.team-photo::before {
  content: 'Team Photo';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 600;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Page List */
.page-list {
  animation: fadeIn 0.5s ease;
}

.page-list h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.pages-to-update {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pages-to-update li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #4b5563;
  transition: all 0.3s ease;
}

.pages-to-update li.scanning {
  background: rgba(139, 92, 246, 0.1);
  color: #6b21a8;
  transform: translateX(4px);
}

.pages-to-update li.completed {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.page-icon {
  font-size: 1rem;
}

/* Progress Bar */
.update-progress {
  margin-top: 1.5rem;
  animation: fadeIn 0.3s ease;
}

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

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6 0%, #06b6d4 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

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

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

.animate-in {
  animation: slideUp 0.5s ease;
}

/* Scenario Indicators */
.scenario-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.scenario-indicators .indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.scenario-indicators .indicator:hover {
  background: rgba(255, 255, 255, 0.3);
}

.scenario-indicators .indicator.active {
  background: #8b5cf6;
  width: 24px;
  border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .chat-demo-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  
  .chat-interface {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 640px) {
  .hero-chat-demo {
    height: 400px;
  }
  
  .chat-demo-wrapper {
    gap: 0;
  }
  
  .preview-pane {
    display: none;
  }
  
  .chat-interface {
    border-bottom: none;
  }
  
  .chat-message.user .message-text,
  .chat-message.ai .message-text {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}