/* ==========================================================================
   C2C Games: shared styles for the home page and the play page.
   Colors match the C2Cnetworks site.
   ========================================================================== */

:root {
  --navy-950: #05070d; --navy-900: #0a0f1c; --navy-800: #10182b; --navy-700: #1a2540;
  --blue-500: #2563eb; --blue-400: #3b82f6; --cyan-400: #22d3ee;
  --slate-400: #94a3b8; --slate-200: #e2e8f0;
  --gold: #ffd166;
  --radius: 14px;
  --page: 1240px;         /* widest the page gets; grows on big screens, see the end of this file */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--navy-950); color: var(--slate-200);
  line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan-400); outline-offset: 3px; border-radius: 6px; }
.container { width: min(var(--page), 100%); margin: 0 auto; padding: 0 24px; }
@media (max-width: 500px) { .container { padding: 0 16px; } }
main { flex: 1; }

/* ----- Header ----- */
.site-header { border-bottom: 1px solid #ffffff10; background: #0a0f1ce6; backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.nav { display: flex; align-items: center; gap: 16px; height: 4rem; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: #fff; flex-shrink: 0; }
.brand-mark { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; font-size: .8rem; font-weight: 800;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan-400)); color: #fff; letter-spacing: .02em; }
.search { margin-left: auto; position: relative; width: min(20rem, 100%); }
.search input { width: 100%; height: 2.5rem; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid #ffffff1a; background: var(--navy-800);
  color: #fff; font: inherit; font-size: .92rem; }
.search input::placeholder { color: var(--slate-400); }
.search input:focus { outline: none; border-color: var(--cyan-400); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--slate-400); pointer-events: none; }
@media (max-width: 560px) { .brand-name { display: none; } }

/* ----- Buttons ----- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: .9rem; cursor: pointer;
  background: var(--blue-500); color: #fff; transition: background .15s; }
.btn:hover { background: var(--blue-400); }
.btn.ghost { background: #ffffff10; color: var(--slate-200); }
.btn.ghost:hover { background: #ffffff1c; }

/* ----- Game tiles ----- */
.tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--navy-800); border: 1px solid #ffffff12;
  transition: transform .18s, border-color .18s, box-shadow .18s; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px); border-color: var(--cyan-400); box-shadow: 0 14px 40px -14px #22d3ee66; outline: none; }
.tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #070b1a; }
.tile .name { display: block; padding: 10px 12px; font-weight: 700; font-size: .95rem; color: #fff; }
.badge { position: absolute; top: 8px; left: 8px; z-index: 1; background: var(--gold); color: #1a1300; font-size: .68rem; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }

/* ----- Ad rails: a 160x600 ad column on each side of the page, on wide screens only ----- */
.ad-rail { display: none; }
@media (min-width: 1280px) {
  .with-rails { display: grid; grid-template-columns: 160px minmax(0, var(--page)) 160px; justify-content: center; column-gap: 8px; padding: 0 16px; }
  .with-rails.right-only { grid-template-columns: minmax(0, var(--page)) 160px; }
  /* Pin the page to its column: ad blockers hide the rails, and without this the page would slide into a 160px rail column */
  .with-rails > main { grid-column: 2; }
  .with-rails.right-only > main { grid-column: 1; }
  .ad-rail { display: block; position: sticky; top: 88px; align-self: start; margin-top: 40px; }
}
.ad-label { display: block; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; color: #64748b; text-align: center; margin-bottom: 4px; }
.ad-slot { width: 160px; height: 600px; }
.ad-preview { display: grid; place-items: center; border: 2px dashed #ffffff26; border-radius: 8px; color: #64748b; font-size: .8rem; }
.ad-preview::after { content: "Ad space " attr(data-size); }
.ad-off { visibility: hidden; }
.ad-below.ad-off { display: none; }

footer { border-top: 1px solid #ffffff10; padding: 24px 0; font-size: .85rem; color: var(--slate-400); margin-top: 48px; }
footer a { text-decoration: underline; text-underline-offset: 2px; }
footer a:hover { color: #fff; }

/* ----- Big screens (TVs, 4K monitors) -----
   Text and the page both grow in steps, so a big screen shows a bigger page instead of a narrow strip.
   Most sizes are in rem, so they follow the font size. Ads stay their real size (160x600). */
@media (min-width: 1900px) { html { font-size: 18px; } :root { --page: 1560px; } }
@media (min-width: 2500px) { html { font-size: 21px; } :root { --page: 1960px; } }
@media (min-width: 3200px) { html { font-size: 25px; } :root { --page: 2400px; } }
/* With only a right-hand ad, keep an empty column on the left too, so the page lines up with the header */
@media (min-width: 1900px) {
  .with-rails.right-only { grid-template-columns: 160px minmax(0, var(--page)) 160px; }
  .with-rails.right-only > main { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
  .tile:hover, .tile:focus-visible { transform: none; }
}
