@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* --- Reset & Globals --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Courier New', Courier, monospace; /* Classic monospace, like old terminals/zines */
  background-color: #000;
  color: #eee;
  line-height: 1.5;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  letter-spacing: 0.04em; /* a little spacing, like printed text */
  font-size: 16px;
  user-select: text;
}

/* Links */
a {
  color: #0ff;
  text-decoration: underline dotted;
  cursor: pointer;
}

a:hover,
a:focus {
  color: #0cc;
  text-decoration: underline solid;
  outline: none;
}

/* Buttons */
.button {
  font-family: 'Courier New', Courier, monospace;
  background: none;
  border: 2px solid #0ff;
  padding: 8px 18px;
  color: #0ff;
  cursor: pointer;
  display: inline-block;
  margin-top: 15px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button:hover,
.button:focus {
  background-color: #0ff;
  color: #000;
  outline: none;
}

/* --- Headings: Retro Pixel Fonts --- */

h1, h2, h3, .createtitle {
  font-family: 'Press Start 2P', monospace;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  color: #0ff;
  text-shadow:
    2px 2px 0 #000,
    4px 4px 4px rgba(0, 255, 255, 0.3);
}

/* Article subheading uses typewriter font for nostalgic vibe */
.article-header h2 {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: #aaa;
  margin-top: 5px;
  text-transform: none;
  text-shadow: none;
}

/* Paragraphs and meta text */
p {
  margin-bottom: 1.2em;
  max-width: 100%;
  color: #ddd;
}

.meta {
  font-family: 'VT323', monospace;
  font-size: 12px;
  font-style: italic;
  color: #777;
  margin-bottom: 10px;
}

/* --- Layout --- */
header, main, footer {
  max-width: 900px;
  margin: 0 auto 40px auto;
  padding: 0 10px;
}

/* --- Navigation --- */
.nav-list {
  list-style-type: none;
  margin-bottom: 20px;
}

.nav-list li {
  margin-bottom: 12px;
  font-weight: bold;
  font-size: 16px;
}

.nav-list a {
  font-weight: normal;
}

/* --- Home page main title: The Lost Net --- */
body.main header h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 3rem;
  text-align: center;
  color: #0ff;
  letter-spacing: 0.2em;
  margin: 40px 0 30px 0;
  text-shadow:
    3px 3px 0 #000,
    5px 5px 8px rgba(0, 255, 255, 0.6);
}

/* --- Article Header: cleaner, cooler retro style --- */
.article-header {
  border-bottom: 3px dotted #0ff;
  margin-bottom: 25px;
  padding-bottom: 10px;
  text-align: center;
  background: none;
  box-shadow: none;
  border-radius: 0;
}

.article-header h1 {
  background: none;
  padding: 0;
  display: inline;
  font-size: 2.2rem;
  text-shadow:
    1px 1px 0 #000,
    2px 2px 4px rgba(0, 255, 255, 0.6);
}

/* --- Images --- */
.featured-photo,
.article-photo {
  display: flex;
  justify-content: center;      /* centers the image horizontally */
  align-items: center;          /* centers vertically (in case of captions) */
  flex-direction: column;       /* keeps caption below the image */
  margin: 20px auto;
  border: 2px solid #0ff;
  border-radius: 6px;
  background-color: #111;
  box-shadow: 0 0 15px #0ff44c88;
  width: fit-content;           /* box resizes automatically to the image width */
  max-width: 90%;               /* prevent overflow on smaller screens */
}

/* Make images scale responsively within the box */
.featured-photo img,
.article-photo img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}


/* --- Two column text layout --- */
.two-column {
  display: flex;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.two-column > p {
  flex: 1 1 300px;
  min-width: 280px;
  color: #ddd;
}

/* --- Footer Chat Box --- */
footer {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 10px 80px 10px; /* bottom padding so chatbox doesn’t cover content */
}

/* Chatbox sits in normal flow (never overlaps menu) */
#chat-box {
  position: static;
  width: 100%;
  background-color: #111;
  border: 2px solid #0ff;
  padding: 15px;
  box-shadow: 0 -3px 10px rgba(0, 255, 255, 0.8);
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  color: #ccc;
  user-select: text;
  border-radius: 6px;
  margin-top: 20px;
}

/* --- Mobile Typography & Layout Tweaks --- */
@media (max-width: 480px) {
  body {
    padding: 12px;
    font-size: 15px;
  }
  h1 {
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    text-shadow:
      1px 1px 0 #000,
      2px 2px 4px rgba(0, 255, 255, 0.3);
  }
  h2 { font-size: 1.25rem; letter-spacing: 0.08em; }
  h3 { font-size: 1.05rem; letter-spacing: 0.06em; }

  .button { padding: 6px 12px; font-size: 14px; }
  .nav-list li { font-size: 14px; }

  /* Forum specific helpers present in forum.html */
  #userBar { flex-wrap: wrap; gap: 6px; }
  .thread-title { font-size: 1.1rem; }

  /* Create page helper classes */
  .url-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .template-grid .small { font-size: 12px; padding: 5px 8px; }
}


textarea, #previewArea {
  width: 90%;
  box-sizing: border-box; /* includes padding and border in width */
  margin: 0 auto;          /* centers element horizontally */
  display: block;
}


#chat-box p {
  margin: 5px 0;
}

.chat-messages {
  height: 100px;
  overflow-y: auto;
  border: 1px solid #0ff;
  background-color: #000;
  padding: 8px;
  margin-bottom: 8px;
  font-family: monospace;
  font-size: 13px;
  color: #0ff;
}

#chat-box input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #0ff;
  border-radius: 3px;
  background-color: #000;
  color: #0ff;
  font-family: monospace;
  font-size: 14px;
}

/* --- Responsive & Desktop Only --- */

/* Responsive adjustments */
@media screen and (max-width: 900px) {
  body {
    max-width: 100%;
    padding: 14px;
    font-size: 15px;
  }
  header, main, footer {
    max-width: 100%;
    margin: 0 0 30px 0;
    padding: 0 6px;
  }
  body.main header h1 {
    font-size: 2.2rem;
    letter-spacing: 0.12em;
    margin: 24px 0 18px 0;
  }
  h1, h2, h3 { letter-spacing: 0.1em; }
  .two-column { flex-direction: column; gap: 12px; }
  #chat-box { box-sizing: border-box; }
}

@media screen and (max-width: 600px) {
  body { font-size: 14px; padding: 12px; }
  .button { padding: 10px 16px; font-size: 0.95rem; }
  img, video, iframe { max-width: 100%; height: auto; }
}

/* Container to center content vertically and horizontally */
body.landing > div:first-child {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 400px;
  width: 90vw;
  padding: 10px;
  z-index: 100;
}

/* The button is already inline-block; add margin auto for centering */
body.landing a.button {
  margin: 0 auto;
  display: inline-block;
  font-size: 1.2rem;
  padding: 12px 24px;
}

/* Bottom message fixed with opacity */
.footer_index {
  position: fixed;
  bottom: 20px;
  width: 100%;
  text-align: center;
  font-family: 'Courier New', monospace;
  color: #0ff;
  opacity: 0.4;
  font-size: 14px;
  pointer-events: none;
  user-select: none;
  z-index: 90;
}
