/* Base layout */
body {
  background: #fcfede; /* Pale lemon yellow #f4fcd7; #f5ff67; #f9ffa3; #fbffc3; #fdffd9; #feffee f4fcd7*/
  color: #222;
  /*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;*/
  line-height: 1.65;
  margin: 0;
  padding: 2em;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

/* Headings: use a serif for personality */
h2, h3, h4 {
  font-family: "Courier New", Courier, monospace;
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-weight: heavy;
  line-height: 1.2;
}

h1 {
  font-family: "arial", sans-serif;
  font-size: 2.2em;
  margin-top: 0;
}

/* Paragraphs: clean and readable */
p {
  font-size: 1em;
  margin-bottom: 1.2em;
}

/* Links: playful but clear */
a {
  color: #000000;
  text-decoration: none;
  border-bottom: 1px dotted #aaa;
}

a:hover {
  color: #000;
  border-bottom: 1px solid #333;
}

/* Code blocks: courier and cozy */
code, pre {
  font-family: "Courier New", Courier, monospace;
  background: #fff9cc;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.95em;
}

pre {
  padding: 1em;
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* Images: centered and max width */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  border: 1px solid #eee;
  border-radius: 4px;
}

/* Dates and tags: quiet, tidy */
.date {
  color: #555;
  font-size: 0.9em;
  font-family: monospace;
  margin-bottom: 1em;
}

.tags {
  font-size: 0.9em;
  color: #666;
  margin-top: 1em;
}

.tags a {
  background: #f5f5dc;
  padding: 0.2em 0.4em;
  margin-right: 0.4em;
  border-radius: 4px;
  text-decoration: none;
  color: #444;
  font-family: monospace;
}

.tags a:hover {
  background: #eaeac4;
}

/* Dividers */
hr {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 2em 0;
}

/* Navigation at bottom of posts */
nav {
  display: flex;
  justify-content: space-between;
  font-size: 0.95em;
  margin-top: 2em;
  font-family: monospace;
}

#feed {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr; /* single column */
}

.post {
  width: 100%;      /* fills available space */
  max-width: 600px; /* caps at desktop width */
  height: 800px;    /* fixed height */
  margin: auto;     /* center horizontally */
}

.post img {
  width: 100%;      /* image fills post width */
  height: auto;     /* maintain aspect ratio */
  display: block;
}

.post .words {
  display: none;
  font-size: 0.9em;
  margin-top: 0.5em;
}

/* Modal overlay */
#authModal {
  display: none;               /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1em;
  box-sizing: border-box;
}

/* Modal content box */
#authModalContent {
  background: white;
  padding: 2em;
  max-width: 400px;
  width: 100%;
  border-radius: 10px;
  position: relative;
  box-sizing: border-box;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Inputs and buttons inside modal */
#authModalContent input {
  width: 100%;
  padding: 0.8em;
  margin-bottom: 1em;
  font-size: 1em;
  box-sizing: border-box;
}

#authModalContent button {
  width: 100%;
  padding: 0.8em;
  margin-bottom: 0.5em;
  font-size: 1em;
  cursor: pointer;
  border: none;
  background: black;
  color: white;
  border-radius: 5px;
}

#authModalContent button:hover {
  background: #333;
}

/* Close button */
#closeAuthModal {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  width: auto;
  padding: 0.2em 0.5em;
  font-size: 1.2em;
  background: #555;
  border-radius: 50%;
}

#closeAuthModal:hover {
  background: #333;
}

/* Responsive tweaks for very small screens */
@media (max-width: 350px) {
  #authModalContent {
    padding: 1em;
  }

  #authModalContent input,
  #authModalContent button {
    font-size: 0.9em;
    padding: 0.6em;
  }
}
