:root{
  --sky-top: #b8e3ff;   /* céu claro */
  --sky-mid: #8ed0ff;   /* céu médio */
  --sky-bottom: #dff4ff;/* neblina */
  --sea: #77baff;
  --sun: #ffe066;
  --ink: #14213d;
  --ink-70: rgba(20, 33, 61, .7);
  --brand: #2a9d8f;
  --brand-accent: #ffd166;
  --card: #ffffff;
  --muted: #6582a6;
  --shadow: 0 10px 30px rgba(17, 37, 64, .12);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}
html, body { height: 100%; }
body{
  margin: 0;
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Nunito, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  color: var(--ink);
  background:
  radial-gradient(1100px 300px at 80% -80%, var(--sun) 0%, rgba(255,224,102,0.25) 35%, rgba(255,224,102,0) 60%),
  linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-top) 100%);
  overflow-x: hidden;
}

/* ====== Layout básico ====== */
.container{ width: min(1200px, 92vw); margin: 0 auto; }

header{
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(6px);
  background: linear-gradient(to bottom, rgba(255,255,255,.75), rgba(255,255,255,.45));
  box-shadow: 0 3px 10px rgba(0,0,0,.06);
}
.topbar{ display: flex; align-items:center; justify-content:space-between; padding: 15px 0px; }
.logo{ display:flex; align-items:center; gap:10px; text-decoration:none; color: var(--ink); font-weight:800; letter-spacing:.2px; }
.logo svg{ width: 38px; height: 38px; }

nav ul{ list-style: none; padding: 0; margin: 0; display:flex; gap: 18px; align-items:center; }
nav a{
  text-decoration: none; font-weight:700; color: var(--ink);
  padding: 8px 30px; border-radius: 999px; transition: padding .2s ease, background .2s ease;     
}

nav a.n1{ background: #ffc000; color: #ffffff }
nav a.n1:hover{ background: #e29a00; padding: 15px 30px; }

nav a.n2{ background: #46B1FC; color: #ffffff }
nav a.n2:hover{ background: #007ed6; padding: 15px 30px; }

nav a.n3 { background: #2CA193; color: #fff;}
nav a.n3:hover { background: #178578; padding: 15px 30px; }

/* ====== Menu Hambúrguer ====== */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  z-index: 100;
}
.hamburger .bar {
  width: 28px;
  height: 3px;
  background-color: var(--ink);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

/* ====== Hero ====== */
.hero{ position: relative; padding: clamp(38px, 6vw, 60px) 0 40px; }
.hero .grid{ display:grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items:center; }
.headline{ font-size: clamp(28px, 3.6vw, 46px); line-height: 1.05; margin: 0 0 10px; font-weight: 900; }
.sub{ font-size: clamp(16px, 2.1vw, 20px); color: var(--ink-70); margin: 0 0 10px; }

.cta-row{ display:flex; flex-wrap: wrap; gap: 12px; align-items:center; }
.btn{ display:inline-flex; align-items:center; justify-content: center; gap:10px; border-radius: 999px; padding: 12px 18px; font-weight:800; text-decoration:none; box-shadow: var(--shadow); border: 0px solid rgba(0,0,0,.05); }

.btn.primary{ background: linear-gradient(135deg, #40aefb 0%, #75c6ff 100%); color: #fff; border:none;}
.btn.primary:hover{ background: linear-gradient(135deg, #64bbf7 0%, #9fd7ff 100%); color: #fff; }

.btn.secondary{ background: linear-gradient(135deg, var(--brand) 0%, #43c2b5 100%); color: #fff; border:none;}
.btn.secondary:hover{ background: linear-gradient(135deg, #4abcae 0%, #67dcd0 100%); color: #fff;}

.mockup{ background: rgba(255,255,255,.7); border-radius: var(--radius-xl); padding: 16px; box-shadow: var(--shadow); }
.mockup-inner{ aspect-ratio: 16/10; border-radius: var(--radius-lg); background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%); position: relative; overflow: hidden; }

/* ====== Cards ====== */
.section{ padding: 32px 0 70px; position: relative; }
.section h2{ font-size: clamp(22px, 2.8vw, 32px); margin: 0 0 18px; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* duas colunas */
  gap: 20px;
}
.cards.game-grid {
  grid-template-columns: repeat(3, 1fr); /* três colunas para os destaques */
}

.card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
}

/* Badge no topo à direita */
.card .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 20px;
}
.card .badge.primary { background: #46B1FC; }
.card .badge.secondary { background: #2CA193; }

/* Botões textuais nas capas de categorias */
.card .btn-text {
  position: absolute;
  bottom: 15px;
  right: 15px;
  padding: 10px 20px;
  border-radius: 999px;
  color: white;
  font-weight: bold;
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease;
}
.card.category-card:hover .btn-text { transform: scale(1.05); }
.card .btn-text.primary { background: linear-gradient(135deg, #40aefb 0%, #75c6ff 100%); }
.card .btn-text.secondary { background: linear-gradient(135deg, var(--brand) 0%, #43c2b5 100%); }

/* Botão play (redondo) no canto inferior direito */
.card .btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid white;
  padding: 0;
  transition: transform 0.2s ease;
}
.card .btn svg {
  width: 64px;
  height: 64px;
  color: white;
}
.card .btn:hover { transform: scale(1.15); }

/* Linha de botões "Ver Mais" */
.actions-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 40px;
}

section#jogos {
  padding-top: 0;
  padding-bottom: 100px;
}

/* ====== Rodapé ====== */
footer { 
  position: fixed; 
  bottom: 0; left: 0; right: 0; 
  text-align: center; 
  background: rgba(255,255,255,.6); 
  padding: 5px; 
  border-top: 1px dashed rgba(0,0,0,.08); 
  z-index: 40;
}
.foot small { color: var(--muted); }

/* ====== SVG de fundo ====== */
.bg-stage{
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: visible;
}
.ground-gradient{
  position: fixed; left: 0; right: 0; bottom: 0; height: 22vh; z-index: -1;
  background: linear-gradient(to top, rgba(120, 184, 255, .25), rgba(120, 184, 255, 0));
}

/* --- Modal overlay --- */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

/* --- Conteúdo --- */
.modal-content {
  position: relative;
  width: 100%;
  height: 100%;
}

/* --- Botão fechar --- */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  background: rgba(0,0,0,0.6);
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  z-index: 10000;
}
.close-btn:hover { background: rgba(255,0,0,0.8); }

/* --- Frame do jogo --- */
#gameFrame { width: 100%; height: 100%; border: none; cursor: pointer; box-shadow: none; }


/* ====== Responsividade ====== */
@media (max-width: 980px){
  .hero .grid{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: repeat(2, 1fr); } 
  .cards.game-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid{ grid-template-columns: 1fr; }
  .close-btn { max-width: 50px; top: 5px; left: 5px; font-size: 1rem; }
}
@media (max-width: 640px){
  /* Mostra o Hamburger no Mobile */
  .hamburger { display: flex; }
  
  /* Configuração do Nav no Mobile */
  nav#nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    padding: 20px;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); /* Esconde suavemente */
    transition: clip-path 0.4s ease-in-out;
  }
  nav#nav-menu.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); /* Mostra o menu */
  }
  
  nav#nav-menu ul { flex-direction: column; align-items: stretch; }
  nav#nav-menu ul li { text-align: center; }
  nav#nav-menu ul li a { display: block; padding: 12px; border-radius: 8px;}

  /* Animação do Hamburger virando "X" */
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .cards{ grid-template-columns: 1fr; } 
  .cards.game-grid { grid-template-columns: 1fr; }
  .close-btn { max-width: 50px; top: 5px; left: 5px; font-size: 1rem; }
}