/* ============================================================
   BASE RESET / STRUCTURE
   ============================================================ */

/* Apply "border-box" sizing to everything.
   Makes widths predictable (padding stays inside the box). */
*,
*::before,
*::after {
  box-sizing: border-box; /* prevents layout expansion */
}

html {
  font-size: 16px;        /* base font size for rem units */
  scroll-behavior: smooth; /* smooth scrolling for internal links */
}

body {
  margin: 0; /* remove default browser margin */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; /* clean modern font */
  color: #222; /* default text color */

  /* Global background image for all pages */
  background: url("../images/ui/Page-background.jpg") center / cover fixed;
}

/* ============================================================
   GLOBAL CONTENT WRAPPER
   ============================================================ */

/* Generic center container used by all pages */
.content-area {
  max-width: 100rem; /* prevents ultra-wide stretching */
  margin: 0 auto;    /* center horizontally */
  padding: 0 1.5rem; /* safe side padding */
}

/* ============================================================
   GLOBAL NAVBAR
   (Only the navbar is global — all other styling is page-specific)
   ============================================================ */

:root {
  --nav-bottom-spacing: 0.5rem; /* space below navbar for all pages except home */
}

.manga-strip-buttons {
  display: flex;           /* place nav icons in a row */
  justify-content: center; /* center them horizontally */
  gap: 2rem;               /* space between icons */
  padding: 2rem;         /* top/bottom spacing around navbar */
}

/* Navbar icon images */
.manga-strip-buttons .nav-item img,
.manga-strip-buttons img {
  height: 6.5rem;     /* consistent icon size globally */
  display: block;   /* removes inline spacing issues */
  object-fit: contain; /* keeps images from stretching */
  transition: transform 0.2s ease; /* smooth hover grow */
}

.manga-strip-buttons .nav-item:hover img {
  transform: scale(1.08);
}

/* ============================================================
   NAVBAR → PAGE SPACING
   Applies to all pages except home (home uses class="no-scroll")
   ============================================================ */

/* Add spacing below navbar on every page except home */
body:not(.no-scroll) .content-area {
  margin-top: var(--nav-bottom-spacing);
}

/* ============================================================
   GLOBAL TYPOGRAPHY
   (Pages override sizes using their own variables)
   ============================================================ */

h1 {
  font-size: 2.4rem;  /* default heading size */
  line-height: 1.2;   /* compact vertical spacing */
  margin: 0 0 1rem;   /* bottom margin only */
}

h2 {
  font-size: 1.8rem;  /* smaller heading */
  line-height: 1.3;
  margin: 0 0 0.8rem;
}

p {
  font-size: 1rem;    /* body text size */
  line-height: 1.6;   /* comfortable readability */
  margin: 0 0 1rem;   /* bottom spacing */
}

/* Links */
a {
  color: inherit;      /* inherit page color */
  text-decoration: none; /* remove underline */
}

a:hover {
  text-decoration: underline; /* show underline only on hover */
}

/* ============================================================
   PAGE TOP BUTTON (global on all non-home pages)
   ============================================================ */

.page-top-button {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  border: 3px solid #ff8c00;
  background: #000;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 0.6rem 1.5rem rgba(0, 0, 0, 0.35);
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-top-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.4);
}

.page-top-button:focus-visible {
  outline: 3px solid #ffd28c;
  outline-offset: 3px;
}

.page-top-icon {
  width: 0.9rem;
  height: 0.9rem;
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: rotate(45deg) translateY(1px);
}

.page-top-label {
  display: block;
  line-height: 1;
}

@media (max-width: 768px) {
  .page-top-button {
    right: 1rem;
    bottom: 1rem;
    width: 3.5rem;
    height: 3.5rem;
    font-size: 0.7rem;
  }
}
