/* ════════════════════════════════════════════════════════
   JOGOS — Hub + Pokémon do Dia
   Professor TCG Theme  |  v1.1
   Paleta: #0F1E3C (navy) | #0A1528 (navy escuro) | #F5B800 (amarelo)
════════════════════════════════════════════════════════ */

/* ─── HERO (compartilhado hub + jogo) ─── */
.jogos-hero,
.pkm-dia-hero {
    position: relative;
    background: #0F1E3C;
    padding: 100px 0 60px;
    text-align: center;
    overflow: hidden;
}

.jogos-hero__bg {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='20' stroke='rgba(255,255,255,0.04)' stroke-width='2' fill='none'/%3E%3Ccircle cx='30' cy='30' r='7' fill='rgba(255,255,255,0.03)'/%3E%3Crect x='10' y='29' width='40' height='2' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    pointer-events: none;
}

.jogos-hero__content { position: relative; z-index: 1; }

.jogos-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    color: #fff;
    line-height: 1;
    margin: 12px 0 16px;
    letter-spacing: 0.02em;
}

.jogos-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: rgba(255,255,255,0.75);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Breadcrumb no hero do jogo */
.pkm-breadcrumb { margin-bottom: 12px; }
.pkm-breadcrumb a {
    color: #F5B800;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.pkm-breadcrumb a:hover { opacity: 1; }

/* ─── HUB: Seção grid ─── */
.jogos-grid-section {
    background: #F5B800;
    padding: 60px 0 80px;
}

.jogos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) { .jogos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .jogos-grid { grid-template-columns: 1fr; } }

/* ─── Card de jogo ─── */
.jogo-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: #0F1E3C;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jogo-card:not(.jogo-card--soon):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 36px rgba(0,0,0,0.2);
}

.jogo-card--soon { opacity: 0.55; cursor: default; }

.jogo-card__icon { font-size: 2.4rem; line-height: 1; }

.jogo-card__badge {
    display: inline-block;
    background: #0F1E3C;
    color: #F5B800;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 3px 10px;
    border-radius: 99px;
    width: fit-content;
    text-transform: uppercase;
}

.jogo-card__badge--soon { background: #e5e7eb; color: #9ca3af; }

.jogo-card__title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    margin: 0;
    line-height: 1.1;
}

.jogo-card__desc {
    font-size: 0.92rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.jogo-card__cta {
    display: inline-block;
    font-weight: 800;
    font-size: 0.9rem;
    color: #0F1E3C;
    margin-top: auto;
    padding-top: 4px;
}

.jogo-card__cta--disabled { color: #9ca3af; }

/* ═══════════════════════════════════════════
   GAME SECTION
═══════════════════════════════════════════ */
.pkm-game-section {
    background: #0A1528;
    padding: 48px 0 80px;
    min-height: 50vh;
}

.pkm-game-section .container { max-width: 920px; }

/* ─── Input / Autocomplete ─── */
.pkm-input-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.pkm-autocomplete-container {
    position: relative;
    flex: 1;
}

.pkm-input {
    width: 100%;
    background: #1a2d4a;
    border: 2px solid #2a3d5a;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    padding: 12px 16px;
    outline: none;
    font-family: 'Nunito', sans-serif;
    transition: border-color 0.2s, padding-left 0.15s;
    box-sizing: border-box;
}

.pkm-input:focus  { border-color: #F5B800; }
.pkm-input::placeholder { color: rgba(255,255,255,0.3); }
.pkm-input:disabled { opacity: 0.5; cursor: wait; }

/* ─── Sprite selecionado no input ─── */
.pkm-selected-sprite {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    object-fit: contain;
    z-index: 5;
    pointer-events: none;
    image-rendering: pixelated;
}

.pkm-autocomplete-container.has-sprite .pkm-input {
    padding-left: 56px;
}

/* ─── Dropdown de sugestões (com sprites) ─── */
.pkm-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #1a2d4a;
    border: 2px solid #2a3d5a;
    border-radius: 10px;
    list-style: none;
    margin: 0; padding: 4px 0;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.pkm-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    cursor: pointer;
    color: #e2e8f0;
    font-size: 0.95rem;
    transition: background 0.12s;
}

.pkm-suggestion:hover,
.pkm-suggestion--active {
    background: rgba(245,184,0,0.18);
    color: #F5B800;
}

.pkm-suggestion__sprite {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    image-rendering: pixelated;
}

.pkm-submit-btn {
    background: #F5B800;
    color: #0F1E3C;
    font-weight: 800;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

.pkm-submit-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pkm-submit-btn:not(:disabled):hover { background: #e0a800; }

/* ─── Status (sem limite) ─── */
.pkm-status {
    color: rgba(255,255,255,0.5);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

/* ─── Legenda de cores ─── */
.pkm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 20px;
}

.pkm-legend__item {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Cabeçalho das colunas ─── */
.pkm-board-header {
    display: grid;
    grid-template-columns: 2fr repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 6px;
}

.pkm-col-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.35);
    padding: 4px 2px;
}

.pkm-col-header--name { text-align: left; }

/* ─── Linha de chute ─── */
.pkm-guess-row {
    display: grid;
    grid-template-columns: 2fr repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
    animation: pkm-slidein 0.28s ease;
}

@keyframes pkm-slidein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Tiles ─── */
.pkm-tile {
    border-radius: 7px;
    padding: 9px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}

.pkm-tile--name {
    background: #1a2d4a;
    justify-content: flex-start;
    padding: 6px 10px;
    border-radius: 7px;
    gap: 7px;
}

.pkm-tile__sprite {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
    image-rendering: pixelated;
}

.pkm-tile__val {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
}

.pkm-tile--name .pkm-tile__val {
    font-size: 0.82rem;
    text-align: left;
}

.pkm-tile--correct  { background: #22c55e; }
.pkm-tile--partial  { background: #F5B800; }
.pkm-tile--wrong    { background: #ef4444; }

.pkm-tile--correct .pkm-tile__val,
.pkm-tile--partial .pkm-tile__val { color: #0F1E3C; }

/* ─── Dica do Professor ─── */
.pkm-hints {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pkm-hint {
    background: #0F1E3C;
    border: 2px solid #F5B800;
    border-radius: 12px;
    padding: 18px 22px;
    animation: pkm-fadein 0.4s ease;
}

@keyframes pkm-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pkm-hint__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pkm-hint__icon { font-size: 1.1rem; }

.pkm-hint__label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #F5B800;
}

.pkm-hint__text {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.65;
    font-style: italic;
    margin: 0;
}

/* ═══════════════════════════════════════════
   MODAL DE RESULTADO
═══════════════════════════════════════════ */
.pkm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pkm-modal[hidden] { display: none; }

.pkm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.pkm-modal__box {
    position: relative;
    background: #0F1E3C;
    border: 2px solid #F5B800;
    border-radius: 20px;
    padding: 44px 32px 28px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
    animation: pkm-modalin 0.32s cubic-bezier(0.34,1.56,0.64,1);
    overflow-y: auto;
    max-height: 92vh;
}

@keyframes pkm-modalin {
    from { opacity: 0; transform: scale(0.88) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pkm-modal__close {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.pkm-modal__close:hover { background: rgba(255,255,255,0.2); }

.pkm-modal__emoji { font-size: 2.4rem; line-height: 1; margin-bottom: 6px; }

.pkm-modal__title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: #F5B800;
    margin: 0 0 4px;
    letter-spacing: 0.03em;
}

.pkm-modal__subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin: 0 0 10px;
}

/* ─── Imagem do Pokémon no modal ─── */
.pkm-modal__img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
    filter: drop-shadow(0 4px 20px rgba(245,184,0,0.25));
    animation: pkm-popin 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes pkm-popin {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}

.pkm-modal__pokemon {
    background: rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px;
    line-height: 1.6;
}

.pkm-modal__pokemon strong { color: #F5B800; font-size: 0.95rem; }

/* Grade de emojis — sem spoiler */
.pkm-modal__grid {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    white-space: pre;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.7;
    font-family: monospace;
    text-align: center;
    overflow-x: auto;
}

/* ─── Streak da semana no modal ─── */
.pkm-modal__streak {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 16px 12px 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.pkm-modal__streak-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

/* Linha horizontal de bolinhas */
.pkm-streak__week {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 12px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.pkm-streak__day {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* Bolinha com letra ou ícone dentro */
.pkm-streak__icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
    line-height: 1;
}

/* Quando contém emoji */
.pkm-streak__icon--emoji {
    font-size: 1.25rem !important;
    padding-bottom: 2px; /* Ajuste fino para emoji não subir */
}

/* ── Estados das bolinhas ── */
.pkm-streak__day--win .pkm-streak__icon {
    background: #F5B800;
    border-color: #F5B800;
    color: #0F1E3C;
    box-shadow: 0 4px 12px rgba(245,184,0,0.3);
}

.pkm-streak__day--freeze .pkm-streak__icon {
    background: #64C8FF;
    border-color: #64C8FF;
    color: #0F1E3C;
    box-shadow: 0 4px 12px rgba(100,200,255,0.3);
}

.pkm-streak__day--miss .pkm-streak__icon {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.2);
}

.pkm-streak__day--future .pkm-streak__icon {
    background: transparent;
    border-color: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.15);
    border-style: dashed;
}

/* Hoje: brilho externo */
.pkm-streak__day--today .pkm-streak__icon {
    border-color: #F5B800;
    box-shadow: 0 0 0 2px rgba(245,184,0,0.2), 0 4px 12px rgba(0,0,0,0.3);
}

/* Info (streak count + gelinhos) */
.pkm-modal__streak-info {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
    line-height: 1.4;
}

.pkm-modal__streak-info strong { color: #F5B800; }

/* ── Teaser para não logados ── */
.pkm-modal__streak--locked {
    position: relative;
    overflow: hidden;
}

.pkm-modal__streak--locked .pkm-streak__icon {
    filter: blur(2px);
    opacity: 0.5;
}

.pkm-modal__streak--locked .pkm-modal__streak-info {
    background: rgba(15,30,60,0.8);
    padding: 8px;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    font-weight: 600;
}

.pkm-modal__streak-info a {
    color: #F5B800;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ─── Botões de ação ─── */

.pkm-modal__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Botão Instagram (amarelo) */
.pkm-modal__share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    font-family: 'Nunito', sans-serif;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, opacity 0.2s;
    width: 100%;
}

.pkm-modal__share-btn:active { transform: scale(0.97); }
.pkm-modal__share-btn:disabled { opacity: 0.5; cursor: wait; }

/* Botão principal — Story (amarelo) */
.pkm-modal__share-btn--insta {
    background: #F5B800;
    color: #0F1E3C;
}
.pkm-modal__share-btn--insta:hover:not(:disabled) { background: #e0a800; }

/* Wrapper de label + subtítulo dentro do botão de story */
.pkm-modal__share-btn-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}
.pkm-modal__share-btn-sub {
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0.75;
    letter-spacing: 0.01em;
}

/* Botão secundário — Copiar (borda) */
.pkm-modal__share-btn--copy {
    background: transparent;
    color: rgba(255,255,255,0.75);
    border: 1.5px solid rgba(255,255,255,0.2);
}
.pkm-modal__share-btn--copy:hover:not(:disabled) {
    background: rgba(255,255,255,0.07);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* Botão terciário — Desafiar um amigo */
.pkm-modal__share-btn--challenge {
    background: transparent;
    color: rgba(120, 180, 255, 0.9);
    border: 1.5px solid rgba(120, 180, 255, 0.3);
}
.pkm-modal__share-btn--challenge:hover:not(:disabled) {
    background: rgba(120, 180, 255, 0.08);
    color: #78b4ff;
    border-color: rgba(120, 180, 255, 0.55);
}

.pkm-modal__copy-feedback {
    font-size: 0.82rem;
    color: #22c55e;
    min-height: 18px;
    font-weight: 600;
}

/* ─── Lembrete @professortcg ─── */
.pkm-modal__insta-note {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin: 6px 0 0;
}
.pkm-modal__insta-note strong { color: #F5B800; }

.pkm-modal__next {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
    margin: 10px 0 0;
}

/* ─── Toast ─── */
.pkm-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1a2d4a;
    color: #fff;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 2000;
    transition: transform 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.pkm-toast--show { transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 700px) {
    .pkm-board-header,
    .pkm-guess-row {
        grid-template-columns: 1.6fr repeat(7, 1fr);
        gap: 4px;
    }
    .pkm-col-header { font-size: 0.62rem; }
    .pkm-tile__val  { font-size: 0.68rem; }
    .pkm-tile--name .pkm-tile__val { font-size: 0.7rem; }
    .pkm-tile { padding: 7px 2px; min-height: 46px; }
    .pkm-tile--name { padding: 6px 7px; gap: 5px; }
    .pkm-tile__sprite { width: 32px; height: 32px; }
    .pkm-input-wrap { flex-direction: column; }
    .pkm-submit-btn { width: 100%; }
    .pkm-legend { gap: 8px 14px; }
    .pkm-suggestion__sprite { width: 34px; height: 34px; }
}

@media (max-width: 480px) {
    .jogos-hero, .pkm-dia-hero { padding: 80px 0 50px; }
    .jogos-grid-section { padding: 40px 0 60px; }
    .pkm-game-section   { padding: 32px 0 60px; }

    .pkm-board-header,
    .pkm-guess-row {
        grid-template-columns: 1.4fr repeat(7, 1fr);
        gap: 3px;
    }

    .pkm-col-header  { font-size: 0.56rem; padding: 2px; }
    .pkm-tile        { border-radius: 5px; padding: 6px 2px; min-height: 42px; }
    .pkm-tile--name  { padding: 5px 6px; gap: 4px; }
    .pkm-tile__sprite { width: 28px; height: 28px; }
    .pkm-tile__val   { font-size: 0.6rem; }
    .pkm-tile--name .pkm-tile__val { font-size: 0.62rem; }

    .pkm-modal__box  { padding: 36px 16px 20px; }
    .pkm-modal__title { font-size: 1.7rem; }
    .pkm-modal__grid  { font-size: 1.1rem; }
    .pkm-modal__img   { width: 100px; height: 100px; }

    .pkm-suggestion { padding: 6px 10px; gap: 8px; }
    .pkm-suggestion__sprite { width: 32px; height: 32px; }
}
