/* Global reset and base styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

a {
  color: #0066cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Container styles */
.container, main.container {
  max-width: 600px;
  margin: 2em auto;
  padding: 2em;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Home page specific styles */
.home-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2em;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Loading/Analyzing styles */
.loading-container {
  text-align: center;
  padding: 2em 0;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #0066cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1em auto;
}

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

.progress-steps {
  margin-top: 2em;
  text-align: left;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.step {
  padding: 0.8em 1em;
  margin: 0.5em 0;
  border-radius: 5px;
  background: #f8f9fa;
  color: #6c757d;
  transition: all 0.3s ease;
  border-left: 4px solid #dee2e6;
}

.step.active {
  background: #e3f2fd;
  color: #1976d2;
  border-left-color: #2196f3;
  font-weight: 500;
}

.step.completed {
  background: #e8f5e8;
  color: #388e3c;
  border-left-color: #4caf50;
}

.step.completed::after {
  content: " ✓";
  color: #4caf50;
  font-weight: bold;
}

/* Headings */
h1, h2 {
  color: #333;
  margin-top: 0;
}

h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.5em;
  margin-bottom: 1em;
}

/* Forms */
form {
  margin: 1em 0;
}

input[type="text"], textarea, select {
  width: 100%;
  padding: 0.7em;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 0.5em;
  margin-bottom: 1em;
}

input[type="text"]:focus, textarea:focus, select:focus {
  border-color: #0066cc;
  outline: none;
}

/* Buttons */
button, .btn {
  background: #0066cc;
  color: white;
  padding: 0.7em 1.2em;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  margin: 0.5em 0.5em 0.5em 0;
  display: inline-block;
  text-decoration: none;
  min-width: 120px;
  text-align: center;
  box-sizing: border-box;
}

button:hover, .btn:hover {
  background: #0052a3;
  color: white;
}

/* Ensure all buttons in button row have consistent styling */
.button-row button,
.button-row .btn {
  background: #0066cc;
  color: white;
  padding: 0.7em 1.2em;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  min-width: 120px;
  text-align: center;
  box-sizing: border-box;
}

.button-row button:hover,
.button-row .btn:hover {
  background: #0052a3;
  color: white;
}

/* Analysis output */
#analysis-output {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1.5em;
  margin: 1em 0;
  border-radius: 8px;
}

/* Markdown rendering styles for analysis output */
#analysis-output h1,
#analysis-output h2,
#analysis-output h3,
#analysis-output h4,
#analysis-output h5,
#analysis-output h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
}

#analysis-output h1 { font-size: 1.8em; color: #333; }
#analysis-output h2 { font-size: 1.5em; color: #444; }
#analysis-output h3 { font-size: 1.3em; color: #555; }

#analysis-output p {
  margin: 1em 0;
  line-height: 1.6;
}

#analysis-output ul, #analysis-output ol {
  margin: 1em 0;
  padding-left: 2em;
}

#analysis-output li {
  margin: 0.5em 0;
}

#analysis-output strong {
  font-weight: bold;
}

#analysis-output em {
  font-style: italic;
}

#analysis-output code {
  background: #f4f4f4;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}

#analysis-output blockquote {
  border-left: 4px solid #ddd;
  margin: 1em 0;
  padding-left: 1em;
  color: #666;
}

/* Button row with consistent sizing */
.button-row {
  margin: 2em 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  align-items: center;
}

.button-row button,
.button-row .btn,
.button-row form {
  margin: 0;
}

.button-row form {
  display: inline-block;
}

/* Chat specific styles */
.chat-box {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1em;
  margin: 1em 0;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 8px;
}

.message {
  margin: 0.5em 0;
  padding: 0.5em;
  border-radius: 6px;
}

.user-msg {
  color: #0066cc;
  background: #e3f2fd;
}

.ai-msg {
  color: #333;
  background: #f5f5f5;
}

/* Example text */
.example {
  color: #666;
  font-size: 14px;
  margin-top: 0.5em;
}

/* HR styling */
hr {
  border: none;
  height: 1px;
  background: #ddd;
  margin: 2em 0;
}

/* About Page Styles */
.about-page {
  max-width: 700px;
}

.creator-heading {
  color: #006994 !important; /* Ocean Blue */
  text-align: center;
  font-size: 2.2em;
  margin-bottom: 1.5em;
  font-weight: bold;
}

.creator-section {
  text-align: center;
  margin-bottom: 2em;
}

.creator-photo {
  width: 300px;
  height: 400px;
  object-fit: cover;
  margin: 0 auto 0.5em auto;
  display: block;
  border: 4px solid #006994;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,105,148,0.2);
}

.photo-caption {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
  margin-bottom: 1.5em;
}

.intro-text {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.intro-text p {
  margin-bottom: 1em;
}

.section-divider {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, #006994, transparent);
  margin: 3em 0;
}

.social-section {
  text-align: center;
  margin: 2em 0;
}

.social-section h2 {
  color: #006994;
  margin-bottom: 1.5em;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5em;
  flex-wrap: wrap;
}

.social-link {
  display: inline-block;
  padding: 0.8em 1.5em;
  background: #f8f9fa;
  border: 2px solid #006994;
  border-radius: 25px;
  text-decoration: none;
  color: #006994;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 100px;
  text-align: center;
}

.social-link:hover {
  background: #006994;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,105,148,0.3);
}

.about-footer {
  text-align: center;
  margin: 2em 0;
}

.footer-quote {
  font-style: italic;
  font-size: 1.1em;
  color: #555;
  border-left: 4px solid #006994;
  padding-left: 1em;
  margin: 1.5em auto;
  max-width: 500px;
  text-align: left;
  background: #f8f9fa;
  padding: 1.5em;
  border-radius: 8px;
}

.back-home {
  text-align: center;
  margin-top: 3em;
}

/* Responsive design */
@media (max-width: 768px) {
  .container, main.container, .home-container {
    margin: 1em;
    padding: 1em;
  }
  
  .button-row {
    flex-direction: column;
  }
  
  .social-links {
    flex-direction: column;
    align-items: center;
  }
  
  .social-link {
    width: 200px;
  }
  
  .creator-photo {
    width: 160px;
    height: 120px;
  }
  
  button, .btn {
    width: 100%;
    margin: 0.5em 0;
  }
}

/* Additional utility classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1em; }
.mt-2 { margin-top: 2em; }
.mb-1 { margin-bottom: 1em; }
.mb-2 { margin-bottom: 2em; }

/* PDF-specific styling */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  #analysis-output {
    background: white !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .button-row {
    display: none !important;
  }
  
  a {
    color: black !important;
    text-decoration: underline !important;
  }
}

/* Ensure content is visible for PDF generation */
#analysis-output * {
  visibility: visible !important;
  opacity: 1 !important;
}
