/* Global Layout */
body {
  margin: 0 auto;
  padding: 16px;
  background-color: #ffffff;
  color: #000000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

hr {
  clear: both;
  border: none;
  height: 1px;
  background-color: #ccc;
  margin: 20px 0;
}

/* Typography & Links */
a {
  color: #007BFF;
  text-decoration: none;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

blockquote blockquote {
  margin-left: 0;
  padding-left: 10px;
  border-left: 3px solid #ccc;
  color: #555;
}

/* Form Layout */
form {
  margin-bottom: 0;
}

/* Container for the post form area */
.postarea {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  padding: 10px;
}

/* Style for the form's table */
.postarea table {
  margin: 0 auto;
  text-align: left;
  width: 100%;
  border-spacing: 8px;
}

/* Post form labels */
.postblock {
  vertical-align: top;
  padding: 6px 10px;
  background-color: #e0e0e0;
  font-weight: bold;
  color: #000;
  border-radius: 4px;
  margin-bottom: 6px;
  width: 120px;
  white-space: nowrap;
}

/* Individual reply containers */
.reply {
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  padding: 12px;
  margin: 10px auto;
  max-width: 700px;
  border-radius: 6px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Reply message spacing */
.reply .message {
  margin-bottom: 6px;
}

.reply .message {
  margin-bottom: 6px;
}

/* Thumbnails & Attachments */
.thumb {
  border: none;
  float: left;
  margin: 4px 20px;
  border-radius: 4px;
}

.nothumb {
  float: left;
  background: #eee;
  border: 2px dashed #aaa;
  text-align: center;
  margin: 4px 20px;
  padding: 1em;
  color: #888;
}

/* Special Effects */
.spoiler {
  text-decoration: none;
  color: transparent;
  text-shadow: 0 0 8px #000;
}

.spoiler:hover {
  color: inherit;
  text-shadow: none;
}

/* Hover & Popups */
.hoverpost {
  display: block;
  clear: both;
  padding: 10px;
  background-color: #f0f0f0;
  border: 1px solid #bbb;
  border-radius: 4px;
}

/* Text Highlights */
.reflink a {
  color: inherit;
  text-decoration: none;
}

.reflink a:hover {
  font-weight: bold;
  color: #007BFF;
}

/* AA Art Support */
.aa {
  white-space: pre;
  text-align: left;
  font-family: monospace;
}

/* Comment metadata */
.postername {
  color: #007BFF;
  font-weight: bold;
}

.postertrip {
  color: #888;
}

.filesize {
  margin-left: 20px;
  font-size: 0.85em;
  color: #444;
}

filetitle,
.replytitle {
  display: block;
  font-weight: bold;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  font-size: 1.1em;
  margin-bottom: 6px;
  max-width: 100%;
}

.omittedposts,
.abbrev {
  color: #777;
  font-style: italic;
}

.banmessage {
  color: #FF0000;
  font-weight: bold;
}

/* Delete & Management */
.userdelete {
  float: right;
  text-align: center;
  white-space: nowrap;
}

.doubledash {
  float: left;
  font-size: 1.5em;
  margin-right: 8px;
  color: #666;
}

.managebutton {
  font-size: 14px;
  height: 30px;
  margin: 4px;
  background: #007BFF;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
}

.managebutton:hover {
  background: #0056b3;
}

/* Admin Panel */
.adminbar {
  text-align: right;
  padding: 10px;
  color: #666;
}

.adminbar a {
  color: #007BFF;
  margin-left: 10px;
}

.adminbar a:hover {
  color: #0056b3;
}

.managehead {
  background-color: #eaeaea;
  color: #000000;
  padding: 10px;
  font-weight: bold;
}

/* Catalog Post */
.catalogpost {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
  text-overflow: ellipsis;
  min-width: 120px;
  background: #f7f7f7;
  margin: 5px;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Login Form */
.login {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
  width: 320px;
  margin: 40px auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Rules List */
.rules {
  padding-left: 10px;
  font-size: 0.9em;
  color: #333;
}

.rules ul {
  margin: 0;
  padding-left: 15px;
}

/* Footer */
.footer {
  clear: both;
  text-align: center;
  color: #999;
  padding: 20px;
  font-size: 0.85em;
}

/* Misc */
#switchStylesheet {
  margin-left: 8px;
}

#newreplies {
  margin: 8px 0 0 2px;
  font-weight: bold;
  color: #007BFF;
}

.topnav {
  text-align: center;
  margin: 5px 0;
  font-size: 13px;
}

.topnav a {
  color: inherit;
  text-decoration: none;
  padding: 0 4px;
}

.topnav a:hover {
  text-decoration: underline;
}

.logo {
  text-align: center;
  margin: 10px 0;
}

.logo .board-title,
.logo .board-desc {
  display: inline-block;
  margin: 0 4px;
}

@media (max-width: 768px) {
  /* First Line: name, trip, time */
  .postername,
  .postertrip,
  .posttime {
    display: inline;
    white-space: nowrap;
    margin-right: 6px;
    vertical-align: middle;
    font-size: 0.95em;
  }

  /* Second Line: No., [Reply], backlinks */
  .reflink,
  .reflink a,
  .abbrev {
    display: inline;
    white-space: nowrap;
    margin-right: 6px;
    vertical-align: middle;
    font-size: 0.95em;
    color: #444;
  }

  /* Subject / Thread Title */
  .replytitle {
    display: inline-block;
    width: 56ch;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: top;
    font-weight: bold;
    margin-bottom: 6px;
  }

  /* Container Alignment */
  .postarea,
  .reply {
    width: 100%;
    max-width: 100%;
    margin: 10px auto;
    box-sizing: border-box;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .postarea table {
    width: 100%;
    table-layout: fixed;
    border-spacing: 8px 12px;
  }

  .postarea td,
  .postarea input,
  .postarea textarea,
  .postarea select {
    width: 100%;
    display: block;
    margin: 6px 0;
    box-sizing: border-box;
    text-align: left;
  }

  /* Thumbnail Blocks */
  .thumb,
  .nothumb {
    display: inline-block;
    margin: 4px 10px 8px 0;
    text-align: left;
  }

  /* Post Message */
  .message {
    margin-bottom: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    text-align: left;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* ASCII Art */
  pre,
  .aa {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
  }

  /* Navigation */
  .topnav,
  .logo,
  .footer,
  .adminbar {
    text-align: center;
    margin: 0 auto;
  }

  /* Submit Buttons */
  input[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    display: block;
  }
}

/* Prevent horizontal scroll on mobile */
body {
  overflow-x: hidden;
}

/* Ensure all content wraps properly */
.message,
.filetitle,
.replytitle,
.postarea,
.reply {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

/* === Frameless Reddit-Like Post Form === */
.postarea {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0;
  margin: 30px auto 20px;
  max-width: 700px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: none !important;
}

/* Form layout */
.postarea table {
  width: 100%;
  border-spacing: 0 16px;
}

/* Labels */
.postarea td.postblock {
  text-align: right;
  padding-right: 14px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
  vertical-align: top;
  width: 100px;
}

/* Input and textarea fields */
.postarea input[type="text"],
.postarea input[type="password"],
.postarea input[type="file"],
.postarea textarea {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fafafa;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.postarea input[type="text"]:focus,
.postarea input[type="password"]:focus,
.postarea textarea:focus {
  border-color: #0079d3;
  background-color: #fff;
  outline: none;
}

/* Textarea sizing */
.postarea textarea {
  min-height: 120px;
  resize: vertical;
}

/* Submit button */
.postarea input[type="submit"] {
  background: #0079d3;
  color: #fff;
  font-weight: bold;
  padding: 10px 18px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease, transform 0.1s ease;
}

.postarea input[type="submit"]:hover {
  background: #005ea6;
  transform: translateY(-1px);
}

/* Any notes or rules */
.postarea .rules {
  font-size: 13px;
  color: #777;
  margin-top: 12px;
}



/* Restored Classic Burichan Post Area */
.postarea {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  padding: 10px;
  background-color: #f0f0f0;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.postarea table {
  margin: 14;
  text-align: left;
  width: 100%;
  border-spacing: 8px;
}

.postblock {
  vertical-align: top;
  padding: 6px 10px;
  background-color: #e0e0e0;
  font-weight: bold;
  color: #000;
  border-radius: 4px;
  margin-bottom: 6px;
  width: 120px;
  white-space: nowrap;
}

/* === Full-width banner/logo stretch === */
.logo {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: auto;
  max-height: 200px; /* adjust as needed */
  object-fit: cover;
  display: block;
}

.banner-carousel {
  width: 100%;
  overflow: hidden;
}

.banner-track {
  display: flex;
}

.banner-track img {
  width: 100vw;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}

/* === Full-Width Image Carousel === */
.banner-carousel {
  position: relative;
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  margin: 0 auto 20px auto;
}

.banner-track {
  display: flex;
  animation: slide 12s infinite;
  width: 300%; /* 3 images */
}

.banner-track img {
  width: 100vw;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}


/* === Full-Width Static Banner === */
.banner-carousel {
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  margin: 0 auto 20px auto;
}

/* === Static Centered Banner Matching Content Width === */
.banner-carousel {
  width: 100%;
  max-width: 900px; /* adjust to match your post area */
  margin: 0 auto 20px auto;
  overflow: hidden;
  border-radius: 4px;
}

.banner-track {
  width: 100%;
}

.banner-track img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
