



@media (max-width: 800px) {
  body {
    background-attachment: scroll !important;
    background-size: cover;
  }
}

html,body {
  margin: 0;
  padding: 0;
  background-color: #000;
  width: 100%;
  min-height: 100vh;
  background-image: url('../images/game/source/mobilemiddleages/img/bg/background_pattern.jpg');
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
  background-attachment: fixed;
  overflow-x: hidden;
  padding-bottom: 20px;
  overscroll-behavior: none;
  scroll-behavior: smooth;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../images/game/source/mobilemiddleages/img/bg/background_pattern.jpg') repeat top left / auto;
  z-index: -1;
}


.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0px;
}

.header_ext {
  flex: 1;
  height: 101px;
  background-image: url('../images/game/source/mobilemiddleages/img/header/header_bg_center_2x.png');
  background-repeat: repeat-x;
  background-size: contain;
}

.header {
  width: 12%;        /* small on PC */
  display: block;
  object-fit: contain;
}

@media (max-width: 600px) {
  .header {
    width: 50%;   /* almost full width on phones */
    height: auto;     /* scale height automatically */
  }

  .header_ext {
    height: 107px;     /* reduce side extensions on mobile */
  }

  .header-text {
    font-size: 1em;   /* smaller text on mobile */
  }
}

.intro {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Desktop layout */
.intro-wrapper {
  position: relative;
  width: 22%;
  aspect-ratio: 639 / 360;
  margin: -1px auto;
  overflow: hidden;
  border-left: calc((100vw - 22vw) / 2) solid rgba(0,0,0,0.75);
  border-right: calc((100vw - 22vw) / 2) solid rgba(0,0,0,0.75);
  box-sizing: content-box;
}

.intro-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 8%, transparent 30%),
    linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 8%, transparent 30%);
  pointer-events: none;
  z-index: 1;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .intro-wrapper {
    width: 80%;
    border-left: calc((100vw - 80vw) / 2) solid rgba(0,0,0,0.75);
    border-right: calc((100vw - 80vw) / 2) solid rgba(0,0,0,0.75);
  }
}


.header-text {
  position: absolute;
  top: 9px;
  width: 100%;
  text-align: center;
  font-size: 1em;
  font-weight: normal;
  color: white;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  pointer-events: none;
  z-index: 10;
}

/* System comment styling */
.commentslist.system-comment {
    clear: both;
    margin: 10px auto 20px auto; /* centered below all content */
    background: hsl(210, 5%, 16%);
    border-radius: 10px;
    border: 1px solid #606976;
    width: 95%; /* almost full width */
    list-style: none;
    padding: 0;
}

.commentslist.system-comment li {
    position: relative;
    border-bottom: none;
}

.commentslist.system-comment .system-comment-content {
    display: block;
    padding: 15px 10px;
    text-decoration: none;
    color: #fff;
    text-align: center; /* center icon and text */
}

.commentslist.system-comment li h6 {
    margin: 0 0 10px 0;
    text-transform: uppercase;
    font-size: 13px;
    color: #ccc;
    text-align: left; /* top-left "System:" */
}

.commentslist.system-comment .alert-icon {
    width: 25px;  /* smaller attention icon */
    height: 25px;
    margin: 0 auto 10px auto;
    display: block;
}

.commentslist.system-comment li .commentMsg {
    font-weight: bold;
    font-size: 20px;
    margin: 5px 0;
}


.commentslist.system-comment li .commentDesc {
    font-size: 16px;
    color: #ccc;
    margin: 7px 0 0 0;
}

.commentslist.system-comment li .commentDescc {
    font-size: 16px;
    color: #ccc;
    margin: 20px 0 0 0;
}



.menuList {
    clear: both;
    margin: 15px auto;
    padding: 0;
    list-style: none;
    background: #000;
    border-radius: 10px;
    border: 1px solid #606976;
    width: 99%;
    max-width: 700px;  /* slightly smaller */
    overflow: hidden;
    text-align: left;   /* left-align text */
}

.menuItem {
    position: relative;
    border-bottom: 1px solid #606976;
    margin: 0;
    padding: 0;
}

.menuItem:last-child {
    border-bottom: none;
}

.menuItem > .toggle {
    display: block;
    width: 100%;
    padding: 12px 15px;     /* smaller height */
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    font-size: 20px;          /* smaller text */
    font-family: inherit;
    text-align: left;
    border: 0;
    background: transparent;
}

.menuItem:nth-child(even) > .toggle {
    background-color: #111;
}

/* Keep the homepage's alternating rows subtle over the Knight Game panel. */
#home .menuItem:nth-child(even) > .toggle {
    background: rgba(255, 255, 255, 0.07);
}

#home .menuItem > a.toggle {
    text-decoration: none;
}

.menuContent {
    display: none;
    padding: 12px 15px;      /* consistent with toggle padding */
    color: #fff;
    background-color: #000;
    font-size: 22px;       /* slightly smaller */
    line-height: 1.4em;
    text-align: left;         /* left-align content */
    
}

.menuList a, .menuList button, .menuContent {
    font-family: "Arial Black", Arial, sans-serif;
    font-weight: 900;
}

.menuTitle {
    display: flex;
    align-items: center;           /* vertical centering */
    justify-content: space-between; /* icon+text left, arrow right */
    padding: 12px 15px;
}

.menuLeft {
    font-size: 16px;
    display: flex;
    align-items: center;           /* vertical centering for icon and text */
    gap: 10px;                     /* space between icon and text */
}

.menuIcon {
    height: 50px;                  /* resize icon without affecting layout */
    width: auto;
}

.menuArrow {
    height: 25px;
    width: auto;
}

.menuContent {
    display: none;
    padding: 10px 15px;
    color: #fff;
    background-color: #000;
}

.menuContent {
    display: none; /* hidden until toggle */
}

/* Make submenu links look like cells instead of blue links */
.nestedItem {
    display: block;
    width: 100%;
    background-color: #000000;
    border-top: 1px solid #606976; /* separator on top */
    border-bottom: 1px solid #606976;
    text-decoration: none;  /* remove underline */
    color: white;           /* normal text color */
    border-radius: 0;
    margin: 0;
    cursor: pointer;
}

/* Keep hover consistent with your design */
.nestedItem:hover {
    background-color: #111111;
}

/* Style inner text + arrow alignment */
.nestedItem .menuTitle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

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

.nestedItem .menuArrow {
    height: 25px;
    width: auto;
}

.nestedItem strong {
    font-size: 16px; /* adjust font size here */
    font-weight: 600;
}

.discordLink,
.supportLink {
  display: block;
  padding: 12px 15px;
  text-decoration: none;
  color: #fff;
}

.discordLink:hover,
.supportLink:hover {
  background-color: #111;
}






.site-footer {
  padding: 15px;
  text-align: center;
  font-size: 14px;
  color: #8b8b8b;
}
.site-footer a {
  color: inherit;
  text-decoration: underline;
}
.footer-about-link {
  margin-top: 10px !important;
}


.menuArrow { transition: transform .16s ease; }
.toggle[aria-expanded="true"] .menuArrow { transform: rotate(90deg); }
