/* =========================================================================
   Jubis Games — estilo gamer infanto-juvenil, neon, moderno
   ========================================================================= */

:root {
  --bg:        #0a0a1f;
  --bg-2:      #14112e;
  --ink:       #f4f2ff;
  --muted:     #a39ec4;
  --cyan:      #00f0ff;
  --magenta:   #ff2bd6;
  --lime:      #c2ff3d;
  --yellow:    #ffd23f;
  --purple:    #7a3dff;

  --shadow-neon-cyan:    0 0 0 2px rgba(0,240,255,.35), 0 12px 30px -10px rgba(0,240,255,.55);
  --shadow-neon-magenta: 0 0 0 2px rgba(255,43,214,.35), 0 12px 30px -10px rgba(255,43,214,.55);

  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1200px;

  --font-display: 'Press Start 2P', system-ui, sans-serif;
  --font-body:    'Rubik', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(ellipse at top, #1a1340 0%, var(--bg) 55%, #050514 100%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
}

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

img { max-width: 100%; display: block; }

kbd {
  font-family: var(--font-display);
  font-size: .7em;
  background: var(--lime);
  color: var(--bg);
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 3px 0 #6f9300;
  position: relative;
  top: -2px;
}

/* ===== Background decorations ===== */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(122,61,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122,61,255,.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.bg-blobs {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .35;
  animation: float 22s ease-in-out infinite;
}
.blob--cyan    { top: -120px; left: -120px; background: var(--cyan); }
.blob--magenta { bottom: -120px; right: -120px; background: var(--magenta); animation-delay: -8s; }
.blob--lime    { top: 40%; left: 60%; background: var(--lime); opacity: .18; animation-delay: -14s; }

@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(40px,-30px) scale(1.07); }
}

/* ===== Layout helpers ===== */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.logo__icon {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,240,255,.15), rgba(255,43,214,.15));
  box-shadow: var(--shadow-neon-cyan);
  transition: transform .25s ease;
}
.logo:hover .logo__icon { transform: rotate(-6deg) scale(1.05); }
.logo__text {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1px;
  display: flex;
  gap: 6px;
}
.logo__brand--accent {
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: 22px;
  font-weight: 600;
}
.nav a {
  position: relative;
  padding: 6px 2px;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 2px;
  transition: right .25s ease;
}
.nav a:hover::after { right: 0; }

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 60px 0 80px;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 18px;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(194,255,61,.22);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(194,255,61,.22); }
  50%      { box-shadow: 0 0 0 10px rgba(194,255,61,.05); }
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: 1px;
}
.hero__brand {
  display: block;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta) 60%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(255,43,214,.25);
}
.hero__lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 28px;
}
.hero__lead strong { color: var(--ink); }
.hero__cta {
  display: flex; flex-wrap: wrap; gap: 14px;
}
.hero__counter {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}
.hero__counter strong {
  font-family: var(--font-display);
  color: var(--lime);
  font-size: 20px;
  margin-right: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease;
  letter-spacing: .3px;
  cursor: pointer;
}
.btn--primary {
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: var(--bg);
  box-shadow: 0 10px 40px -8px rgba(255,43,214,.6);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px -8px rgba(0,240,255,.6);
}
.btn--ghost {
  border-color: rgba(255,255,255,.2);
  color: var(--ink);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ===== Console art ===== */
.hero__art {
  display: flex; justify-content: center;
}
.console {
  width: 320px; max-width: 100%;
  background: linear-gradient(160deg, #2a1c5e, #120a30);
  border-radius: 28px;
  padding: 22px;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.08),
    0 30px 60px -20px rgba(0,0,0,.7),
    var(--shadow-neon-magenta);
  transform: rotate(-4deg);
  animation: tilt 6s ease-in-out infinite;
}
@keyframes tilt {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50%      { transform: rotate(-2deg) translateY(-8px); }
}
.console__screen {
  position: relative;
  height: 180px;
  border-radius: 16px;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, #001b1f 0%, #000 80%);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  color: var(--lime);
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 0 8px rgba(194,255,61,.7);
}
.console__pixel {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.console__pixel--1 { top: 20px; left: 20px;   background: var(--magenta); box-shadow: 0 0 12px var(--magenta); animation: blink 1.4s infinite; }
.console__pixel--2 { top: 30px; right: 24px;  background: var(--yellow);  box-shadow: 0 0 12px var(--yellow);  animation: blink 1.8s infinite .3s; }
.console__pixel--3 { bottom: 22px; left: 36px;background: var(--lime);    box-shadow: 0 0 12px var(--lime);    animation: blink 1.2s infinite .6s; }
.console__pixel--4 { bottom: 16px; right: 30px;background: var(--cyan);   box-shadow: 0 0 12px var(--cyan);    animation: blink 1.6s infinite .9s; }
@keyframes blink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

.console__btns {
  display: flex; gap: 12px; justify-content: flex-end;
  margin-top: 18px;
}
.console__btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--bg);
  box-shadow: 0 4px 0 rgba(0,0,0,.4);
}
.console__btn--a { background: var(--magenta); }
.console__btn--b { background: var(--cyan); }

/* ===== Section heads ===== */
.section-head {
  margin: 0 0 28px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  margin: 0;
  display: flex; align-items: baseline; gap: 14px;
  letter-spacing: 1px;
}
.section-head__num {
  font-size: .6em;
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255,43,214,.6);
}
.section-head__sub {
  margin: 8px 0 0;
  color: var(--muted);
}

/* ===== Games grid ===== */
.games {
  padding: 30px 0 60px;
}
.games__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.games__empty {
  text-align: center;
  padding: 60px 20px;
  border: 2px dashed rgba(255,255,255,.18);
  border-radius: var(--radius-lg);
  color: var(--muted);
  font-size: 18px;
  background: rgba(255,255,255,.02);
}

.game-card {
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
}
.game-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  transition: background .3s ease;
}
.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -20px rgba(0,240,255,.5);
  border-color: rgba(0,240,255,.4);
}
.game-card:hover::before {
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
}

.game-card__cover {
  aspect-ratio: 16/10;
  background:
    radial-gradient(circle at 30% 30%, rgba(0,240,255,.25), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(255,43,214,.25), transparent 60%),
    #1a1340;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.game-card__cover img {
  width: 100%; height: 100%; object-fit: cover;
}
.game-card__emoji {
  font-size: clamp(56px, 8vw, 88px);
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.4));
  transform: rotate(-8deg);
  transition: transform .3s ease;
}
.game-card:hover .game-card__emoji {
  transform: rotate(0deg) scale(1.08);
}
.game-card__play {
  position: absolute;
  bottom: 14px; right: 14px;
  background: var(--lime);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 999px;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 6px 20px -4px rgba(194,255,61,.6);
}
.game-card:hover .game-card__play {
  opacity: 1;
  transform: translateY(0);
}

.game-card__body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.game-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}
.game-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.game-card__tags {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.game-card__tags li {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,240,255,.1);
  color: var(--cyan);
  border: 1px solid rgba(0,240,255,.25);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ===== About ===== */
.about {
  padding: 40px 0 80px;
}
.about__card {
  background: linear-gradient(160deg, rgba(122,61,255,.18), rgba(255,43,214,.08));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 800px;
  margin: 0 auto;
}
.about__card h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  margin: 0 0 16px;
  letter-spacing: 1px;
}
.about__list {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: grid; gap: 10px;
  font-size: 17px;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 30px 24px 50px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer a { color: var(--cyan); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 0 60px;
    text-align: center;
  }
  .hero__eyebrow { justify-content: center; }
  .hero__cta     { justify-content: center; }
  .hero__counter { text-align: center; }
  .hero__lead    { margin-left: auto; margin-right: auto; }
  .console       { transform: rotate(-3deg) scale(.9); }
}
@media (max-width: 520px) {
  .nav            { display: none; }
  .site-header    { padding: 18px; }
  .logo__text     { font-size: 14px; }
  .about__card    { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
