/* =========================
   FORCE MS UI GOTHIC ONLY
   ========================= */
html, body, div, span, p, h1, h2, h3, h4, h5, h6,
a, li, menu, fieldset, button {
  font-family: "MS UI Gothic", "MS Gothic", sans-serif !important;
}

/* =========================
   BASE LAYOUT
   ========================= */
html, body {
  height: 100%;
  margin: 0;
}

body {
  background: #008080;  /* Body background color */
  overflow: hidden; /* Prevents body scrollbars */
}

/* =========================
   MAIN WINDOW (ANCHOR SYSTEM)
   ========================= */
.main-window {
  width: 900px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #c0c0c0;  /* Main window's background is grey */
  border: 2px solid #808080;  /* Border for the main window */
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);  /* Subtle shadow for depth */
  padding-bottom: 6px;
  box-sizing: border-box;
  overflow: hidden;  /* Prevent scrollbars */
}

/* =========================
   TITLE BAR
   ========================= */
.title-bar-controls {
  display: flex !important;
}

.banner {
  background: rgb(228, 0, 0);
  color: white;
  overflow: hidden;
  white-space: nowrap;
  font-size: 18px;
  margin-bottom: 6px;
  height: 24px;
  display: flex;
  align-items: center;
  font-weight: bold;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-bottom: 1px solid #800000;
  border-right: 1px solid #800000;
}

.banner span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 10s linear infinite;
  font-weight: bold;
  text-shadow: 2px 2px 0 #800000;
}

@keyframes scroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}

/* =========================
   TYPOGRAPHY
   ========================= */
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p  { font-size: 15px; }

/* =========================
   CONTENT AREA
   ========================= */
.window-body.layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* main scroll area */
#contentArea {
  flex: 1;
  overflow: auto;
  padding-bottom: 200px;  /* Prevent overlap with footer + ads */
}

/* =========================
   TABS SYSTEM
   ========================= */
menu[role="tablist"] {
  margin-top: 4px;
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
}

menu[role="tablist"] li {
  position: relative;
  z-index: 1;
}

menu[role="tablist"] li[aria-selected="true"] {
  z-index: 3;
}

/* =========================
   TAB CONTENT
   ========================= */
.tab {
  display: none;
}

.tab.active {
  display: block;
}

.tab fieldset {
  display: block;
  margin-top: 0;
}

/* =========================
   FOOTER (WIN98 STYLE FIX)
   ========================= */
.footer {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  margin: 0;
  padding: 8px;
  background: #c0c0c0;
  box-sizing: border-box;
}

/* =========================
   ADS (INSIDE WINDOW FIXED)
   ========================= */
#adContainer {
  position: absolute;
  left: 6px;
  bottom: 140px;  /* Ensure ads stay above the footer */
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

#adContainer img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  image-rendering: pixelated;
  cursor: pointer;
}

/* =========================
   WEBAMP FIX
   ========================= */
#webamp-window {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 300px;
  height: 116px;
  z-index: 999999;
  display: block;
  visibility: visible;
}

#webamp {
  position: fixed !important;
  z-index: 2147483647 !important;
}

/* =========================
   IMAGE LOADING / DIALUP EFFECT
   ========================= */
#contentArea img {
  display: block;
  position: relative;
}

img.dialup {
  -webkit-mask-image: linear-gradient(to bottom,
    black 0%,
    black 0%,
    transparent 0%
  );
  mask-image: linear-gradient(to bottom,
    black 0%,
    black 0%,
    transparent 0%
  );
}

/* =========================
   ADS (INSIDE WINDOW FIXED) - New Layout
   ========================= */
#adPanel {
  position: absolute;
  left: 6px;
  bottom: 140px;
  width: auto;
  z-index: 10;
}

.ad-window {
  width: auto;
  display: inline-block;
  background: #c0c0c0;
  border: 2px solid #808080;
  box-shadow: inset 1px 1px #ffffff, inset -1px -1px #404040;
}

.ad-window .window-body {
  padding: 6px;
  background: #c0c0c0;
}

#adImage {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  image-rendering: pixelated;
  cursor: pointer;
}

#adSection {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 120px;
  padding: 8px;
  background: #c0c0c0;
  box-sizing: border-box;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}