/* watermellon — unblocked games
   palette: watermelon flesh (red/pink) + rind (green) on near-black */

:root {
  --bg:            #05080a;
  --bg-2:          #0a0f10;
  --panel:         rgba(14, 22, 18, .72);
  --panel-solid:   #0e1612;
  --border:        rgba(94, 235, 130, .16);
  --border-soft:   rgba(255, 255, 255, .07);

  --melon:         #fb2f52;   /* flesh */
  --melon-soft:    #ff6b81;
  --rind:          #3ddc63;   /* rind */
  --rind-deep:     #0d7a2c;

  --text:          #e9f5ec;
  --muted:         #7e9a86;
  --muted-2:       #56705d;

  --radius:        14px;
  --radius-sm:     10px;
  --bar-h:         74px;

  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--melon); color: #fff; }

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--rind-deep), var(--rind));
  border-radius: 99px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--rind); }

/* =========================================================
   top bar
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  background: rgba(5, 8, 10, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand img { width: 34px; height: 34px; display: block; }
.brand span {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--text);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 13px;
  color: #cfe4d4;
  white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; opacity: .8; }
.chip .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--rind); }
.chip .dot.warn { background: #f5a524; }
.chip .dot.bad  { background: var(--melon); }

.battery-shell {
  width: 22px; height: 12px;
  border: 1.5px solid #cfe4d4;
  border-radius: 3px;
  position: relative;
  padding: 1.5px;
}
.battery-shell::after {
  content: ""; position: absolute; right: -4px; top: 3px;
  width: 2px; height: 4px; background: #cfe4d4; border-radius: 0 1px 1px 0;
}
.battery-fill { height: 100%; background: var(--rind); border-radius: 1px; transition: width .4s; }

.search {
  position: relative;
  flex: 0 1 420px;
  min-width: 160px;
}
.search svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 15px 0 40px;
  border-radius: 99px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, .045);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color .18s, background .18s;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus {
  border-color: rgba(251, 47, 82, .5);
  background: rgba(255, 255, 255, .07);
}

/* =========================================================
   hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 22px 80px;
  isolation: isolate;
}

/* layered watermelon backdrop */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(120% 90% at 50% 105%, rgba(251, 47, 82, .30) 0%, rgba(251, 47, 82, 0) 55%),
    radial-gradient(85% 70% at 50% 100%, rgba(61, 220, 99, .34) 0%, rgba(13, 122, 44, 0) 62%),
    linear-gradient(180deg, var(--bg) 0%, #061109 45%, #05080a 100%);
}
/* rind stripes */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: repeating-linear-gradient(
    100deg,
    rgba(61, 220, 99, .055) 0px,
    rgba(61, 220, 99, .055) 2px,
    transparent 2px,
    transparent 46px
  );
  mask-image: radial-gradient(80% 70% at 50% 100%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 100%, #000 0%, transparent 75%);
}

#seeds { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.hero-center { text-align: center; max-width: 640px; }

.hero-logo {
  width: 128px; height: 128px;
  filter: drop-shadow(0 14px 40px rgba(251, 47, 82, .45));
  animation: bob 5.5s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

.wordmark {
  margin: 22px 0 20px;
  font-family: var(--mono);
  font-size: clamp(44px, 8vw, 74px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 6px 34px rgba(251, 47, 82, .5);
}
.wordmark .cursor {
  display: inline-block;
  width: .5em;
  height: .1em;
  margin-left: .04em;
  vertical-align: baseline;
  background: var(--melon);
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.bookmark-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 18px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .42);
  border: 1px solid var(--border-soft);
  font-size: 14px;
  color: #cfe4d4;
  backdrop-filter: blur(6px);
}
kbd {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-bottom-width: 2px;
  color: #fff;
}

.hero-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .16s, background .16s, border-color .16s;
}
.btn:hover { transform: translateY(-2px); background: rgba(0, 0, 0, .6); border-color: var(--border); }
.btn svg { width: 19px; height: 19px; }
.btn-melon {
  background: linear-gradient(180deg, var(--melon-soft), var(--melon));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 26px rgba(251, 47, 82, .34);
}
.btn-melon:hover { background: linear-gradient(180deg, #ff7f92, #ff3f60); }

/* ---------- cloak card (left of hero) ---------- */
.cloak-card {
  position: absolute;
  left: max(28px, calc(50vw - 620px));
  top: 50%;
  transform: translateY(-50%);
  width: 278px;
  padding: 20px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5);
  z-index: 5;
}
.cloak-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--rind);
  text-align: center;
}
.cloak-card p.sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.cloak-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.cloak-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border-soft);
  font-size: 11px;
  color: #cfe4d4;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.cloak-opt:hover { background: rgba(255, 255, 255, .08); transform: translateY(-1px); }
.cloak-opt.active { border-color: var(--rind); background: rgba(61, 220, 99, .12); }
.cloak-opt svg, .cloak-opt img { width: 20px; height: 20px; }
.cloak-card .btn { width: 100%; height: 42px; font-size: 14px; }
.cloak-note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted-2);
  text-align: center;
}
.cloak-note b { color: var(--muted); font-weight: 600; }

/* =========================================================
   games section
   ========================================================= */
.games-wrap {
  position: relative;
  z-index: 2;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 22px 90px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 0 20px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.count-badge {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(61, 220, 99, .12);
  border: 1px solid var(--border);
  color: var(--rind);
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.filter {
  height: 34px;
  padding: 0 15px;
  border-radius: 99px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.filter:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.filter.active {
  background: var(--melon);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .8, .3, 1), box-shadow .18s, border-color .18s;
}
.tile:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(251, 47, 82, .55);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .6), 0 0 0 1px rgba(251, 47, 82, .25);
  z-index: 3;
}
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  background: #0b1210;
}
.tile .label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 11px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55) 40%, rgba(0, 0, 0, .93));
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s;
}
.tile:hover .label { opacity: 1; transform: translateY(0); }
.tile .genre {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--rind);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: 3px;
}

.fav {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: none;
  background: rgba(6, 10, 8, .72);
  backdrop-filter: blur(4px);
  color: #d9e8dd;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s, transform .16s, color .16s;
  z-index: 2;
}
.tile:hover .fav, .fav.on { opacity: 1; }
.fav:hover { transform: scale(1.14); }
.fav.on { color: #ffd83d; }
.fav svg { width: 15px; height: 15px; }

.empty {
  grid-column: 1 / -1;
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.empty b { color: var(--text); }

/* =========================================================
   footer
   ========================================================= */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 22px 56px;
  background: #040706;
}
.footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}
.footer .brand { margin-bottom: 10px; }
.footer p { margin: 0; max-width: 560px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.footer a { color: var(--rind); }
.footer a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 22px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* =========================================================
   play page
   ========================================================= */
.play-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px 22px 60px;
}
.play-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.play-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.play-head .genre-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(61, 220, 99, .12);
  border: 1px solid var(--border);
  color: var(--rind);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.play-tools { display: flex; gap: 9px; margin-left: auto; flex-wrap: wrap; }
.play-tools .btn { height: 40px; padding: 0 16px; font-size: 13.5px; }

.frame-box {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  aspect-ratio: 16 / 9;
  min-height: 420px;
}
.frame-box iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }

.play-meta {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.meta-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel-solid);
  border: 1px solid var(--border-soft);
}
.meta-card .k {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.meta-card .v { font-size: 14px; color: var(--text); word-break: break-word; }
.meta-card a { color: var(--rind); }
.meta-card a:hover { text-decoration: underline; }

.more-head {
  margin: 42px 0 16px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
}

/* =========================================================
   credits page
   ========================================================= */
.doc {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 22px 90px;
}
.doc h1 { font-family: var(--mono); font-size: 30px; letter-spacing: -.03em; margin: 0 0 10px; }
.doc .lede { color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 720px; margin: 0 0 30px; }
.credit-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.credit-table th {
  text-align: left;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  border-bottom: 1px solid var(--border-soft);
}
.credit-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, .045); vertical-align: top; }
.credit-table tr:hover td { background: rgba(255, 255, 255, .022); }
.credit-table a { color: var(--rind); }
.credit-table a:hover { text-decoration: underline; }
.doc h2 {
  margin: 34px 0 10px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--rind);
}
.doc .body-copy { font-size: 14.5px; line-height: 1.75; color: #c3d6c8; max-width: 780px; }
.doc ol.body-copy { padding-left: 22px; }
.doc ol.body-copy li { margin-bottom: 8px; }
.doc code {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .07);
  color: #dff0e3;
}
.notice {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(251, 47, 82, .09);
  border: 1px solid rgba(251, 47, 82, .32);
  border-left-width: 3px;
  font-size: 14.5px;
  line-height: 1.7;
  color: #f0dade;
  max-width: 780px;
}
.notice strong { color: #fff; }
.notice.contact {
  background: rgba(61, 220, 99, .08);
  border-color: rgba(61, 220, 99, .3);
}
.notice .k {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.placeholder {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, .3);
  font-family: var(--mono);
  font-size: 13px;
  color: #ffd83d;
}

.lic {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: #cfe4d4;
  white-space: nowrap;
}

/* =========================================================
   toast
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: 99px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   responsive
   ========================================================= */
@media (max-width: 1320px) {
  .cloak-card { position: static; transform: none; width: min(340px, 100%); margin: 0 auto 34px; }
  .hero { flex-direction: column; padding-top: 44px; min-height: 0; }
}
@media (max-width: 900px) {
  .status-strip { display: none; }
  .search { flex: 1 1 auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 11px; }
  .play-tools { margin-left: 0; width: 100%; }
  .frame-box { min-height: 300px; aspect-ratio: 4 / 3; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 14px; gap: 12px; }
  .brand span { display: none; }
  .games-wrap, .play-shell { padding-left: 14px; padding-right: 14px; }
  .filters { margin-left: 0; }
  .wordmark { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* attribution banner for games carried under a permission rather than a licence */
.unofficial-notice {
  margin: 0 0 14px;
  max-width: none;
  font-size: 13.5px;
}
.unofficial-notice a { color: var(--rind); text-decoration: underline; }
.unofficial-notice b { color: #fff; }

.dmca-mail {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--rind);
  text-decoration: underline;
}
.dmca-mail:hover { color: #7bf39a; }
