/* ============================================================
   games1142 — "Pixel Arcade"
   Bright modern gaming portal · Tailwind CSS only for UI.
   This file preserves ONLY existing hooks (.pb-reveal, .ptcontent,
   #backToTopBtn, #copy-message) and base resets required by the
   project's JS — no new UI classes.
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Reveal on scroll (shared with main.js .pb-reveal hook) ---------- */
.pb-reveal {
  opacity: 1; transform: none;
}
.pb-reveal.pb-inview { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .pb-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Functional state hooks (JS-toggled, not visual design) ---------- */
.is-hidden { opacity: 0; pointer-events: none; }

/* Mobile menu open state (JS toggles .is-open on backdrop + drawer) */
#mobileBackdrop.is-open { opacity: 1; pointer-events: auto; }
#mobileMenu.is-open { transform: translateX(0); }

/* ============================================================
   CMS CONTENT — .ptcontent prose + responsive tables
   (Existing styling for CMS-generated HTML; not new UI)
   ============================================================ */
.ptcontent { color: #44604F; font-size: 15px; line-height: 1.8; }
.ptcontent h1, .ptcontent h2, .ptcontent h3, .ptcontent h4 {
  color: #0E231B; margin: 24px 0 12px;
}
.ptcontent p { margin: 0 0 16px; }
.ptcontent a { color: #00B36B; text-decoration: underline; }
.ptcontent img { border-radius: 12px; margin: 16px 0; }
.ptcontent ul, .ptcontent ol { margin: 0 0 16px; padding-left: 24px; }
.ptcontent ul { list-style: disc; }
.ptcontent ol { list-style: decimal; }
.ptcontent li { margin-bottom: 6px; }

/* Responsive tables (CMS-generated) */
.ptcontent table {
  width: auto !important; max-width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  table-layout: fixed;
  border: 1px solid #DFE9E2;
  border-radius: 8px;
  overflow: hidden;
}
.ptcontent table td,
.ptcontent table th {
  width: auto !important;
  border: 1px solid #DFE9E2;
  padding: 10px 14px;
  vertical-align: top;
  word-break: break-word;
  font-size: 14px;
  color: #44604F;
}
.ptcontent table th {
  background: #EDF3EF;
  color: #0E231B; font-weight: 600;
}
.ptcontent table tr:nth-child(even) td { background: #F5F8F6; }
.ptcontent table p, .ptcontent table b, .ptcontent table strong {
  padding: 0; margin: 0;
}

/* ============================================================
   BACK TO TOP (created/controlled by main.js)
   ============================================================ */
#backToTopBtn {
  position: fixed; bottom: 24px; right: 24px; z-index: 45;
  width: 46px; height: 46px;
  background: #00B36B; color: #fff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,179,107,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
#backToTopBtn.is-visible { opacity: 1; pointer-events: auto; }
#backToTopBtn:hover { background: #008F57; transform: translateY(-2px); }

/* ============================================================
   COPY MESSAGE (created by copy2())
   ============================================================ */
#copy-message {
  position: fixed; bottom: 80px; right: 24px; z-index: 46;
  padding: 10px 18px;
  background: #FFFFFF;
  border: 1px solid #00B36B;
  color: #008F57;
  border-radius: 12px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 12px rgba(14,35,27,0.06), 0 20px 48px rgba(14,35,27,0.10);
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
#copy-message.is-visible { opacity: 1; transform: translateY(0); }
