/*
 * Game Estímulo Max — Frontend Styles
 * Autor: Roi Máximo | roimaximo.top
 * Mobile-first · SaaS Tech Modern
 */

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  --ngp-bg:          #0b0f1a;
  --ngp-surface:     #111827;
  --ngp-surface-2:   #1a2236;
  --ngp-surface-3:   #232f46;
  --ngp-border:      rgba(255,255,255,.08);
  --ngp-border-2:    rgba(255,255,255,.14);

  --ngp-accent:      #6366f1;
  --ngp-accent-h:    #818cf8;
  --ngp-accent-glow: rgba(99,102,241,.35);

  --ngp-teal:        #14b8a6;
  --ngp-teal-glow:   rgba(20,184,166,.3);

  --ngp-green:       #22c55e;
  --ngp-yellow:      #f59e0b;
  --ngp-red:         #ef4444;
  --ngp-red-glow:    rgba(239,68,68,.25);

  --ngp-text:        #f1f5f9;
  --ngp-text-2:      #94a3b8;
  --ngp-text-3:      #64748b;

  --ngp-font-display: 'Syne', 'Space Grotesk', system-ui, sans-serif;
  --ngp-font-body:    'DM Sans', system-ui, sans-serif;
  --ngp-font-mono:    'JetBrains Mono', monospace;

  --ngp-radius-sm:  8px;
  --ngp-radius:     14px;
  --ngp-radius-lg:  20px;
  --ngp-radius-xl:  28px;

  --ngp-shadow:     0 4px 24px rgba(0,0,0,.4);
  --ngp-shadow-lg:  0 12px 48px rgba(0,0,0,.5);

  --ngp-sidebar-w:  240px;
  --ngp-transition: .22s cubic-bezier(.4,0,.2,1);
}

/* =============================================
   GOOGLE FONTS IMPORT
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* =============================================
   RESET & BASE
   ============================================= */
.ngp-app, .ngp-app * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ngp-app {
  font-family: var(--ngp-font-body);
  color: var(--ngp-text);
  background: var(--ngp-bg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.ngp-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =============================================
   LOGIN SCREEN
   ============================================= */
.ngp-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(20,184,166,.12) 0%, transparent 55%),
    var(--ngp-bg);
}

.ngp-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius-xl);
  padding: 40px 32px;
  box-shadow: var(--ngp-shadow-lg), 0 0 0 1px rgba(99,102,241,.1);
  animation: ngpSlideUp .5s cubic-bezier(.4,0,.2,1) both;
}

.ngp-login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.ngp-logo-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px var(--ngp-accent-glow));
}

.ngp-login-title {
  font-family: var(--ngp-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--ngp-text) 0%, var(--ngp-accent-h) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ngp-login-sub {
  color: var(--ngp-text-2);
  font-size: .9rem;
  margin-top: 6px;
}

.ngp-login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: .82rem;
  color: var(--ngp-text-3);
}

.ngp-login-footer a {
  color: var(--ngp-accent-h);
  text-decoration: none;
  font-weight: 500;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.ngp-form-group {
  margin-bottom: 18px;
}

.ngp-form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ngp-text-2);
  margin-bottom: 8px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.ngp-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--ngp-surface-2);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius-sm);
  color: var(--ngp-text);
  font-family: var(--ngp-font-body);
  font-size: .95rem;
  outline: none;
  transition: border-color var(--ngp-transition), box-shadow var(--ngp-transition);
}

.ngp-input:focus {
  border-color: var(--ngp-accent);
  box-shadow: 0 0 0 3px var(--ngp-accent-glow);
}

.ngp-input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.ngp-input-wrap {
  position: relative;
}

.ngp-input-wrap .ngp-input {
  padding-right: 48px;
}

.ngp-toggle-pass {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ngp-text-3);
  padding: 4px;
  transition: color var(--ngp-transition);
}

.ngp-toggle-pass:hover { color: var(--ngp-accent-h); }
.ngp-toggle-pass svg { width: 18px; height: 18px; display: block; }

.ngp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .ngp-form-row { grid-template-columns: 1fr; }
}

/* =============================================
   BUTTONS
   ============================================= */
.ngp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--ngp-radius-sm);
  font-family: var(--ngp-font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--ngp-transition);
  white-space: nowrap;
}

.ngp-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.ngp-btn-primary {
  background: linear-gradient(135deg, var(--ngp-accent), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 16px var(--ngp-accent-glow);
}
.ngp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--ngp-accent-glow);
}

.ngp-btn-accent {
  background: linear-gradient(135deg, var(--ngp-teal), #0d9488);
  color: #fff;
  box-shadow: 0 4px 16px var(--ngp-teal-glow);
}
.ngp-btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--ngp-teal-glow);
}

.ngp-btn-ghost {
  background: transparent;
  color: var(--ngp-text-2);
  border: 1px solid var(--ngp-border-2);
}
.ngp-btn-ghost:hover {
  background: var(--ngp-surface-2);
  color: var(--ngp-text);
}

.ngp-btn-danger-ghost {
  background: transparent;
  color: var(--ngp-red);
  border: 1px solid rgba(239,68,68,.3);
}
.ngp-btn-danger-ghost:hover {
  background: rgba(239,68,68,.1);
}

.ngp-btn-full { width: 100%; }

.ngp-btn-sm {
  padding: 8px 14px;
  font-size: .82rem;
}

.ngp-btn-text { pointer-events: none; }

.ngp-btn-loader {
  display: inline-flex;
  align-items: center;
}

.ngp-spin {
  width: 18px; height: 18px;
  animation: ngpSpin .8s linear infinite;
}

/* =============================================
   MESSAGE / TOAST
   ============================================= */
.ngp-msg {
  padding: 12px 16px;
  border-radius: var(--ngp-radius-sm);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 18px;
  display: none;
}

.ngp-msg.ngp-msg-success {
  display: block;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.3);
  color: #4ade80;
}

.ngp-msg.ngp-msg-error {
  display: block;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  color: #f87171;
}

.ngp-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  padding: 14px 20px;
  border-radius: var(--ngp-radius-sm);
  font-size: .9rem;
  font-weight: 600;
  max-width: 320px;
  box-shadow: var(--ngp-shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--ngp-transition);
  pointer-events: none;
}

.ngp-toast.ngp-toast-show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.ngp-toast-success {
  background: var(--ngp-green);
  color: #fff;
}

.ngp-toast-error {
  background: var(--ngp-red);
  color: #fff;
}

.ngp-toast-info {
  background: var(--ngp-accent);
  color: #fff;
}

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */
.ngp-dashboard {
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.ngp-sidebar {
  width: var(--ngp-sidebar-w);
  background: var(--ngp-surface);
  border-right: 1px solid var(--ngp-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--ngp-transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.ngp-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--ngp-border);
}

.ngp-brand-icon { font-size: 26px; }

.ngp-brand-name {
  font-family: var(--ngp-font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.3px;
  background: linear-gradient(135deg, var(--ngp-text), var(--ngp-accent-h));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ngp-nav-list {
  list-style: none;
  padding: 14px 12px;
  flex: 1;
}

.ngp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--ngp-radius-sm);
  color: var(--ngp-text-2);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--ngp-transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  margin-bottom: 2px;
}

.ngp-nav-item svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: .7;
  transition: opacity var(--ngp-transition);
}

.ngp-nav-item:hover,
.ngp-nav-item.active {
  background: rgba(99,102,241,.12);
  color: var(--ngp-accent-h);
}

.ngp-nav-item.active {
  box-shadow: inset 3px 0 0 var(--ngp-accent);
}

.ngp-nav-item:hover svg,
.ngp-nav-item.active svg {
  opacity: 1;
}

.ngp-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--ngp-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ngp-sidebar-credit {
  text-align: center;
  font-size: .75rem;
  color: var(--ngp-text-3);
  padding-top: 4px;
}

.ngp-sidebar-credit a {
  color: var(--ngp-accent-h);
  text-decoration: none;
}

/* --- TOPBAR MOBILE --- */
.ngp-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--ngp-surface);
  border-bottom: 1px solid var(--ngp-border);
  padding: 14px 20px;
  align-items: center;
  gap: 14px;
}

.ngp-topbar-title {
  flex: 1;
  font-family: var(--ngp-font-display);
  font-weight: 800;
  font-size: 1rem;
}

.ngp-topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ngp-surface-2);
  border: 2px solid var(--ngp-border-2);
}

.ngp-topbar-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.ngp-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.ngp-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ngp-text-2);
  border-radius: 2px;
  transition: all var(--ngp-transition);
}

.ngp-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ngp-menu-toggle.open span:nth-child(2) { opacity: 0; }
.ngp-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay */
.ngp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.ngp-overlay.active { display: block; }

/* --- MAIN --- */
.ngp-main {
  flex: 1;
  margin-left: var(--ngp-sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 60% 40% at 90% -10%, rgba(99,102,241,.08) 0%, transparent 50%),
    var(--ngp-bg);
}

/* --- TAB PANELS --- */
.ngp-tab-panel {
  padding: 32px 28px;
  flex: 1;
  animation: ngpFadeIn .3s ease;
}

.ngp-tab-panel[hidden] { display: none; }

/* =============================================
   PAGE HEADER
   ============================================= */
.ngp-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.ngp-page-title {
  font-family: var(--ngp-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.5px;
}

.ngp-page-sub {
  color: var(--ngp-text-2);
  font-size: .88rem;
  margin-top: 4px;
}

.ngp-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(99,102,241,.05));
  border: 1px solid rgba(99,102,241,.3);
  border-radius: var(--ngp-radius);
  padding: 12px 22px;
  min-width: 100px;
}

.ngp-score-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ngp-accent-h);
}

.ngp-score-value {
  font-family: var(--ngp-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ngp-text);
  line-height: 1;
  margin-top: 4px;
}

/* =============================================
   LEVEL SELECTION
   ============================================= */
.ngp-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.ngp-level-card {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius-lg);
  padding: 28px 24px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--ngp-transition);
  position: relative;
  overflow: hidden;
}

.ngp-level-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,.06), transparent);
  opacity: 0;
  transition: opacity var(--ngp-transition);
}

.ngp-level-card:hover {
  border-color: var(--ngp-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--ngp-accent-glow);
}

.ngp-level-card:hover::before { opacity: 1; }

.ngp-level-icon { font-size: 2.2rem; }

.ngp-level-name {
  font-family: var(--ngp-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ngp-text);
}

.ngp-level-desc {
  font-size: .82rem;
  color: var(--ngp-text-2);
}

.ngp-level-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  align-self: flex-start;
  margin-top: 4px;
}

.ngp-badge-easy   { background: rgba(34,197,94,.15);  color: #4ade80; }
.ngp-badge-medium { background: rgba(245,158,11,.15); color: #fbbf24; }
.ngp-badge-hard   { background: rgba(239,68,68,.15);  color: #f87171; }

/* =============================================
   GAME ARENA
   ============================================= */
.ngp-game-arena {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius-lg);
  padding: 28px;
  animation: ngpSlideUp .4s ease;
}

.ngp-arena-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.ngp-arena-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ngp-level-pill {
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.ngp-level-pill.easy   { background: rgba(34,197,94,.15);  color: #4ade80; }
.ngp-level-pill.medium { background: rgba(245,158,11,.15); color: #fbbf24; }
.ngp-level-pill.hard   { background: rgba(239,68,68,.15);  color: #f87171; }

.ngp-progress-text {
  font-size: .82rem;
  color: var(--ngp-text-2);
  font-variant-numeric: tabular-nums;
}

.ngp-arena-stats {
  display: flex;
  gap: 16px;
}

.ngp-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ngp-font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.ngp-stat svg { width: 16px; height: 16px; }

.ngp-stat-hit { color: var(--ngp-green); }
.ngp-stat-err { color: var(--ngp-red); }

/* Progress bar */
.ngp-progress-bar-wrap {
  height: 4px;
  background: var(--ngp-surface-2);
  border-radius: 100px;
  margin-bottom: 28px;
  overflow: hidden;
}

.ngp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ngp-accent), var(--ngp-teal));
  border-radius: 100px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

/* Word area */
.ngp-word-area {
  margin-bottom: 28px;
}

.ngp-word-instruction {
  text-align: center;
  color: var(--ngp-text-2);
  font-size: .88rem;
  margin-bottom: 20px;
}

/* Answer slots */
.ngp-answer-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 60px;
  padding: 14px;
  background: var(--ngp-surface-2);
  border-radius: var(--ngp-radius);
  border: 2px dashed var(--ngp-border-2);
  margin-bottom: 20px;
  transition: border-color var(--ngp-transition);
}

.ngp-answer-slots.has-letters {
  border-color: rgba(99,102,241,.4);
}

/* Letter bank */
.ngp-letter-bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 8px;
}

/* Letter tile (shared) */
.ngp-letter-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--ngp-radius-sm);
  font-family: var(--ngp-font-display);
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  user-select: none;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  border: none;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Bank tile */
.ngp-tile-bank {
  background: var(--ngp-surface-3);
  color: var(--ngp-text);
  border: 1px solid var(--ngp-border-2);
}

.ngp-tile-bank:hover {
  background: var(--ngp-accent);
  border-color: var(--ngp-accent);
  color: #fff;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 20px var(--ngp-accent-glow);
}

.ngp-tile-bank:active {
  transform: scale(.95);
}

/* Answer tile */
.ngp-tile-answer {
  background: linear-gradient(135deg, var(--ngp-accent), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 14px var(--ngp-accent-glow);
}

.ngp-tile-answer:hover {
  transform: translateY(-2px);
  opacity: .85;
}

/* Correct / wrong states */
.ngp-tile-correct { background: var(--ngp-green) !important; color: #fff !important; }
.ngp-tile-wrong   { background: var(--ngp-red)   !important; color: #fff !important; }

/* Arena actions */
.ngp-arena-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Answer feedback overlay */
.ngp-answer-feedback {
  position: relative;
  margin-top: 20px;
  animation: ngpSlideUp .3s ease;
}

.ngp-feedback-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border-radius: var(--ngp-radius);
  text-align: center;
}

.ngp-feedback-icon { font-size: 2.5rem; }
.ngp-feedback-msg  { font-size: 1.1rem; font-weight: 700; }
.ngp-feedback-word { font-family: var(--ngp-font-mono); font-size: 1rem; color: var(--ngp-text-2); }

.ngp-feedback-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.2); }
.ngp-feedback-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2); }

/* =============================================
   GAME RESULT
   ============================================= */
.ngp-game-result {
  animation: ngpSlideUp .4s ease;
}

.ngp-result-card {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius-xl);
  padding: 48px 32px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 0 60px rgba(99,102,241,.1);
}

.ngp-result-trophy {
  font-size: 4rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(245,158,11,.4));
  animation: ngpBounce .6s ease;
}

.ngp-result-title {
  font-family: var(--ngp-font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--ngp-text), var(--ngp-accent-h));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ngp-result-sub {
  color: var(--ngp-text-2);
  margin-bottom: 32px;
}

.ngp-result-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.ngp-result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ngp-result-stat-val {
  font-family: var(--ngp-font-display);
  font-size: 2rem;
  font-weight: 800;
}

.ngp-result-score .ngp-result-stat-val {
  color: var(--ngp-accent-h);
  text-shadow: 0 0 20px var(--ngp-accent-glow);
}

.ngp-result-stat-label {
  font-size: .78rem;
  color: var(--ngp-text-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.ngp-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================
   RESULTS TAB
   ============================================= */
.ngp-results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.ngp-summary-card {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: transform var(--ngp-transition);
}

.ngp-summary-card:hover { transform: translateY(-2px); }

.ngp-summary-icon { font-size: 1.8rem; }

.ngp-summary-val {
  font-family: var(--ngp-font-display);
  font-size: 1.6rem;
  font-weight: 800;
}

.ngp-summary-score .ngp-summary-val { color: var(--ngp-accent-h); }

.ngp-summary-label {
  font-size: .78rem;
  color: var(--ngp-text-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* Table */
.ngp-table-wrap {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border);
  border-radius: var(--ngp-radius);
  overflow: hidden;
  overflow-x: auto;
}

.ngp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.ngp-table th {
  background: var(--ngp-surface-2);
  padding: 13px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--ngp-text-2);
  border-bottom: 1px solid var(--ngp-border);
  white-space: nowrap;
}

.ngp-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--ngp-border);
  color: var(--ngp-text-2);
  white-space: nowrap;
}

.ngp-table tbody tr:last-child td { border-bottom: none; }

.ngp-table tbody tr:hover td {
  background: rgba(99,102,241,.04);
  color: var(--ngp-text);
}

.ngp-table-empty {
  text-align: center;
  color: var(--ngp-text-3);
  padding: 40px !important;
  font-size: .9rem;
}

/* Level badges in table */
.ngp-tbl-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.ngp-tbl-easy   { background: rgba(34,197,94,.12);  color: #4ade80; }
.ngp-tbl-medium { background: rgba(245,158,11,.12); color: #fbbf24; }
.ngp-tbl-hard   { background: rgba(239,68,68,.12);  color: #f87171; }

/* =============================================
   PROFILE TAB
   ============================================= */
.ngp-profile-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ngp-profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ngp-avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ngp-border-2);
  box-shadow: 0 0 0 6px rgba(99,102,241,.1);
  cursor: pointer;
}

.ngp-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ngp-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--ngp-transition);
  cursor: pointer;
}

.ngp-avatar-preview:hover .ngp-avatar-overlay { opacity: 1; }

.ngp-avatar-overlay svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.ngp-avatar-hint {
  font-size: .78rem;
  color: var(--ngp-text-3);
}

.ngp-profile-form-wrap { flex: 1; min-width: 260px; }

/* =============================================
   HELP TAB
   ============================================= */
.ngp-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.ngp-help-card {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border);
  border-radius: var(--ngp-radius);
  padding: 24px 22px;
  transition: all var(--ngp-transition);
}

.ngp-help-card:hover {
  border-color: var(--ngp-border-2);
  transform: translateY(-2px);
  box-shadow: var(--ngp-shadow);
}

.ngp-help-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.ngp-help-card h3 {
  font-family: var(--ngp-font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.ngp-help-card p {
  font-size: .88rem;
  color: var(--ngp-text-2);
  line-height: 1.65;
}

/* FAQ */
.ngp-help-faq {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border);
  border-radius: var(--ngp-radius);
  padding: 24px;
  margin-bottom: 24px;
}

.ngp-faq-title {
  font-family: var(--ngp-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.ngp-faq-item {
  border-bottom: 1px solid var(--ngp-border);
  padding: 14px 0;
}

.ngp-faq-item:last-child { border-bottom: none; }

.ngp-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .92rem;
  color: var(--ngp-text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.ngp-faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--ngp-accent-h);
  transition: transform var(--ngp-transition);
}

.ngp-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.ngp-faq-item p {
  padding-top: 12px;
  font-size: .88rem;
  color: var(--ngp-text-2);
  line-height: 1.65;
}

/* =============================================
   SECTION CREDIT
   ============================================= */
.ngp-section-credit {
  margin-top: 28px;
  font-size: .8rem;
  color: var(--ngp-text-3);
  text-align: center;
}

.ngp-section-credit a {
  color: var(--ngp-accent-h);
  text-decoration: none;
  font-weight: 600;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes ngpSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ngpFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ngpSpin {
  to { transform: rotate(360deg); }
}

@keyframes ngpBounce {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.2); }
  70%      { transform: scale(.95); }
}

@keyframes ngpPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--ngp-accent-glow); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}

/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */
@media (max-width: 768px) {
  .ngp-sidebar {
    transform: translateX(-100%);
  }

  .ngp-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--ngp-shadow-lg);
  }

  .ngp-topbar {
    display: flex;
  }

  .ngp-main {
    margin-left: 0;
  }

  .ngp-tab-panel {
    padding: 20px 16px;
  }

  .ngp-letter-tile {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .ngp-arena-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ngp-arena-actions .ngp-btn {
    justify-content: center;
  }

  .ngp-result-stats {
    gap: 20px;
  }

  .ngp-profile-layout {
    flex-direction: column;
    align-items: center;
  }

  .ngp-profile-form-wrap {
    width: 100%;
  }

  .ngp-game-result .ngp-result-card {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .ngp-login-card {
    padding: 28px 20px;
  }

  .ngp-level-grid {
    grid-template-columns: 1fr;
  }

  .ngp-game-arena {
    padding: 20px 16px;
  }

  .ngp-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ngp-score-badge {
    align-self: flex-start;
  }
}

/* =============================================
   MATH GAME — ESTILOS ESPECÍFICOS
   ============================================= */

/* Level grid com apenas 2 cards (math) */
.ngp-math-level-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
}

/* Display do cálculo */
.ngp-math-question-area {
  margin-bottom: 28px;
}

.ngp-math-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 36px 28px;
  background: var(--ngp-surface-2);
  border: 2px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius-lg);
  position: relative;
  overflow: hidden;
  animation: ngpSlideUp .4s ease;
}

.ngp-math-display::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(99,102,241,.06), transparent);
  pointer-events: none;
}

.ngp-math-expr {
  font-family: var(--ngp-font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--ngp-text);
  letter-spacing: -1px;
  text-align: center;
}

.ngp-math-eq {
  font-family: var(--ngp-font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--ngp-accent-h);
}

.ngp-math-answer-slot {
  font-family: var(--ngp-font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--ngp-text-3);
  min-width: 60px;
  text-align: center;
  border-bottom: 3px solid var(--ngp-accent);
  padding-bottom: 4px;
}

/* Input de resposta */
.ngp-math-input-area {
  margin-bottom: 24px;
}

.ngp-math-input-wrap {
  max-width: 320px;
  margin: 0 auto;
}

.ngp-math-input {
  text-align: center;
  font-family: var(--ngp-font-display) !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  padding: 16px 20px !important;
  background: var(--ngp-surface-2) !important;
  border: 2px solid var(--ngp-border-2) !important;
  border-radius: var(--ngp-radius) !important;
  -moz-appearance: textfield;
}

.ngp-math-input::-webkit-inner-spin-button,
.ngp-math-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ngp-math-input:focus {
  border-color: var(--ngp-accent) !important;
  box-shadow: 0 0 0 3px var(--ngp-accent-glow) !important;
}

/* Estado correto/errado no input */
.ngp-math-input.input-correct {
  border-color: var(--ngp-green) !important;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2) !important;
  color: var(--ngp-green);
}

.ngp-math-input.input-wrong {
  border-color: var(--ngp-red) !important;
  box-shadow: 0 0 0 3px var(--ngp-red-glow) !important;
  color: var(--ngp-red);
  animation: ngpShake .4s ease;
}

@keyframes ngpShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

/* Histórico da math tab */
.ngp-math-history {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--ngp-border);
}

.ngp-math-history-title {
  font-family: var(--ngp-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--ngp-text);
}

/* Math arena — sem borda dupla */
.ngp-math-arena {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .ngp-math-display {
    flex-direction: column;
    gap: 10px;
    padding: 28px 20px;
  }

  .ngp-math-expr,
  .ngp-math-eq,
  .ngp-math-answer-slot {
    font-size: 1.6rem;
  }
}

/* =============================================
   RESULTS TAB — DIVIDER (Palavras / Matemática)
   ============================================= */
.ngp-results-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 36px 0 24px;
}

.ngp-results-divider::before,
.ngp-results-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ngp-border-2);
}

.ngp-results-divider-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  background: rgba(99,102,241,.1);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--ngp-accent-h);
  white-space: nowrap;
}

/* =============================================
   EXTRA LINKS (abaixo da aba Matemática)
   ============================================= */
.ngp-extra-links {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--ngp-border);
}

.ngp-extra-links-title {
  font-family: var(--ngp-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ngp-text-2);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-size: .78rem;
}

.ngp-extra-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ngp-extra-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius-sm);
  color: var(--ngp-text-2);
  font-family: var(--ngp-font-body);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--ngp-transition);
  cursor: pointer;
}

.ngp-extra-link-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: .6;
  transition: opacity var(--ngp-transition);
}

.ngp-extra-link-btn:hover {
  background: rgba(99,102,241,.1);
  border-color: var(--ngp-accent);
  color: var(--ngp-accent-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--ngp-accent-glow);
}

.ngp-extra-link-btn:hover svg {
  opacity: 1;
}

/* =============================================
   HELP TAB — section titles
   ============================================= */
.ngp-help-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ngp-font-display);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--ngp-accent-h);
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ngp-border-2);
}

.ngp-help-section-title:first-of-type {
  margin-top: 0;
}

.ngp-help-section-icon {
  font-size: 1.1rem;
}

/* =============================================
   MOBILE RESPONSIVENESS — FIXES v1.1.2
   ============================================= */

/* Prevent content overflow on very small screens */
@media (max-width: 380px) {
  .ngp-letter-tile {
    width: 36px;
    height: 36px;
    font-size: .9rem;
  }

  .ngp-level-grid {
    grid-template-columns: 1fr;
  }

  .ngp-result-stats {
    gap: 14px;
  }

  .ngp-result-stat-val {
    font-size: 1.6rem;
  }

  .ngp-math-expr {
    font-size: 1.4rem;
  }

  .ngp-math-eq,
  .ngp-math-answer-slot {
    font-size: 1.3rem;
  }

  .ngp-summary-val {
    font-size: 1.3rem;
  }
}

/* Tab panel padding on small phones */
@media (max-width: 360px) {
  .ngp-tab-panel {
    padding: 16px 12px;
  }

  .ngp-game-arena {
    padding: 16px 12px;
  }

  .ngp-login-card {
    padding: 24px 16px;
  }
}

/* Results summary — stack to 2 cols on small screens */
@media (max-width: 480px) {
  .ngp-results-summary {
    grid-template-columns: 1fr 1fr;
  }

  .ngp-help-grid {
    grid-template-columns: 1fr;
  }

  .ngp-extra-links-grid {
    flex-direction: column;
  }

  .ngp-extra-link-btn {
    width: 100%;
    justify-content: center;
  }

  .ngp-math-display {
    flex-direction: column;
    gap: 8px;
    padding: 24px 16px;
  }

  .ngp-profile-layout {
    gap: 20px;
  }

  /* Make table horizontally scrollable with visible indicator */
  .ngp-table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  /* Tighter table cells on mobile */
  .ngp-table th,
  .ngp-table td {
    padding: 10px 12px;
    font-size: .8rem;
  }

  /* Page header stacks vertically */
  .ngp-page-header {
    gap: 12px;
  }

  .ngp-score-badge {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 16px;
  }

  .ngp-score-value {
    font-size: 1.3rem;
  }
}

/* Fix sidebar z-index on iOS */
@media (max-width: 768px) {
  .ngp-sidebar {
    z-index: 1000;
  }

  .ngp-overlay {
    z-index: 999;
  }

  .ngp-topbar {
    z-index: 90;
    position: sticky;
  }

  /* Prevent body scroll when sidebar is open */
  .ngp-app.sidebar-open {
    overflow: hidden;
  }

  /* Arena actions full width on mobile */
  .ngp-arena-actions .ngp-btn {
    flex: 1;
    min-width: 0;
    font-size: .82rem;
    padding: 10px 8px;
  }

  /* Math input larger touch target */
  .ngp-math-input {
    font-size: 1.2rem !important;
    padding: 14px 16px !important;
  }

  /* Level cards touch-friendly */
  .ngp-level-card {
    padding: 22px 18px;
  }

  /* Results divider tighter on mobile */
  .ngp-results-divider {
    margin: 24px 0 18px;
  }

  /* Help section titles tighter */
  .ngp-help-section-title {
    margin: 24px 0 12px;
  }
}

/* Ensure toast doesn't overlap content on mobile */
@media (max-width: 480px) {
  .ngp-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    text-align: center;
  }
}

/* =============================================
   NAV ITEM — Link externo (abre nova aba)
   ============================================= */
.ngp-nav-item-link {
  color: var(--ngp-teal) !important;
  opacity: .85;
  font-size: .85rem;
}

.ngp-nav-item-link svg {
  opacity: .6;
}

.ngp-nav-item-link:hover {
  background: rgba(20,184,166,.1) !important;
  color: var(--ngp-teal) !important;
  opacity: 1;
}

.ngp-nav-item-link:hover svg {
  opacity: 1;
}

/* Separador visual sutil acima dos links externos */
li:has(.ngp-nav-item-link):first-of-type {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--ngp-border);
}

/* =============================================
   RESPONSIVE TABLES — CARD LAYOUT ON MOBILE
   Cada linha da tabela vira um card empilhado
   ============================================= */
@media (max-width: 640px) {

  /* ── Tabelas de resultados ─────────────────── */
  .ngp-table-wrap {
    border-radius: var(--ngp-radius);
    overflow: visible;      /* permite cards sem clip */
    background: transparent;
    border: none;
  }

  .ngp-table {
    display: block;
    width: 100%;
  }

  .ngp-table thead {
    display: none;          /* oculta cabeçalho — info vem no data-label */
  }

  .ngp-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .ngp-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--ngp-surface);
    border: 1px solid var(--ngp-border-2);
    border-radius: var(--ngp-radius);
    overflow: hidden;
    padding: 0;
  }

  .ngp-table tbody tr:hover td {
    background: transparent;
  }

  .ngp-table td {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ngp-border);
    white-space: normal;
    word-break: break-word;
    font-size: .82rem;
  }

  .ngp-table td:last-child,
  .ngp-table td:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
  }

  /* Label acima do valor */
  .ngp-table td::before {
    content: attr(data-label);
    display: block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--ngp-text-3);
    margin-bottom: 3px;
  }

  /* Empty state ocupa linha inteira */
  .ngp-table td.ngp-table-empty {
    grid-column: 1 / -1;
    text-align: center;
    border-bottom: none;
  }

  .ngp-table td.ngp-table-empty::before {
    display: none;
  }

  /* ── Summary cards ─────────────────────────── */
  .ngp-results-summary {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .ngp-summary-card {
    padding: 16px 12px;
  }

  .ngp-summary-val {
    font-size: 1.4rem;
  }

  .ngp-summary-label {
    font-size: .68rem;
  }

  /* ── Score badge in page header ─────────────── */
  .ngp-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ngp-score-badge {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 16px;
  }

  .ngp-score-label { font-size: .68rem; }
  .ngp-score-value { font-size: 1.2rem; }

  /* ── Game arena ─────────────────────────────── */
  .ngp-game-arena {
    padding: 16px 14px;
  }

  .ngp-arena-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ngp-arena-stats {
    gap: 12px;
  }

  .ngp-arena-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ngp-arena-actions .ngp-btn {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .78rem;
    padding: 10px 6px;
  }

  /* ── Letter tiles ───────────────────────────── */
  .ngp-letter-tile {
    width: 38px;
    height: 38px;
    font-size: .9rem;
    border-radius: 6px;
  }

  .ngp-letter-bank,
  .ngp-answer-slots {
    gap: 6px;
  }

  /* ── Math display ───────────────────────────── */
  .ngp-math-display {
    flex-direction: column;
    gap: 6px;
    padding: 20px 14px;
  }

  .ngp-math-expr,
  .ngp-math-eq,
  .ngp-math-answer-slot {
    font-size: 1.5rem;
  }

  .ngp-math-input {
    font-size: 1.1rem !important;
    padding: 12px 14px !important;
  }

  /* ── Result card ────────────────────────────── */
  .ngp-result-card {
    padding: 28px 16px;
  }

  .ngp-result-stats {
    gap: 16px;
    justify-content: space-around;
  }

  .ngp-result-stat-val {
    font-size: 1.5rem;
  }

  .ngp-result-actions {
    flex-direction: column;
  }

  .ngp-result-actions .ngp-btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Level cards ────────────────────────────── */
  .ngp-level-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ngp-level-card {
    padding: 18px 16px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .ngp-level-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
  }

  .ngp-level-name {
    font-size: 1rem;
    flex: 1;
  }

  .ngp-level-desc {
    width: 100%;
    font-size: .78rem;
  }

  /* ── Profile ────────────────────────────────── */
  .ngp-profile-layout {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .ngp-profile-form-wrap {
    width: 100%;
  }

  .ngp-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* ── Help ───────────────────────────────────── */
  .ngp-help-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ngp-help-card {
    padding: 18px 16px;
  }

  /* ── Nav sidebar on mobile ──────────────────── */
  .ngp-nav-item {
    padding: 13px 14px;
    font-size: .92rem;
  }

  /* ── Login card ─────────────────────────────── */
  .ngp-login-card {
    padding: 28px 18px;
    border-radius: var(--ngp-radius-lg);
  }

  /* ── Toast ──────────────────────────────────── */
  .ngp-toast {
    bottom: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
    text-align: center;
    font-size: .85rem;
  }

  /* ── Divider ────────────────────────────────── */
  .ngp-results-divider {
    margin: 20px 0 16px;
  }

  .ngp-results-divider-label {
    font-size: .7rem;
    padding: 5px 12px;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .ngp-tab-panel { padding: 14px 10px; }
  .ngp-letter-tile { width: 34px; height: 34px; font-size: .82rem; }
  .ngp-results-summary { grid-template-columns: 1fr 1fr; }
  .ngp-summary-val { font-size: 1.2rem; }
  .ngp-math-expr { font-size: 1.3rem; }
}

/* =============================================
   CONTEÚDOS TAB — Frontend
   ============================================= */
.ngp-folders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ngp-folder-card {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all var(--ngp-transition);
  text-decoration: none;
}

.ngp-folder-card:hover {
  border-color: var(--ngp-accent);
  transform: translateX(4px);
  box-shadow: 0 4px 20px var(--ngp-accent-glow);
}

.ngp-folder-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.ngp-folder-card-info { flex: 1; min-width: 0; }

.ngp-folder-card-name {
  font-family: var(--ngp-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ngp-text);
  margin-bottom: 4px;
}

.ngp-folder-card-desc {
  font-size: .82rem;
  color: var(--ngp-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ngp-folder-card-meta {
  font-size: .75rem;
  color: var(--ngp-text-3);
  flex-shrink: 0;
}

.ngp-folder-card-arrow {
  color: var(--ngp-text-3);
  flex-shrink: 0;
  transition: transform var(--ngp-transition), color var(--ngp-transition);
}

.ngp-folder-card:hover .ngp-folder-card-arrow {
  transform: translateX(4px);
  color: var(--ngp-accent-h);
}

/* Folder panel (files view) */
.ngp-folder-panel { animation: ngpSlideUp .3s ease; }

.ngp-folder-panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ngp-border);
  flex-wrap: wrap;
}

.ngp-folder-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.ngp-folder-icon-lg { font-size: 2rem; }

.ngp-folder-panel-title h3 {
  font-family: var(--ngp-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.ngp-folder-panel-title p {
  font-size: .82rem;
  color: var(--ngp-text-2);
  margin: 4px 0 0;
}

/* Files grid */
.ngp-files-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.ngp-file-card {
  background: var(--ngp-surface);
  border: 1px solid var(--ngp-border-2);
  border-radius: var(--ngp-radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--ngp-transition);
}

.ngp-file-card:hover {
  border-color: var(--ngp-border-2);
  box-shadow: var(--ngp-shadow);
  transform: translateY(-2px);
}

.ngp-file-card-icon { font-size: 2.4rem; }

.ngp-file-card-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ngp-text);
  line-height: 1.4;
  word-break: break-word;
}

.ngp-file-card-meta {
  font-size: .74rem;
  color: var(--ngp-text-3);
}

.ngp-file-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.ngp-file-action-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--ngp-radius-sm);
  border: none;
  cursor: pointer;
  font-family: var(--ngp-font-body);
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all var(--ngp-transition);
}

.ngp-file-action-btn.view {
  background: rgba(99,102,241,.12);
  color: var(--ngp-accent-h);
  border: 1px solid rgba(99,102,241,.2);
}

.ngp-file-action-btn.view:hover {
  background: var(--ngp-accent);
  color: #fff;
}

.ngp-file-action-btn.download {
  background: rgba(20,184,166,.1);
  color: var(--ngp-teal);
  border: 1px solid rgba(20,184,166,.2);
}

.ngp-file-action-btn.download:hover {
  background: var(--ngp-teal);
  color: #fff;
}

/* Content loading state */
.ngp-content-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--ngp-text-3);
  font-size: .88rem;
}

.ngp-content-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ngp-text-3);
}

.ngp-content-empty-icon { font-size: 3rem; margin-bottom: 12px; }

.ngp-content-empty h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ngp-text-2);
  margin-bottom: 8px;
}

.ngp-content-empty p { font-size: .85rem; }

@media (max-width: 640px) {
  .ngp-files-list {
    grid-template-columns: 1fr 1fr;
  }

  .ngp-folder-card-desc { display: none; }

  .ngp-file-card-icon { font-size: 1.8rem; }
}

@media (max-width: 400px) {
  .ngp-files-list {
    grid-template-columns: 1fr;
  }
}
