:root {
    --bg-cream: #fff6e3;
    --bg-sky: #e6f2ff;
    --bg-mint: #e8fff3;
    --ink: #1f2a44;
    --muted: #59627a;
    --orange: #ffb703;
    --blue: #2f7dff;
    --teal: #2ec4b6;
    --blue-rgb: 47, 125, 255;
    --orange-rgb: 255, 183, 3;
    --teal-rgb: 46, 196, 182;
    --coral: #ff6f61;
    --shadow-soft: 0 10px 30px rgba(31, 42, 68, 0.12);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --max-width: 1280px;
    --font-display: "Baloo 2", "Comic Neue", cursive;
    --font-body: "Nunito", "Segoe UI", sans-serif;
}

/* Em telas grandes (TV/4K), aumenta um pouco o container sem exagerar */
@media (min-width: 1400px) {
    :root { --max-width: 1360px; }
}
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Evita faixa/rolagem horizontal no mobile (overflow) */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* fallback */
    overscroll-behavior-x: none;
}
@supports (overflow: clip) {
    html, body {
        overflow-x: clip;
    }
}

img, svg, video, canvas {
    max-width: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(1100px 700px at 10% -10%, #fff0c2 0%, rgba(255, 240, 194, 0) 70%),
        radial-gradient(900px 600px at 100% 0%, #d9ebff 0%, rgba(217, 235, 255, 0) 65%),
        linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-sky) 55%, var(--bg-mint) 100%);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    touch-action: pan-y;
    overscroll-behavior-x: none;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    opacity: 0.2;
}

body::before {
    width: 420px;
    height: 420px;
    background: #8ad1ff;
    top: -120px;
    right: 12%;
}

body::after {
    width: 320px;
    height: 320px;
    background: #4b8dff;
    bottom: -100px;
    left: 6%;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    z-index: 100;
}

.skip-link:focus {
    left: 16px;
}

.site-header {
    position: relative;
    overflow: hidden;
    padding: 18px 24px 70px;
    background: linear-gradient(135deg, #8ad1ff 0%, var(--blue) 55%, var(--teal) 100%);
    color: #fff;
    border-bottom-left-radius: 42px;
    border-bottom-right-radius: 42px;
}

.site-header::before,
.site-header::after {
    content: "";
    position: absolute;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.site-header::before {
    width: 180px;
    height: 180px;
    transform: rotate(18deg);
    top: -40px;
    left: -30px;
}

.site-header::after {
    width: 140px;
    height: 140px;
    transform: rotate(-12deg);
    bottom: -30px;
    right: 60px;
}

.nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.logo-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #fff;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 0 rgba(255, 255, 255, 0.4);
}

.nav-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-weight: 700;
}

.nav-links a {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.32);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: #fff;
    color: var(--blue);
    box-shadow: 0 12px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.hero {
    max-width: var(--max-width);
    margin: 32px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    align-items: center;
    animation: float-in 0.8s ease both;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3vw, 3rem);
    margin: 0 0 12px;
}

.hero p {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tag {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.hero-mascot-only {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 14px 0;
    transition: transform 0.18s ease;
    will-change: transform;
}

.hero-mascot-only:hover {
    transform: translateY(-6px);
}

.hero-mascot-only::before {
    content: "";
    position: absolute;
    width: clamp(220px, 34vw, 360px);
    height: clamp(220px, 34vw, 360px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-mascot-only img {
    width: clamp(220px, 34vw, 360px);
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 14px 24px rgba(31, 42, 68, 0.20));
    position: relative;
    z-index: 1;
    transition: transform 0.18s ease, filter 0.18s ease;
    will-change: transform;
}

.hero-mascot-only:hover img {
    transform: scale(1.04) rotate(-2deg);
    filter: drop-shadow(0 18px 30px rgba(31, 42, 68, 0.24));
}

.hero-mascot-name {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 2.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #fff;
    text-shadow: 0 10px 22px rgba(31, 42, 68, 0.28);
}

.hero-card {
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow-soft);
    position: relative;
    animation: float-in 0.9s ease 0.1s both;
}

.hero-card::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 24px;
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: linear-gradient(135deg, #8ad1ff, var(--teal));
    opacity: 0.2;
}

.hero-card h3 {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 1.4rem;
}

.hero-card ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.6;
}

.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2vw, 2.1rem);
    margin: 0 0 18px;
}

.section-subtitle {
    color: var(--muted);
    margin: 0 0 28px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: -40px;
}

.stat-card {
    background: #fff;
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 2px dashed rgba(47, 125, 255, 0.28);
    animation: rise 0.7s ease both;
}

.stat-card span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--blue);
}

.stat-card p {
    margin: 4px 0 0;
    color: var(--muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 3px solid transparent;
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
    animation: rise 0.7s ease both;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 14px 34px rgba(31, 42, 68, 0.14);
}

.category-card:focus-visible {
    outline: 4px solid rgba(var(--blue-rgb), 0.55);
    outline-offset: 6px;
}

.category-icon {
    font-size: 2.4rem;
}

.category-card h4 {
    margin: 12px 0 8px;
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card {
    background: #fff;
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    animation: rise 0.7s ease both;
}

.feature-card h4 {
    margin: 0 0 10px;
    font-family: var(--font-display);
}

.game-section {
    margin-top: 20px;
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pill {
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 2px dashed rgba(31, 42, 68, 0.15);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(31, 42, 68, 0.06);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.filter-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 rgba(31, 42, 68, 0.08);
}

.filter-pill:active {
    transform: translateY(1px);
    box-shadow: 0 4px 0 rgba(31, 42, 68, 0.08);
}

.filter-pill.is-active {
    border-style: solid;
    color: #fff;
}

.filter-pill.is-active[data-filter="todos"] {
    background: var(--orange);
    border-color: rgba(var(--orange-rgb), 0.75);
    box-shadow: 0 8px 0 rgba(var(--orange-rgb), 0.25);
}

.filter-pill.is-active[data-filter="portugues"] {
    background: var(--teal);
    border-color: rgba(var(--teal-rgb), 0.75);
    box-shadow: 0 8px 0 rgba(var(--teal-rgb), 0.25);
}

.filter-pill.is-active[data-filter="matematica"] {
    background: var(--blue);
    border-color: rgba(var(--blue-rgb), 0.75);
    box-shadow: 0 8px 0 rgba(var(--blue-rgb), 0.25);
}

.filter-pill.is-active[data-filter="geral"] {
    background: var(--coral);
    border-color: rgba(255, 111, 97, 0.8);
    box-shadow: 0 8px 0 rgba(255, 111, 97, 0.25);
}

.search {
    display: flex;
    flex: 1 1 260px;
    max-width: 360px;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    border: 2px solid rgba(31, 42, 68, 0.08);
    box-shadow: var(--shadow-soft);
}

.search input {
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    min-width: 0;
    width: 100%;
    background: transparent;
}

.container-jogos{
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

/* Responsivo: 2 / 3 / 4 cards por linha */
@media (min-width: 560px){
    .container-jogos{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px){
    .container-jogos{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px){
    .container-jogos{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1600px){
    .container-jogos{ gap: 22px; }
}
.card-jogo{
    --accent-rgb: var(--blue-rgb);
    background: #fff;
    border: 3px solid rgba(var(--accent-rgb), 0.35);
    border-radius: var(--radius-lg);
    padding: clamp(14px, 1.1vw, 18px);
    text-decoration: none;
    color: var(--ink);
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 0 rgba(var(--accent-rgb), 0.18), var(--shadow-soft);
    animation: rise 0.6s ease both;
}

.card-jogo:nth-child(3n+2) {
    animation-delay: 0.05s;
}

.card-jogo:nth-child(3n+3) {
    animation-delay: 0.1s;
}

.card-jogo:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--accent-rgb), 0.6);
    box-shadow: 0 11px 0 rgba(var(--accent-rgb), 0.22), 0 18px 32px rgba(31, 42, 68, 0.16);
}

.card-jogo:hover .card-thumb img,
.card-jogo:hover .card-thumb .thumb-emoji{
    transform: scale(1.04) rotate(-2deg);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
}

.card-title-wrap{
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.card-title-wrap .titulo-jogo{
    margin: 0;
}

.card-title-wrap .materia{
    align-self: flex-start;
    margin: 0;
    font-size: clamp(0.72rem, 0.65vw, 0.9rem);
    padding: 5px 10px;
}

/* Thumb do card: img/cards/<nome_do_html>.png (fallback para emoji) */
.card-thumb{
    width: 100%;
    height: clamp(120px, 12vw, 170px);
    border-radius: calc(var(--radius-md) + 2px);
    background: rgba(47, 125, 255, 0.10);
    overflow: hidden;
    position: relative;
    display: grid;
    place-items: center;
}

.card-thumb img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.card-thumb .thumb-emoji{
    font-size: clamp(2.2rem, 3.2vw, 3.2rem);
    filter: drop-shadow(0 8px 18px rgba(31, 42, 68, 0.15));
    transform: translateY(0) scale(1);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.card-thumb.is-loaded img{
    opacity: 1;
    transform: scale(1);
}

.card-thumb.is-loaded .thumb-emoji{
    opacity: 0;
}

.card-jogo.has-thumb .card-header{
    margin-top: 10px;
}

.card-jogo.has-thumb .card-header .icone{
    display: none;
}
.icone {
    width: clamp(56px, 4.2vw, 96px);
    height: clamp(56px, 4.2vw, 96px);
    font-size: clamp(2.2rem, 2.2vw, 3.2rem);
    display: grid;
    place-items: center;
    border-radius: clamp(16px, 1.2vw, 22px);
    background: rgba(47, 125, 255, 0.12);
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.icone-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: clamp(6px, 0.6vw, 12px);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    background: transparent;
}

.icone-emoji {
    position: relative;
    z-index: 1;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.icone.is-loaded .icone-img {
    opacity: 1;
}

.icone.is-loaded .icone-emoji {
    opacity: 0;
}
.materia {
    font-size: clamp(0.75rem, 0.7vw, 0.95rem);
    font-weight: 800;
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.nivel {
    font-size: clamp(0.9rem, 0.7vw, 1.05rem);
    color: var(--muted);
    font-weight: 600;
}

.titulo-jogo {
    font-size: clamp(1.02rem, 0.9vw, 1.3rem);
    font-weight: 800;
    margin: 0;
    line-height: 1.15;
}

.portugues {
    --accent-rgb: var(--blue-rgb);
}

.portugues .materia {
    background: var(--blue);
}

.portugues .icone {
    background: rgba(75, 141, 255, 0.18);
}

.matematica {
    --accent-rgb: var(--orange-rgb);
}

.matematica .materia {
    background: var(--orange);
}

.matematica .icone {
    background: rgba(255, 183, 3, 0.18);
}

.memoria {
    --accent-rgb: var(--teal-rgb);
}

.memoria .materia {
    background: var(--teal);
}

.memoria .icone {
    background: rgba(46, 196, 182, 0.18);
}

.updates {
    margin-top: 50px;
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    border: 3px dashed rgba(255, 92, 122, 0.25);
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.updates-card {
    background: #fff7f9;
    border-radius: var(--radius-md);
    padding: 18px;
    border: 2px solid rgba(255, 92, 122, 0.2);
}

.updates-card span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #ff5c7a;
}

/* ===== SEÇÃO NOVIDADES CAROUSEL ===== */
.novidades-section {
    margin-top: 25px;
    margin-bottom: 5px;
}

.novidades-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.novidades-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6f61, #ffb703);
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
    box-shadow: 0 4px 10px rgba(255, 111, 97, 0.35);
}

.novidades-nav-btns {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.nav-carousel-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(47, 125, 255, 0.25);
    background: #fff;
    color: var(--blue);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(47, 125, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, color 0.18s, transform 0.15s, box-shadow 0.15s;
}

.nav-carousel-btn:hover {
    background: var(--blue);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(47, 125, 255, 0.30);
}

.nav-carousel-btn:active {
    transform: scale(0.95);
}

.novidades-carousel-wrap {
    overflow: hidden;
    position: relative;
}

.novidades-carousel {
    display: flex;
    gap: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* hide native scrollbar but keep scroll functional */
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 8px;
}

.novidades-carousel::-webkit-scrollbar { display: none; }

.novidade-item {
    min-width: 230px;
    max-width: 230px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.novidade-item .novidade-link {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.novidade-item .card-jogo {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.novidade-item .titulo-jogo {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.4em;
}

.novidade-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.novidade-link .card-jogo {
    transition: transform 0.2s ease;
}

.novidade-link:hover .card-jogo {
    transform: translateY(-5px);
}


.site-footer {
    background: #1f2a44;
    color: #f8f8f8;
    padding: 40px 24px;
    margin-top: 40px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.footer-content h4 {
    font-family: var(--font-display);
    margin: 0 0 12px;
}

.footer-links a {
    color: #f8f8f8;
    text-decoration: none;
    display: inline-block;
    margin: 6px 0;
}

.footer-note {
    text-align: center;
    margin-top: 24px;
    color: rgba(248, 248, 248, 0.7);
    font-size: 0.9rem;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    /* Evita “pulos”/engasgos ao rolar (principalmente iOS/Safari) */
    body::before,
    body::after {
        position: absolute;
    }

    body::before {
        width: 340px;
        height: 340px;
        top: -160px;
        right: -160px;
        opacity: 0.18;
    }

    body::after {
        width: 260px;
        height: 260px;
        bottom: -140px;
        left: -140px;
        opacity: 0.16;
    }

    .site-header {
        padding: 16px 16px 44px;
        border-bottom-left-radius: 34px;
        border-bottom-right-radius: 34px;
    }

    .nav {
        justify-content: center;
        gap: 10px;
    }

    .logo {
        width: 100%;
        justify-content: center;
        font-size: 1.45rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding: 2px 2px 6px;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        white-space: nowrap;
        flex: 0 0 auto;
        padding: 7px 10px;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
    }

    .hero {
        margin-top: 20px;
        gap: 18px;
        animation: none;
    }

    .hero-actions,
    .hero-tags {
        justify-content: center;
    }

    .hero-mascot-only {
        padding: 6px 0 0;
    }

    .main {
        padding: 30px 14px 70px;
    }

    .stats {
        margin-top: -28px;
        gap: 14px;
    }

    .stat-card,
    .feature-card,
    .card-jogo {
        animation: none;
    }

    .game-actions {
        justify-content: center;
        align-items: stretch;
    }

    .filters {
        width: 100%;
        justify-content: center;
    }

    .search {
        width: 100%;
        max-width: none;
    }

    .container-jogos {
        gap: 14px;
    }

    .modal-card {
        max-height: calc(100vh - 24px);
        overflow: auto;
    }

    .modal-body {
        padding: 16px 16px 18px;
    }
}

/* Em telas touch, evita o “hover preso” e movimentos estranhos após tocar */
@media (hover: none), (pointer: coarse) {
    a, button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .nav-links a:hover,
    .btn:hover,
    .btn-primary:hover,
    .btn-outline:hover,
    .filter-pill:hover,
    .btn-play:hover,
    .btn-details:hover,
    .hero-mascot-only:hover,
    .hero-mascot-only:hover img,
    .card-jogo:hover,
    .card-jogo:hover .card-thumb img,
    .card-jogo:hover .card-thumb .thumb-emoji {
        transform: none !important;
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.18) !important;
    }

    .filter-pill:hover {
        box-shadow: 0 6px 0 rgba(31, 42, 68, 0.06) !important;
    }

    .btn-primary:hover {
        box-shadow: 0 12px 0 rgba(255, 255, 255, 0.35) !important;
    }

    .card-jogo:hover {
        border-color: rgba(var(--accent-rgb), 0.35) !important;
        box-shadow: 0 8px 0 rgba(var(--accent-rgb), 0.18), var(--shadow-soft) !important;
    }

    .btn-play:hover {
        background: rgba(47, 125, 255, 0.12) !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}

.card-jogo {
    cursor: pointer;
}

.card-jogo:focus-visible {
    outline: 4px solid rgba(47, 125, 255, 0.35);
    outline-offset: 4px;
}

.card-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(31, 42, 68, 0.08);
}

.btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    background: rgba(47, 125, 255, 0.12);
    border: 2px solid rgba(47, 125, 255, 0.2);
    transition: transform 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.btn-play:hover {
    transform: translateY(-2px);
    background: rgba(47, 125, 255, 0.18);
}

.matematica .btn-play {
    background: rgba(255, 183, 3, 0.14);
    border-color: rgba(255, 183, 3, 0.22);
}

.matematica .btn-play:hover {
    background: rgba(255, 183, 3, 0.2);
}

.memoria .btn-play {
    background: rgba(46, 196, 182, 0.14);
    border-color: rgba(46, 196, 182, 0.22);
}

.memoria .btn-play:hover {
    background: rgba(46, 196, 182, 0.2);
}

.btn-details {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 2px dashed rgba(31, 42, 68, 0.16);
    background: #fff;
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--ink);
    display: grid;
    place-items: center;
    transition: transform 0.2s ease, border 0.2s ease;
}

.btn-details:hover {
    transform: translateY(-2px);
    border-color: rgba(47, 125, 255, 0.35);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(31, 42, 68, 0.45);
    z-index: 200;
}

.modal[aria-hidden="false"] {
    display: flex;
}

.modal-card {
    width: min(680px, 100%);
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(31, 42, 68, 0.3);
    overflow: hidden;
    transform-origin: center;
    animation: float-in 0.18s ease both;
}

.modal-header {
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #e8f4ff 0%, #ffffff 65%);
}

.modal-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1.15;
}

.modal-sub {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.modal-close {
    width: 44px;
    height: 44px;
    border-radius: 18px;
    border: none;
    background: rgba(31, 42, 68, 0.08);
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
}

.modal-body {
    padding: 18px 22px 22px;
    display: grid;
    gap: 14px;
}

.modal-block {
    border-radius: var(--radius-lg);
    border: 2px solid rgba(31, 42, 68, 0.08);
    padding: 14px 14px;
}

.modal-block h4 {
    margin: 0 0 8px;
    font-family: var(--font-display);
}

.bncc-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(47, 125, 255, 0.12);
    border: 2px dashed rgba(47, 125, 255, 0.25);
    font-weight: 800;
}

.mascot-slot {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.mascot-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
}

/* ===== MENU MOBILE / LAYOUT MOBILE LIMPO ===== */
.btn-mobile-menu { display: none; }

.btn-cta-jogar .cta-mobile{ display:none; }
.btn-cta-jogar .cta-desktop{ display:inline; }

.mobile-drawer{
    position: fixed;
    inset: 0;
    background: rgba(31, 42, 68, 0.55);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 14px;
    z-index: 9999;
}
body.menu-open .mobile-drawer{ display: flex; }

.mobile-drawer-card{
    width: min(520px, 100%);
    background: #fff;
    color: var(--ink);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(31, 42, 68, 0.35);
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.25);
}
.mobile-drawer-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #e8f4ff 0%, #ffffff 70%);
}
.mobile-drawer-title{
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: .4px;
}
.mobile-drawer-close{
    width: 42px;
    height: 42px;
    border-radius: 16px;
    border: none;
    background: rgba(31, 42, 68, 0.08);
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
}
.mobile-drawer-links{
    display: grid;
    gap: 10px;
    padding: 14px 16px 18px;
}
.mobile-drawer-links a{
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 800;
    color: var(--ink);
    background: rgba(47, 125, 255, 0.08);
    border: 2px solid rgba(47, 125, 255, 0.12);
}

@media (max-width: 720px) {
    /* Desktop permanece igual; no mobile, deixamos a home mais “clean” */
    .nav{
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
    }
    .logo{
        width: auto;
        justify-content: flex-start;
    }
    .nav-links{ display: none; } /* evita scroll horizontal e bugs de arrasto */
    .nav-actions{
        width: auto;
        justify-content: flex-end;
        gap: 10px;
    }
    .btn-mobile-menu{
        display: inline-flex;
        padding: 10px 14px;
    
        background: rgba(255, 255, 255, 0.92);
        color: var(--blue);
        border-color: rgba(255, 255, 255, 0.85);
        box-shadow: 0 10px 0 rgba(255, 255, 255, 0.20);
        -webkit-appearance: none;
        appearance: none;
    }

    /* Ajustes pedidos: remover "Explorar jogos" no topo e mudar CTA para "Jogar agora" */
    .btn-explorar-top{ display:none !important; }
    .btn-cta-jogar .cta-desktop{ display:none; }
    .btn-cta-jogar .cta-mobile{ display:inline; }

    /* Hero mais enxuto */
    .hero{
        grid-template-columns: 1fr !important;
        text-align: left;
        gap: 14px;
    }
    .hero h1{
        font-size: 2.0rem;
        line-height: 1.12;
        margin-bottom: 10px;
    }
    .hero p{
        font-size: 1rem;
        margin-bottom: 14px;
    }
    .hero-actions{
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .hero-actions .btn{
        width: 100%;
        justify-content: center;
        padding: 14px 16px;
    }
    .hero-tags{
        display: none; /* informação boa, mas no mobile deixa poluído */
    }
    .hero-mascot-only{
        order: -1; /* mascote sobe, fica leve */
        padding: 2px 0 0;
    }
    .hero-mascot-only::before{ opacity: .12; }
    .hero-mascot-name{ display: none; }

    /* Stats em 2 colunas, mais compactas */
    .stats{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: -22px;
    }
    .stat-card{ padding: 16px; }
    .stat-card span{ font-size: 1.6rem; }

    /* Cards dos jogos: 1 coluna no mobile, mais “tap friendly” */
    .container-jogos{
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
    .card-thumb{ height: 150px; }
    .btn-play{ padding: 12px 14px; }

    /* Seções abaixo: menos texto e mais respiro */
    .section-subtitle{ margin-bottom: 18px; }
    .feature-grid, .category-grid, .updates-grid{
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
}

/* Menu rápido em linha com separadores */
.footer-quick-links a{
    display: inline;
    margin: 0;
    padding: 0;
}
.footer-quick-links a + a::before{
    content: " | ";
    opacity: 0.75;
}

/* ===== BOTÃO VOLTAR AO TOPO ===== */
.btn-topo {
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(47, 125, 255, 0.40);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.18s ease;
    z-index: 999;
}

.btn-topo.visivel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-topo:hover {
    background: #1a6cf2;
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(47, 125, 255, 0.50);
}

.btn-topo:active {
    transform: translateY(0);
}

