/* Extensões do portal sobre o style.css original (mesma identidade visual). */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-muted); }
[hidden] { display: none !important; }
.nav-links { flex-wrap: wrap; justify-content: flex-end; }

/* ---- navegação ---- */
.btn-nav-button { background: transparent; cursor: pointer; font-family: var(--font-mono); font-size: 1rem; letter-spacing: 1px; }
.user-chip { display: flex; align-items: center; gap: .6rem; font-family: var(--font-mono); font-size: .85rem; }
.user-chip:empty { display: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; }
.user-name { color: var(--text-muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: none; color: var(--primary-blue); cursor: pointer; font: inherit; font-size: .85rem; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--white); }
.link-btn.danger { color: #ff6b6b; }

/* ---- hero compacto + busca ---- */
.hero-compact { height: auto; min-height: 46vh; padding-top: 4rem; padding-bottom: 4rem; }
.hero-compact h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
.hero-compact p { font-size: clamp(1.05rem, 2.4vw, 1.3rem); margin-bottom: 1.8rem; }
.hero-search { display: flex; gap: .6rem; max-width: 560px; }
.hero-search input { flex: 1; min-width: 0; padding: .9rem 1rem; background: rgba(18,18,18,.85); border: 1px solid #333; border-radius: 4px; color: var(--white); font-size: 1rem; font-family: var(--font-main); }
.hero-search input:focus { outline: none; border-color: var(--primary-blue); }

/* ---- catálogo ---- */
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.catalog-head h2 { margin-bottom: 0; }
.sort select { background: var(--bg-accent); color: var(--white); border: 1px solid #333; border-radius: 4px; padding: .6rem .8rem; font-family: var(--font-mono); font-size: .9rem; }
.tag-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip { background: var(--bg-accent); border: 1px solid #2c2c2c; color: var(--text-light); border-radius: 999px; padding: .4rem .9rem; font-family: var(--font-mono); font-size: .8rem; cursor: pointer; text-transform: lowercase; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--primary-blue); }
.chip.active { background: var(--primary-blue); border-color: var(--primary-blue); color: var(--white); }
.chip-count { opacity: .55; margin-left: .45rem; }
.result-info { margin-bottom: 1.5rem; font-family: var(--font-mono); font-size: .85rem; min-height: 1.4em; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.6rem; }
.game-card { background: var(--bg-accent); border-top: 4px solid var(--primary-blue); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.45); }
.cover { display: block; aspect-ratio: 16 / 9; background: #0d0d0d; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3.5rem; font-weight: 800; color: rgba(47,128,237,.35); }
.card-body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.store-badge { align-self: flex-start; font-family: var(--font-mono); font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; color: var(--primary-blue); border: 1px solid rgba(47,128,237,.5); border-radius: 3px; padding: .15rem .5rem; }
.card-body h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.card-desc { color: var(--text-muted); font-size: .95rem; flex: 1; overflow-wrap: anywhere; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { background: #242424; color: #cfcfcf; border: none; border-radius: 3px; padding: .2rem .55rem; font-size: .75rem; font-family: var(--font-mono); cursor: pointer; }
.tag:hover { background: var(--primary-blue); color: var(--white); }
.card-actions { display: flex; justify-content: space-between; align-items: center; margin-top: .4rem; gap: .6rem; }
.btn-card { color: var(--white); text-decoration: none; font-weight: 700; font-size: .9rem; border-bottom: 2px solid var(--primary-blue); }
.btn-card:hover { color: var(--primary-blue); }
.load-more-wrap { text-align: center; margin-top: 2.5rem; }
.btn-secondary { background: transparent; border: 2px solid #444; color: var(--white); padding: .8rem 1.6rem; border-radius: 4px; font-weight: 700; font-size: 1rem; cursor: pointer; font-family: var(--font-main); }
.btn-secondary:hover { border-color: var(--primary-blue); }
.empty-state { text-align: center; padding: 4rem 1rem; background: var(--bg-accent); border-radius: 8px; }
.empty-state h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ---- diálogo ---- */
.modal { width: min(560px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; background: var(--bg-accent); color: var(--text-light); border: 1px solid #2c2c2c; border-top: 4px solid var(--primary-blue); border-radius: 8px; padding: 0; margin: auto; }
.modal::backdrop { background: rgba(0,0,0,.75); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 1.8rem 0; }
.modal-head h2 { font-size: 1.5rem; margin: 0; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 2rem; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--white); }
.step { padding: 1.4rem 1.8rem 1.8rem; }
.step.center { text-align: center; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.step.center h3 { font-size: 1.6rem; margin-bottom: .6rem; }
.step.center p { color: var(--text-muted); margin-bottom: 1.5rem; }
.modal .form-group { margin-bottom: 1.2rem; }
.modal input[type="file"] { color: var(--text-muted); }
.google-btn { margin-top: 1.4rem; min-height: 44px; }
.rules-box, .info-banner { background: rgba(47,128,237,.07); border-left: 4px solid var(--primary-blue); border-radius: 4px; padding: .9rem 1rem; font-size: .9rem; margin-bottom: 1.2rem; color: #d6d6d6; }
.ok-banner { border-left: 4px solid #3ecf8e; background: rgba(62,207,142,.08); padding: .8rem 1rem; border-radius: 4px; margin-bottom: 1.2rem; }
.bad-banner { border-left: 4px solid #ff6b6b; background: rgba(255,107,107,.08); padding: .8rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-weight: 600; }
.reasons { margin: 0 0 1.4rem 1.2rem; display: grid; gap: .5rem; color: #d6d6d6; }
.form-error { color: #ff8a8a; margin: 0 0 1rem; font-size: .92rem; }
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }
.btn-row .btn-submit { width: auto; flex: 1; }
.btn-submit:disabled { opacity: .6; cursor: wait; }
.cover-preview { margin-top: .8rem; width: 100%; max-width: 320px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
#previewSlot .game-card:hover { transform: none; box-shadow: none; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid #2c2c2c; border-top-color: var(--primary-blue); margin: 0 auto 1.2rem; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .game-card { transition: none; } }

.my-games { margin-top: 1.6rem; border-top: 1px solid #2c2c2c; padding-top: 1rem; }
.my-games summary { cursor: pointer; font-family: var(--font-mono); font-size: .85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.my-games ul { list-style: none; margin-top: .8rem; display: grid; gap: .6rem; }
.my-games li { display: flex; align-items: center; gap: .8rem; }
.my-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { font-family: var(--font-mono); font-size: .72rem; padding: .15rem .5rem; border-radius: 3px; }
.status-approved { background: rgba(62,207,142,.15); color: #3ecf8e; }
.status-pending { background: rgba(255,193,7,.15); color: #ffc107; }

/* ---- admin ---- */
.admin-list { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.admin-item { display: grid; grid-template-columns: 220px 1fr; gap: 1.2rem; background: var(--bg-accent); padding: 1rem; border-radius: 4px; border-left: 4px solid #ffc107; }
.admin-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; background: #0d0d0d; }
.admin-item h3 { margin-bottom: .3rem; overflow-wrap: anywhere; }
.admin-item .meta { color: var(--text-muted); font-size: .85rem; font-family: var(--font-mono); margin-bottom: .6rem; overflow-wrap: anywhere; }
.admin-actions { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.admin-actions button { padding: .55rem 1.2rem; font-size: .9rem; width: auto; }

@media (max-width: 720px) {
  .container-nav { flex-direction: column; gap: .6rem; padding: .3rem 4%; }
  .nav-links { gap: .9rem 1.2rem; justify-content: center; }
  .nav-links a, .btn-nav-button { font-size: .85rem; }
  .user-name { display: none; }
  .hero-search { flex-direction: column; }
  .section { padding: 3rem 4%; }
  h2 { font-size: 1.8rem; }
  .admin-item { grid-template-columns: 1fr; }
  .modal-head, .step { padding-left: 1.2rem; padding-right: 1.2rem; }
}

/* ---- texto corrido (política de privacidade) ---- */
.prose { max-width: 820px; }
.prose h2 { margin-bottom: .6rem; }
.prose h3 { margin: 2.2rem 0 .7rem; color: var(--primary-blue); font-size: 1.3rem; }
.prose h4 { margin: 1.4rem 0 .4rem; color: var(--white); font-size: 1.05rem; }
.prose p { margin-bottom: 1rem; color: #d6d6d6; }
.prose ul { margin: 0 0 1rem 1.4rem; display: grid; gap: .5rem; color: #d6d6d6; }
.prose a, footer a { color: var(--primary-blue); }
.prose code { font-family: var(--font-mono); background: #242424; padding: .1rem .4rem; border-radius: 3px; font-size: .9em; }

/* ---- diagnóstico das chaves Gemini ---- */
.ai-results { list-style: none; display: grid; gap: .6rem; margin-top: 1rem; }
.ai-row { padding: .7rem 1rem; border-radius: 4px; background: var(--bg-dark); border-left: 4px solid #444; overflow-wrap: anywhere; }
.ai-row.ok { border-left-color: #3ecf8e; }
.ai-row.bad { border-left-color: #ff6b6b; }
