/* ---------- RESET / BASE ---------- */
* {
  box-sizing: border-box;
}

:root {
  /* itch.io exact theme colours */
  --itch-bg: #4588be;      /* BG */
  --itch-bg2: #354867;     /* BG 2 */
  --itch-text: #f7f7f7;    /* Text */
  --itch-link: #fade5b;    /* Link */

  --dark-bg:#21242a; /*footer*/


    /* GAME SIZE (single source of truth) */
  --game-width: 1260px;
  --game-height: 700px;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--itch-bg);
  color: var(--itch-text);
  font-family: "Lato", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Optional itch-style background image */
body.has-bg-image {
  background-image: url("/images/background.webp"); /* YOU supply this */
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed; /* matches itch “Fixed ✓” */
}

/* ---------- HEADER (itch-style refined) ---------- */
.site-header {
  background: #3a4b5a;
  height: 50px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);

  position: relative; /* 🔑 anchor for absolute centering */
  display: flex;
  align-items: center;
}


.header-inner {
  max-width: var(--game-width);
  margin: 0 auto;
  height: 100%;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;

  padding: 0 0.75rem;
}
.header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  text-align: center;
  pointer-events: none; /* avoids blocking logo clicks */
  white-space: nowrap;
}


.header-center h1 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1;
}

.header-center .tagline {
  font-size: 0.8rem;
  opacity: 0.8;
  margin: 0.1rem 0 0;
}



.site-logo-link {
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  z-index: 2; /* stays above center text if they overlap */
}

.site-logo {
  height: 45px;
  width: auto;
  display: block;
}



/* ---------- HERO ---------- */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(180deg, #222, #1b1b1b);
}

.hero h1 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 700;
}

.hero .tagline {
  margin-top: 0.75rem;
  color: #aaa;
  font-size: 1.1rem;
}

/* ---------- PAGE LAYOUT (full-height BG2 column) ---------- */
.page {
  width: var(--game-width);
  max-width: 100%;
  margin: 0 auto;
  padding: 0;                 /* touches header/footer */
  background: var(--itch-bg2);

  display: flex;
  flex-direction: column;
  gap: 1rem;                  /* 👈 spacing BETWEEN cards */

  flex: 1;
}




/* ---------- CARD STYLE (itch-like panels) ---------- */
.card {
  margin: 0;
  padding: 1.5rem;
  /*background: rgba(0,0,0,0.18);*/
  border-radius: 6px;
}



/* ---------- PLAY AREA ---------- */
.play-card {
  padding: 0px;
}

/* ---------- GAME LAYOUT ---------- */
.game-wrapper {
  width: 100%;
}

.game-canvas {
  width: 100%;
  background: var(--dark-bg);
  border-radius: 0px;
  overflow: hidden;
}

#unity-container {
  width: 100%;
  height: var(--game-height);
  position: relative;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  display: block;
}


/* ---------- LOADING OVERLAY ---------- */
#loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--dark-bg);
}


.loading-panel {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);

  padding: 1rem 1.5rem;
  border-radius: 8px;
  width: min(80%, 480px);
  text-align: center;
}


.loading-title {
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 6px;
  background: #444;
  border-radius: 4px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: #4caf50;
}

/* ---------- LOADING ANIMATION ---------- */
.loading-animation {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}

.loading-animation video {
  max-height: 40%;
  width: auto;
  display: block;
}


/* ---------- FULLSCREEN BUTTON ---------- */
.fullscreen-bar {
  display: flex;
  justify-content: center;
}

#fullscreen-btn {
  background: rgba(0,0,0,0.35);
  color: #eee;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}

#fullscreen-btn:hover {
  background: rgba(0,0,0,0.5);
}



/* ---------- DESCRIPTION ---------- */
.description h2,
.description h3 {
  margin-top: 1.5rem;
}

.description h2:first-child {
  margin-top: 0;
}

.how-to-play {
  padding-left: 1.25rem;
}

.how-to-play li {
  margin-bottom: 0.5rem;
}

/* ---------- DESCRIPTION + SCREENSHOTS LAYOUT ---------- */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 1.5rem;
  align-items: start;
}

/* Left column (description) */
.content-main {
  min-width: 0;
}

/* Right column (screenshots) */
.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.content-sidebar img {
  width: 100%;
  display: block;
  border-radius: 4px;
  background: #000;
}

/* ---------- VIDEO EMBED (itch-style) ---------- */
.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .game-wrapper {
    grid-template-columns: 1fr;
  }

  .skyscraper {
    display: none;
  }

  .hero h1 {
    font-size: 2.1rem;
  }
}

/* ---------- FOOTER ---------- */
#site-footer {
  margin-top: 0;
  padding: 2rem 1.5rem;
  background: var(--dark-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: #aaa;
  font-size: 0.9rem;
}


/* Footer inner layout (flex-safe even if structure varies) */


/* Divider lines if present */
#site-footer hr {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 1.25rem 0;
}

.footer {
  display: flex;
  justify-content: center;  /* center the group */
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;                /* 👈 this controls spacing */
  width: 100%;
  max-width: var(--game-width);
  margin: 0 auto;
}

/* Footer links */
.footer a {
  color: #cfcfcf;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.footer a:hover {
  color: #ffffff;
}

/* ---------- MOBILE FOOTER ---------- */
@media (max-width: 600px) {
  #site-footer ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  #site-footer {
    text-align: center;
  }
}

@media (max-width: 900px) {
  .page {
    min-height: auto;
  }
}

@media (max-width: 1200px) {
  :root {
    --game-width: 100vw;
  }

  #unity-container {
    height: 60vh; /* reasonable mobile fallback */
  }
}

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.75rem;
    padding-top: 0.5rem;
  }

  .content-sidebar img {
    width: 240px;
    flex-shrink: 0;
  }
}

/* ---------- LEGAL / LONG-FORM TEXT ---------- */
.legal-content {
  max-width: 760px;          /* optimal reading width */
  margin: 2.5rem auto;      /* vertical breathing room */
  padding: 0 1rem;

  font-size: 1rem;
  line-height: 1.75;
  color: var(--itch-text);
}

.legal-content h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.legal-content p {
  margin-bottom: 1rem;
  color: #e6e6e6;            /* slightly softer than pure white */
}

.legal-content a {
  color: var(--itch-link);
  text-decoration: underline;
}

/* ---------- GENERIC CONTENT PAGE ---------- */
.content-page {
  max-width: 760px;
  margin: 2.5rem auto;
  padding: 0 1rem;

  font-size: 1.05rem;
  line-height: 1.7;
}

.content-page h1 {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
}

.content-page h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}

.content-page a {
  color: var(--itch-link);
}

/* ---------- HIGHLIGHT / CALLOUT BOX ---------- */
.highlight-box {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: rgba(0,0,0,0.25);
  border-left: 4px solid var(--itch-link);
  border-radius: 4px;
}

/* ---------- MUTED TEXT ---------- */
.muted {
  color: #cfcfcf;
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .header-center .tagline {
    display: none;
  }

  .header-center h1 {
    font-size: 1rem;
  }
}
