<style>
*, *::before, *::after { box-sizing: border-box; }

/* ==================== CHICAGOFLF – Mac OS 8 Nostalgia Font ==================== */
@font-face {
  font-family: 'ChicagoFLF';
  src: url('fonts/ChicagoFLF.woff2') format('woff2'),
       url('fonts/ChicagoFLF.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Core Body – Classic Mac OS 8 look */
body {
  background-color: #bfbfbf;
  background-image: url('img/bg-tile2.png');
  background-repeat: repeat;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* { border-radius: 0 !important; }


/* ==================== TOP BAR: Scrolling Fortune + Language Flags ==================== */
#top-bar {
  display: flex;
  align-items: center;
  background: #111;
  color: #e8e8e8;
  padding: 6px 16px;
  min-height: 32px;
  gap: 16px;
}

#marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  padding-left: 4rem;
  animation: marquee 35s linear infinite;
}

#fortune-marquee {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

#marquee-fortune {
  display: inline-block;
  padding-left: 100%;
  animation: fortuneMarquee 16s linear infinite;   /* Faster scroll */
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* Very short pause on hover (optional, can remove if you want zero pause) */
#fortune-marquee:hover #marquee-fortune {
  animation-play-state: paused;
}

#language-switcher {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  font-size: 19px;
}

#language-switcher a {
    font-family: "Segoe UI Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
  line-height: 1;
  vertical-align: middle;
  text-decoration: none;
  text-decoration: none;
  opacity: 0.8;
  transition: all 0.2s ease;
}

#language-switcher a:hover {
  opacity: 1;
  /* transform: scale(1.2); */
}

#language-switcher {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  font-size: 18px;
    gap: 8px;
  align-items: center;
}

#language-switcher img {
  border: 1px solid #808080;
  /* image-rendering: pixelated;      Gives the nice crisp retro look */
  vertical-align: middle;
  width: 18px;
  height: 12px;
    /* Start slightly faded (retro look) */
  opacity: 0.85;
  transition: opacity 0.15s ease-in-out;
}

/* #language-switcher a {
  text-decoration: none;
  opacity: 0.75;
  transition: all 0.2s ease;
} */

#language-switcher a:hover {
  opacity: 1;
  /* transform: scale(1.15); */
}
/*End Class for scroll strip */

/* FORTUNE STRIP */
#fortune-strip {
  background: #111;
  color: #e8e8e8;
  font-size: 11px;
  padding: 5px 16px;
  text-align: center;
  letter-spacing: 0.03em;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#fortune-strip .fortune-text { font-style: italic; }
#fortune-strip .fortune-author { color: #888; font-style: normal; }

/* BRANDING HEADER */
#branding-header {
  background-image: url('img/black-tile.png');
/*  background: #222;*/
  border-bottom: 3px solid #000;
  border-top: 3px solid #000;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
#branding-logo-area h1 {
  margin: 0;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  text-shadow: 2px 2px 0 #000;
  line-height: 1;
}
#branding-logo-area h1 span { color: #c42b2c; }

#branding-tagline {
  color: #aaa;
  font-size: 11px;
  margin: 4px 0 0 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#branding-copy {
  flex: 1;
  min-width: 200px;
  color: #ccc;
  font-size: 12px;
  line-height: 1.6;
}
#branding-copy strong { color: #fff; font-weight: 800;
}

@media (max-width: 600px) {
  #branding-copy {
    flex-basis: 100%;
    border-top: 1px solid #333;
    padding-top: 12px;
  }
}
/* This was the Width Fix for the content of the main body */

/* ==================== CONTENT WIDTH CONTROL ==================== */
.content-wrapper {
  max-width: 860px;           /* This gives you ~65-70% on most desktops */
  margin: 0 auto;             /* Centers the content */
  padding: 0 20px;
}

@media (max-width: 900px) {
  .content-wrapper {
    max-width: 100%;
    padding: 0 15px;
  }
}

/* Optional: Make the window itself feel a bit more contained */
.window {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

/* Width Fix ends here.*/

/* Width Fix for Header here*/

/* ==================== VISITOR COUNTER ==================== */

#visit-counter {
/*  margin: 8px 0 10px 0;*/
  text-align: center;
}

#visit-counter img {
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #ffffff, 
              inset -1px -1px 0 #808080;
  background: #c0c0c0;
  padding: 4px;
  image-rendering: pixelated;
}

/* Optional: Add a small retro label above the counter */
/*#visit-counter::before {
  content: "You are visitor #";
  font-size: 11px;
  color: #fff;
  margin-right: 6px;
  vertical-align: middle;
}*/


/* ==================== END VISITOR COUNTER ==================== */

/* Header - Constrain width like the content */
#branding-header {
  background-image: url('img/black-tile.png');
  border-bottom: 3px solid #000;
  border-top: 3px solid #000;
  padding: 18px 0;
}

#branding-header .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 0 20px;
}

/* Optional: Make mascot and copy behave better on smaller screens */
@media (max-width: 900px) {
  #branding-header .content-wrapper {
    padding: 0 15px;
  }
}

/* End Width Fix for Header*/


/* PAGE BODY */
#page-body {
  padding: 28px 20px;
  margin: 0 auto;
}

/* WINDOW STYLES */
.window {
  width: 100%;
  background: #c0c0c0;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
}
.titlebar {
  height: 18px;
  background: repeating-linear-gradient(to bottom, #dcdcdc 0px, #dcdcdc 1px, #c0c0c0 1px, #c0c0c0 2px);
  border-bottom: 1px solid #7f7f7f;
  position: relative;
}
.title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: bold;
  background: #c0c0c0;
  padding: 0 6px;
  white-space: nowrap;
}
.content { padding: 24px; }
.panel {
  background: #dcd8d0;
  border: 1px solid #000;
  box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #808080;
  height: 100px;
  margin: 20px 0;
  padding: 10px;
  overflow: auto;
}

/* BUTTONS & INPUTS */
button {
  background: #c0c0c0;
  border: 2px solid #000;
  border-radius: 6px !important;                    /* This is the sweet spot */
  box-shadow: inset -2px -2px 0 #ffffff, inset 2px 2px 0 #808080;
  padding: 6px 20px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", sans-serif;
}
button:active {
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  border-radius: 6px !important;                   /* This is the sweet spot */
  transform: translate(1px, 1px);
}
button:disabled { color: black; }
input[type="range"] { width: 100%; }
#pdf_input { position: absolute; left: -9999px; }

/* INFO / TOS SECTION */
#info-section {
  background: #d4d0c8;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  padding: 16px 20px;
  font-size: 12px;
  line-height: 1.65;
  color: #222;
  margin: 20px 0;
}
#info-section p { margin: 0 0 10px 0; }
#info-section p:last-child { margin-bottom: 0; }
#tos-link { color: #00008b; text-decoration: underline; cursor: pointer; font-weight: bold; }
#tos-link:hover { color: #0000cc; }

#tos-panel {
  display: none;
  background: #fffef5;
  border: 1px solid #000;
  box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #808080;
  padding: 14px 16px;
  font-size: 11px;
  line-height: 1.75;
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
  color: #111;
}
#tos-panel h3 { margin: 0 0 8px 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
#tos-panel p { margin: 0 0 8px 0; }

/* OUTGOING LINKS SECTION */
#links-section { 
  background: #d4d0c8;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  padding: 16px 20px;
  font-size: 12px;
  line-height: 1.65;
  color: #222;
  margin: 20px 0;
}
#links-section h2 { 
  font-size: 13px; 
  font-weight: 800;
  letter-spacing: 0.08em; 
  margin: 0 0 10px 0; 
  color: #333; 
}
.links-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.link-chip {
  border: 2px solid #000;
  border-radius: 6px !important;
  box-shadow: inset -2px -2px 0 #ffffff, inset 2px 2px 0 #808080;
  padding: 4px 12px;
  font-size: 11px;
  color: #00008b;
  text-decoration: none;
  cursor: pointer;
}
.link-chip:hover { background: #d4d0c8; text-decoration: underline; }

/* AD BANNERS */
.ad-banner {
  width: 100%;
  height: 90px;
  background: #c8c8c8;
  border: 1px dashed #888;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  font-size: 11px;
  color: #777;
  letter-spacing: 0.05em;
}

/* FOOTER */
#site-footer {
/*  background: #1a1a1a;*/
  background-image: url('img/black-tile.png');
  color: #888;
  font-size: 10px;
  padding: 18px 24px;
  margin-top: 32px;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  text-align: center;
  line-height: 1.8;
}
#site-footer a { color: #aaa; text-decoration: none; }
#site-footer a:hover { text-decoration: underline; color: #ccc; }
#site-footer .footer-links { margin-bottom: 6px; }
#site-footer .footer-links span { margin: 0 6px; color: #444; }

/* TOS MODAL */
#tos-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#tos-modal-overlay.tos-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#tos-modal {
  background: #c0c0c0;
  border: 2px solid #000, outline: 1px #fff,;
  box-shadow: inset -2px -2px 0 #808080, inset 2px 2px 0 #ffffff, 4px 4px 0 #000;
  width: 460px;
  max-width: 94vw;
  font-size: 11px;
}
#tos-modal .modal-titlebar {
  height: 26px;
/*  background: #000080;*/
  background-image: url('img/hazard-tile.png');
  display: flex;
   border: 2px solid #fff,;
  align-items: center;
  padding: 0 8px;
  color: #fff;
  text-shadow: 2px 2px #101010;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.03em;
}
#tos-modal .modal-body {
  padding: 16px 18px;
  line-height: 1.7;
  color: #111;
  max-height: 52vh;
  overflow-y: auto;
}
#tos-modal .modal-body h3 { 
  font-size: 12px; 
  text-transform: uppercase; 
  margin: 0 0 10px 0; 
  letter-spacing: 0.05em; 
}
#tos-modal .modal-footer { 
  padding: 10px 18px 14px; 
  text-align: right; 
  border-top: 1px solid #808080; 
}

#gang-bar {
  text-align: center;
  padding: 10px;
  line-height: 0;
}
#gang-bar img {
  width: 342px;
  height: 100%;
  display: inline-block;
}

/* Loading animation (kept from original) */
@keyframes loading {
  0%   { border: 2px solid #4285f4; color: #4285f4; box-shadow: 0px 1px 10px 1px rgba(66,133,244,0.5); }
  33%  { border: 2px solid #db4437; color: #db4437; box-shadow: 0px 1px 10px 1px rgba(219,68,55,0.5); }
  66%  { border: 2px solid #f4b400; color: #f4b400; box-shadow: 0px 1px 10px 1px rgba(244,160,0,0.5); }
  100% { border: 2px solid #0f9d58; color: #0f9d58; box-shadow: 0px 1px 10px 1px rgba(15,157,88,0.5); }
}

.ghost-class { background-color: rgba(255,99,71,0.5); width: max-content; }

/* ==================== MODALS – Privacy & About ==================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

/* General modal window */
.modal-window {
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0 #808080, inset 2px 2px 0 #ffffff, 4px 4px 0 #000;
  width: 460px;
  max-width: 94vw;
  font-family: 'ChicagoFLF', "Chicago", "Geneva", sans-serif;
  font-size: 12px;
}

.modal-titlebar {
  height: 20px;
  background: repeating-linear-gradient(to bottom, #dcdcdc 0px, #dcdcdc 1px, #c0c0c0 1px, #c0c0c0 2px, !important);
  border-bottom: 1px solid #7f7f7f;
    align-items: center;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: bold;
  background: #c0c0c0;
  padding: 2px 6px;
  white-space: nowrap;
}

/* Improved modal body with proper padding */
.modal-body {
  padding: 20px 24px 16px;   /* ← This is the key fix */
  line-height: 1.55;
  color: #111;
  max-height: 58vh;
  overflow-y: auto;
}

/* About window specific tweaks */
.about-window {
  width: 380px;
}

.about-body {
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  line-height: 1.45;
}

.modal-footer {
  padding: 12px 18px 14px;
  text-align: right;
  border-top: 1px solid #808080;
}

.modal-footer button {
  min-width: 80px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: inset -2px -2px 0 #ffffff, inset 2px 2px 0 #808080;
}
</style>