/* Agate+ Gemini-to-HTML Stylesheet */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  padding-top: 3rem; /* Add padding to account for the fixed header */
  background-color: #f9f9f9;
}

/* Fixed header styling */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #444;
  color: white;
  text-align: center;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.fixed-header p {
  margin: 0;
  font-size: 0.9rem;
}

h1, h2, h3 { margin-top: 1.5em; margin-bottom: 0.5em; }
h1 { color: #1a5fb4; }
h2 { color: #2a7de1; }
h3 { color: #808080; }
p { margin: 0.7em 0; }
ul { margin: 0.7em 0; }

a { color: #1c71d8; text-decoration: none; }
a:hover { text-decoration: underline; }

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

pre {
  background-color: #f0f0f0;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

pre[data-alt]::before {
  content: attr(data-alt);
  display: block;
  font-style: italic;
  margin-bottom: 0.5em;
  color: #666;
}

.content {
  margin-bottom: 2em;
}

.footer {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #ddd;
  font-size: 0.9em;
  color: #666;
}

.link-icon {
  display: inline-block;
  margin-right: 0.3em;
  vertical-align: middle;
}

.http-icon {
  color: #1c71d8; /* Dark blue for HTTP links */
}

.gemini-icon {
  color: #ff7b00; /* Orange for Gemini links */
}

.image-icon {
  color: #2E8B57; /* Sea green for image links */
}

.gemini-link {
  display: block;
  margin: 0.3em 0;
  padding: 0.2em 0;
}

.inline-image {
  margin: 1em 0;
  text-align: center;
  width: 95%;
  display: block;
}

.inline-image img {
  max-width: 95%;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  object-fit: contain;
}

.directory-item {
  display: block;
  padding: 0.3em 0;
  border-bottom: 1px solid #eee;
}

.directory-item:last-child {
  border-bottom: none;
}

.directory-item-icon {
  margin-right: 0.5em;
}

.directory-header {
  margin-bottom: 1em;
}

.directory-parent {
  margin-bottom: 1em;
  font-weight: bold;
}
