/** === Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/** === Base === */
body {
  font-family: "Times New Roman", serif;
  font-size: 14px;
  background-color: #ffffff;
  background-image: url('/img/assets/bg.jpg');
  background-repeat: repeat;
  background-size: 50px;
  color: #000;
  line-height: 1.5;
}

.topnav {
  background-color: transparent;
  padding: 8px 0;
  text-align: center;
  border-bottom: 4px double #000;
  border-top: 4px double #000;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
}

.topnav::after {
  content: "";
  display: block;
  height: 2px;
  background: repeating-linear-gradient(90deg, #000, #000 10px, transparent 10px, transparent 20px);
  margin-top: 6px;
}

.topnav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.topnav li {
  display: inline-block;
}

.topnav a {
  color: #000;
  text-decoration: none;
  font-weight: bold;
  background: #f8f8f8;
  padding: 6px 12px;
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0 #999, inset 2px 2px 0 #fff;
  font-size: 13px;
  text-shadow: 1px 1px 0 #fff;
}

.topnav a:hover {
  background-color: #ffff99;
  color: #000;
  box-shadow: inset 2px 2px 0 #999, inset -2px -2px 0 #fff;
}

.navbox {
    display: flex;
    flex-direction: column;
}
a {
  color: #0000cc;
  text-decoration: underline;
  font-weight: bold;
}

a:hover {
  background-color: #ff0;
  color: #000;
}

.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border: 3px double #000;
  padding: 2px;
}

.header {
  text-align: center;
  padding: 10px 0;
  border-bottom: 4px dotted #000;
}

.header img {
  width: 500px;
}

.main {
  display: flex;
  margin-top: 10px;
  gap: 10px;
}

.sidebar,
#sidebar-right {
  width: 180px;
  background-color: #FEF6FF;
  border: 2px solid #000;
  border-image: linear-gradient(to bottom right, #000 33%, transparent 0%) 1;
  padding: 10px;
  font-size: 13px;
}

#sidebar-right {
  background-color: #F9FFF5;
  border-image: linear-gradient(to top left, #000 33%, transparent 0%) 1;
}

.sidebar h3,
.sidebar-box h3 {
  background-color: #000;
  color: #fff;
  font-size: 13px;
  padding: 4px 6px;
  border: 2px outset #fff;
  margin-bottom: 8px;
}

.sidebar ul {
  list-style: square;
  padding-left: 18px;
  margin-bottom: 15px;
}

.sidebar-box {
  margin-bottom: 20px;
}

.sidebar-box .banner {
  width: 100%;
  margin-bottom: 6px;
  border: 2px dashed #000;
}

.status-entry {
  background: #ffee99;
  border: 3px groove #cc0;
  margin-bottom: 10px;
  padding: 20px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
}

.status-time {
  font-size: 12px;
  color: #444;
  font-style: italic;
  text-decoration: underline;
}

.status-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.status-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.status-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  color: #333;
  line-height: 1.6;
}

/* === Ads === */
.sidebar-ads-banner, .footer-ads-banner {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
}

.divider-line {
  display: block;
  width: 100%;
  max-height: 20px;
  object-fit: contain;
  margin: 10px 0;
}

.sidebar-ads-banner img, .footer-ads-banner img {
  max-width: 100%;
  border: 2px outset #666;
  margin-bottom: 8px;
}

.footer-ad-label {
  font-size: 11px;
  font-style: italic;
  color: #444;
  margin-bottom: 4px;
}

/* === Content === */
.content {
  flex-grow: 1;
  background-color: #fff;
  padding: 10px 15px;
  border-left: 2px solid #ccc;
  border-right: 2px solid #ccc;
}

/* === Boxes === */
.box {
  background-color: #f9f9ff;
  border: 2px dotted #666;
  padding: 10px;
  margin-bottom: 20px;
}

.box h2, .box h3 {
  font-size: 15px;
  color: #222;
  margin-bottom: 8px;
  border-bottom: 1px dashed #999;
  padding-bottom: 3px;
}

/* === Tables === */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
  background-color: #fff;
}

th, td {
  border: 1px solid #999;
  padding: 6px;
  vertical-align: top;
}

th {
  background-color: #f4f4f4;
  font-weight: normal;
}

/* === Forms === */
input[type="text"], input[type="number"], input[type="file"], select, textarea {
  width: 100%;
  padding: 6px;
  font-size: 13px;
  border: 1px solid #666;
  margin: 5px 0 10px;
  background-color: #fff;
}

textarea {
  resize: vertical;
}

button {
  background: #000;
  color: #fff;
  border: 2px inset #fff;
  padding: 6px 12px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
}

button:hover {
  background: #ffff66;
  color: #000;
  border: 2px inset #000;
}

.encyclopediabox h2 {
    text-align: center;
    vertical-align: middle;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* === Character Wiki Page === */
 .character-wiki {
     max-width: 800px;
     margin: 0 auto;
     padding: 10px;
}
 .character-header {
     text-align: center;
     margin-bottom: 15px;
}
 .admin-edit-link {
     margin-top: 6px;
     text-align: center;
}
 .admin-edit-link a {
     font-size: 12px;
     background: #fffae6;
     padding: 4px 8px;
     border: 1px solid #ccc;
     color: #000;
     text-decoration: none;
}
 .admin-edit-link a:hover {
     background: #fffacc;
}
 .character-body {
     display: flex;
     gap: 20px;
     flex-wrap: wrap;
}
 .character-infobox {
     width: 280px;
     background-color: #f5faff;
     border: 1px solid #aaa;
     padding: 10px;
     font-size: 13px;
     flex-shrink: 0;
}
 .character-infobox table {
     width: 100%;
     border-collapse: collapse;
}
 .character-infobox th, .character-infobox td {
     padding: 6px;
     border: 1px solid #aaa;
}
 .character-infobox th {
     width: 35%;
     background-color: #ddeeff;
     text-align: left;
}
 .character-wiki-img {
     max-width: 100%;
     border: 1px solid #333;
     display: block;
     margin: 0 auto 10px;
}
 .character-bio {
     flex: 1;
     min-width: 280px;
}
 .character-bio h2, .character-bio h3 {
     font-size: 14px;
     color: #003366;
     margin-top: 15px;
     margin-bottom: 6px;
     border-bottom: 1px solid #999;
}
 .character-bio p {
     white-space: pre-wrap;
     margin-bottom: 10px;
}
 .character-gallery {
     margin-top: 20px;
}
 .character-gallery h2 {
     font-size: 15px;
     margin-bottom: 10px;
     color: #003366;
     border-bottom: 1px dashed #999;
}
 .gallery-grid {
     display: flex;
     flex-wrap: wrap;
     gap: 10px;
}
 .gallery-grid img {
     max-width: 150px;
     border: 1px solid #999;
}
 .character-footer-link {
     margin-top: 20px;
     text-align: center;
}
 .character-footer-link a {
     font-weight: bold;
     font-size: 13px;
     color: #0033cc;
     text-decoration: underline;
}

/* === Location Template Specific Styles === */
.location-template {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.location-template .location-map {
  text-align: center;
}

.location-template .location-map img {
  max-width: 100%;
  height: auto;
  border: 2px solid #666;
  margin-bottom: 10px;
}

.location-template .location-info {
  background-color: #f5faff;
  border: 2px dashed #99c;
  padding: 15px;
}

.location-template .location-info h3 {
  font-size: 16px;
  color: #003366;
  margin-bottom: 8px;
  border-bottom: 1px dashed #aac;
}

.location-template .location-info ul {
  list-style-type: square;
  padding-left: 20px;
  margin-top: 10px;
}

.location-template .location-info li {
  margin-bottom: 6px;
}

.location-weather-placeholder {
  background: #eef7ff;
  border: 1px dashed #88aacc;
  padding: 12px;
  font-size: 14px;
  color: #336699;
  text-align: center;
  margin-top: 20px;
}

.weather-widget {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Times New Roman", serif;
  font-size: 14px;
  background-color: #eef7ff;
  border: 1px dashed #88aacc;
  padding: 10px;
  margin-top: 10px;
  text-align: center;
}

.weather-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weather-icon {
  width: 50px;
  height: 50px;
}

.weather-text {
  text-align: left;
}


.map-image {
  text-align: center;
  margin-top: 20px;
}

.map-image img {
  max-width: 100%;
  height: auto;
  border: 2px solid #666;
  background-color: #fdfdfd;
  padding: 4px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}

.map-placeholder {
  width: 100%;
  padding: 60px 10px;
  background-color: #f0f0f0;
  border: 2px dashed #999;
  color: #666;
  font-size: 16px;
  font-style: italic;
  text-align: center;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.05);
}

.species-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.species-main-image img {
  max-width: 100%;
  height: auto;
  border: 2px solid #666;
  margin-bottom: 20px;
}

.species-description,
.species-biology,
.species-traits,
.species-gallery {
  background: #f9f9ff;
  border: 2px dotted #aac;
  padding: 15px;
}

.species-biology h3,
.species-traits h3,
.species-gallery h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #003366;
  border-bottom: 1px dashed #aac;
}

.traits-grid {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.traits-grid th,
.traits-grid td {
  border: 1px solid #99c;
  padding: 6px 10px;
}

.traits-grid th {
  background: #eef2ff;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-grid img {
  max-width: 200px;
  border: 1px solid #ccc;
}

/* === New Species Page Textbook Layout === */
/* === Species Page Layout (Textbook Style) === */

.species-page {
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: #fdfdfd;
  padding: 20px;
  border: 2px double #aaa;
  margin-top: 20px;
}

/* Main Image */
.species-main-image img {
  max-width: 100%;
  height: auto;
  border: 2px solid #666;
  background: #fff;
  padding: 6px;
  margin-bottom: 20px;
}

/* Description */
.species-description {
  font-size: 14px;
  line-height: 1.6;
  padding: 15px;
  background: #f9f9ff;
  border: 2px dotted #aac;
}

/* Biology Section */
.species-biology-section {
  background: #f5faff;
  border: 2px dashed #aac;
  padding: 20px;
}

.species-biology-section h3 {
  font-size: 18px;
  color: #003366;
  margin-bottom: 12px;
  border-bottom: 1px dashed #88a;
}

.species-biology-text {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.species-biology-image {
  text-align: center;
}

.species-biology-image img {
  max-width: 100%;
  height: auto;
  border: 2px solid #99c;
  background: #fff;
  padding: 4px;
}

/* Traits Section */
.species-traits-section {
  background: #f9fff5;
  border: 2px dashed #9c9;
  padding: 20px;
}

.species-traits-section h3 {
  font-size: 18px;
  color: #336633;
  margin-bottom: 12px;
  border-bottom: 1px dashed #6c6;
}

/* Traits Table */
.traits-grid {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.traits-grid th,
.traits-grid td {
  border: 1px solid #aac;
  padding: 6px 10px;
  font-size: 13px;
}

.traits-grid th {
  background: #eef9ee;
  font-weight: bold;
}

/* Traits Illustration */
.species-traits-illustration {
  margin-top: 20px;
  text-align: center;
}

.species-traits-illustration img {
  max-width: 100%;
  height: auto;
  border: 2px solid #9c9;
  background: #fff;
  padding: 4px;
}

/* Gallery Section */
.species-gallery {
  background: #f9f9ff;
  border: 2px dotted #aac;
  padding: 20px;
}

.species-gallery h3 {
  font-size: 18px;
  color: #003366;
  margin-bottom: 12px;
  border-bottom: 1px dashed #aac;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-grid img {
  max-width: 200px;
  border: 2px solid #ccc;
  background: #fff;
  padding: 4px;
}

/* === Species Page Mobile === */
@media (max-width: 768px) {
  .species-page {
    padding: 10px;
  }

  .gallery-grid {
    justify-content: center;
  }

  .traits-grid th,
  .traits-grid td {
    font-size: 12px;
  }
}


/* === Admin Layouts === */
 .admin-content {
     padding: 20px;
}
 .admin-nav {
     text-align: center;
     margin-bottom: 15px;
}
 .admin-nav a {
     margin: 0 10px;
     color: #003366;
     font-weight: bold;
     text-decoration: none;
}
 .admin-nav a:hover {
     text-decoration: underline;
}
.footer,
#footer {
  text-align: center;
  font-size: 12px;
  background: #f2f2f2;
  border-top: 3px double #000;
  padding: 10px;
  margin-top: 20px;
}

#footer a {
  color: #000;
  text-decoration: none;
  font-weight: bold;
}

#footer a:hover {
  background-color: #ffff66;
  color: #000;
}

ul, ol {
  padding-left: 24px;
  margin: 12px 0;
}

li {
  margin-bottom: 6px;
  list-style-type: disc;
}

li form {
  display: inline;
  margin-left: 6px;
}

.box ul {
  padding-left: 22px;
}

.box ul li {
  margin-bottom: 8px;
}

li button {
  margin-left: 4px;
  margin-right: 2px;
  font-size: 12px;
  padding: 4px 8px;
  border: 2px inset #888;
  background: #f0f0f0;
}

.box ul li a {
  font-weight: bold;
  color: #0000cc;
  text-decoration: underline;
}

.box ul li a:hover {
  background-color: #ffff99;
  color: #000;
}


/* === Entry Types === */


.entry-type {
  font-size: 13px;
  color: #666;
  text-align: center;
  margin-bottom: 12px;
}

.entry-box {
  padding: 10px;
  margin-bottom: 20px;
  border: 2px dotted #aaa;
  background-color: #fdfdfd;
}

/* Concept Pages */
.concept-box {
  background-color: #f8fff8;
  border-left: 6px solid #77aa77;
}

/* Species Pages */
.species-box {
  background-color: #f9f0ff;
  border-left: 6px solid #aa77aa;
}

/* Role Pages */
.role-box {
  background-color: #fdf7ee;
  border-left: 6px solid #cc8844;
}

/* Generic fallback */
.generic-box {
  background-color: #fffff5;
  border-left: 6px solid #aaa;
}

.entry-wiki {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
}

.entry-header {
  margin-bottom: 20px;
  border-bottom: 2px solid #ccc;
  padding-bottom: 10px;
}

.entry-header h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

.entry-meta {
  font-size: 14px;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.entry-type-label {
  background: #eeeeee;
  padding: 2px 8px;
  border: 1px solid #999;
  font-weight: bold;
  border-radius: 4px;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  background: #d8eaff;
  color: #003366;
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid #aac;
}

/* Type-specific background styling */
.entry-type-concept .entry-box {
  background: #fefefc;
  border: 2px dashed #aaa;
  padding: 12px;
}

.entry-type-species .entry-box {
  background: #f9fff5;
  border: 2px dotted #9c9;
  padding: 12px;
}

.entry-type-location .entry-box {
  background: #f5faff;
  border: 2px dotted #99c;
  padding: 12px;
}

.entry-type-role .entry-box {
  background: #fff8f0;
  border: 2px solid #cc9;
  padding: 12px;
}

.entry-type-attribute .entry-box {
  background: #fafafa;
  border: 2px dashed #ccc;
  padding: 12px;
}













@media (max-width: 768px) {



  body {
    background-size: 60px;
    padding: 0;

    overflow-x: hidden;
  }

  .header {
    text-align: center;
    background-color: white;
  }

  .header img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
  }

  .wrapper {
    border: none;
    background: white;
    padding: 0px;
    margin-left: 10px;
    margin-right: 10px;
    box-shadow: 0px 5px 10px black;
  }

  .main {
    flex-direction: column;
    gap: 0;
    background-color: white;
  }

  .sidebar,
  #sidebar-right {
    width: 100%;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    border: 1px solid #ccc;
    margin: auto;
    
  }

  #sidebar-right img {
    max-width: 150px;
    align-items: center;
    padding: 5px;

  }

  .sidebar img {
    width: 100%;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    border: 1px solid #ccc;
    display: none;
    visibility: hidden;
  }

  .item-detail-box {
    margin: auto;
  }

  .sidebar-box, .sidebar-box img {
      display: block;
      margin: auto;
  }

  .item-detail-box img {
    max-width: 320px;
    height: auto;
    margin: auto;
  }

  .content {
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #aaa;
  }

  .character-body {
    flex-direction: column;
  }

  .character-infobox {
    width: 100%;
    margin-bottom: 15px;
  }

  .gallery-grid {
    justify-content: center;
  }

  .box {
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #aaa;
  }

  .box h2,
  .box h3 {
    font-size: 16px;
  }

  table {
    font-size: 12px;
  }

  button {
    font-size: 13px;
    padding: 6px 10px;
  }

  .header h1 {
    font-size: 20px;
  }

  .header .subhead {
    font-size: 12px;
  }

  .topnav {
    flex-direction: column;
    align-items: center;
  }

  .topnav ul {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 10px 0;
    gap: 10px;
  }

  .navbox {
      overflow-x: hidden;
    margin: 0;
    padding: 0;
  }

  .navbox img {
    visibility: hidden;
    display: none;

  }

  .topnav li {
    margin: 5px;
  }

  .entry-box img,
.entry-content img,
.entry-wiki img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}



}

