/* ============================================
   SISTEMA DE JOGOS EDUCACIONAIS - BNCC COMPUTAÇÃO
   Portal Educacional de Maranguape
   Visual Redesign — Afetuoso & Moderno
   ============================================ */

/* ========== CSS CUSTOM PROPERTIES ========== */
:root {
  /* Cores dos Eixos BNCC */
  --pc-color: #4F46E5;
  --pc-light: #EEF2FF;
  --pc-medium: #A5B4FC;
  --pc-dark: #3730A3;
  --pc-gradient: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #A5B4FC 100%);
  --pc-glow: rgba(99, 102, 241, 0.35);

  --cd-color: #059669;
  --cd-light: #ECFDF5;
  --cd-medium: #6EE7B7;
  --cd-dark: #047857;
  --cd-gradient: linear-gradient(135deg, #10B981 0%, #34D399 50%, #6EE7B7 100%);
  --cd-glow: rgba(16, 185, 129, 0.35);

  --md-color: #EA580C;
  --md-light: #FFF7ED;
  --md-medium: #FDBA74;
  --md-dark: #C2410C;
  --md-gradient: linear-gradient(135deg, #F97316 0%, #FB923C 50%, #FDBA74 100%);
  --md-glow: rgba(249, 115, 22, 0.35);

  /* Cores dos anos */
  --ano6-color: #6366F1;
  --ano6-bg: linear-gradient(135deg, #6366F1, #818CF8);
  --ano7-color: #10B981;
  --ano7-bg: linear-gradient(135deg, #10B981, #34D399);
  --ano8-color: #F97316;
  --ano8-bg: linear-gradient(135deg, #F97316, #FB923C);
  --ano9-color: #EF4444;
  --ano9-bg: linear-gradient(135deg, #EF4444, #F87171);

  /* Cores gerais */
  --jogos-dark: #1E1B4B;
  --jogos-darker: #0F0E2A;
  --jogos-light: #FAFBFF;
  --jogos-card-bg: #FFFFFF;
  --jogos-success: #22C55E;
  --jogos-success-light: #DCFCE7;
  --jogos-danger: #EF4444;
  --jogos-danger-light: #FEE2E2;
  --jogos-warning: #F59E0B;
  --jogos-info: #3B82F6;

  /* Tipografia */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.15);
  --shadow-glow-pc: 0 8px 32px rgba(99, 102, 241, 0.3);
  --shadow-glow-cd: 0 8px 32px rgba(16, 185, 129, 0.3);
  --shadow-glow-md: 0 8px 32px rgba(249, 115, 22, 0.3);

  /* Bordas arredondadas */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 50px;
}

/* ========== GLOBAL RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--jogos-light);
  color: var(--jogos-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========== NAVBAR ========== */
.modern-navbar {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.modern-navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #6366F1 0%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--jogos-dark) !important;
  font-weight: 500;
  font-size: 0.7rem;
  padding: 0.3rem 0.45rem !important;
  transition: all 0.3s ease;
  position: relative;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #6366F1 0%, #10B981 100%);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after { width: 80%; }

.dropdown-menu {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  background: white;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, #6366F1 0%, #10B981 100%);
  color: white;
}

.dropdown-submenu { position: relative; }
.dropdown-submenu .dropdown-menu { left: 100%; top: 0; margin-left: 0.1rem; }
.dropdown-submenu:hover > .dropdown-menu { display: block; }

/* ========== HERO SECTION ========== */
.jogos-hero {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 25%, #4338CA 50%, #6366F1 75%, #818CF8 100%);
  padding: 140px 0 90px;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.jogos-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
  z-index: 1;
}

.jogos-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--jogos-light);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 3;
}

.jogos-hero .container {
  position: relative;
  z-index: 2;
}

.jogos-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-mascot {
  font-size: 4rem;
  display: block;
  animation: mascotBounce 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  margin-bottom: 1rem;
}

@keyframes mascotBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  25% { transform: translateY(-12px) rotate(3deg); }
  50% { transform: translateY(-6px) rotate(-2deg); }
  75% { transform: translateY(-14px) rotate(2deg); }
}

/* Hero floating emojis */
.hero-floating {
  position: absolute;
  z-index: 2;
  font-size: 2rem;
  animation: floatEmoji 8s ease-in-out infinite;
  opacity: 0.4;
  pointer-events: none;
}

@keyframes floatEmoji {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
  25% { transform: translateY(-20px) rotate(10deg); opacity: 0.5; }
  50% { transform: translateY(-10px) rotate(-5deg); opacity: 0.4; }
  75% { transform: translateY(-25px) rotate(8deg); opacity: 0.6; }
}

/* Hero stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 1.2rem 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 140px;
}

.hero-stat:hover {
  transform: translateY(-8px) scale(1.03);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.hero-stat .stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  display: block;
  line-height: 1.1;
}

.hero-stat .stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-top: 0.2rem;
}

/* ========== EIXOS LEGEND ========== */
.eixos-legend {
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: relative;
  z-index: 2;
}

.eixo-legend-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.eixo-legend-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.eixo-legend-card.legend-pc {
  background: var(--pc-light);
  border-color: rgba(99, 102, 241, 0.15);
}
.eixo-legend-card.legend-pc:hover { border-color: var(--pc-color); }

.eixo-legend-card.legend-cd {
  background: var(--cd-light);
  border-color: rgba(16, 185, 129, 0.15);
}
.eixo-legend-card.legend-cd:hover { border-color: var(--cd-color); }

.eixo-legend-card.legend-md {
  background: var(--md-light);
  border-color: rgba(249, 115, 22, 0.15);
}
.eixo-legend-card.legend-md:hover { border-color: var(--md-color); }

.eixo-legend-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
}

.eixo-legend-icon.icon-pc { background: var(--pc-gradient); }
.eixo-legend-icon.icon-cd { background: var(--cd-gradient); }
.eixo-legend-icon.icon-md { background: var(--md-gradient); }

.eixo-legend-text strong {
  display: block;
  font-size: 0.88rem;
}

.eixo-legend-text small {
  color: #64748B;
  font-size: 0.78rem;
}

/* ========== PROGRESS DASHBOARD ========== */
.progress-dashboard {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.04);
  margin-bottom: 2rem;
}

.progress-dashboard h5 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-mini-card {
  text-align: center;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--jogos-light);
  transition: 0.3s ease;
}

.progress-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.progress-mini-card .mini-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
}

.progress-mini-card .mini-label {
  font-size: 0.72rem;
  color: #64748B;
  font-weight: 500;
}

/* ========== YEAR TABS ========== */
.jogos-tabs {
  gap: 0.6rem;
}

.jogos-tabs .nav-link {
  font-family: var(--font-display);
  font-size: 1rem !important;
  font-weight: 700;
  padding: 0.8rem 1.8rem !important;
  border-radius: var(--radius-pill) !important;
  color: var(--jogos-dark) !important;
  background: white;
  border: 2px solid #E2E8F0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.jogos-tabs .nav-link::after { display: none; }

.jogos-tabs .nav-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.jogos-tabs .nav-link.active[data-bs-target="#ano6"] {
  background: var(--ano6-bg);
  color: white !important;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.jogos-tabs .nav-link.active[data-bs-target="#ano7"] {
  background: var(--ano7-bg);
  color: white !important;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.jogos-tabs .nav-link.active[data-bs-target="#ano8"] {
  background: var(--ano8-bg);
  color: white !important;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.jogos-tabs .nav-link.active[data-bs-target="#ano9"] {
  background: var(--ano9-bg);
  color: white !important;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ========== FILTER BAR ========== */
.jogos-filter-bar {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #F1F5F9;
}

.filter-hab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.filter-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-label i {
  font-size: 0.8rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid #E2E8F0;
  background: white;
  color: #475569;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  user-select: none;
}

.filter-pill:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
  transform: translateY(-1px);
}

.filter-pill.active,
.filter-pill.hab-all.active {
  background: var(--jogos-dark);
  color: white;
  border-color: var(--jogos-dark);
  box-shadow: 0 2px 8px rgba(30, 27, 75, 0.25);
}

.filter-pill.hab-pill.active {
  background: var(--jogos-primary);
  color: white;
  border-color: var(--jogos-primary);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.filter-pill .pill-count {
  font-size: 0.6rem;
  background: rgba(0,0,0,0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  min-width: 16px;
  text-align: center;
  line-height: 1.2;
}

.filter-pill.active .pill-count,
.filter-pill.hab-all.active .pill-count {
  background: rgba(255,255,255,0.25);
}

.filter-pill.hab-pill .hab-code {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.filter-pill.hab-pill .hab-desc {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  opacity: 0.75;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-pill.hab-pill.active .hab-desc {
  opacity: 0.9;
}

.filter-results-count {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #94A3B8;
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-results-count strong {
  color: var(--jogos-dark);
}

.filter-clear-btn {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--jogos-danger);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}

.filter-clear-btn:hover {
  background: var(--jogos-danger-light);
}

.filter-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #94A3B8;
}

.filter-no-results i {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  opacity: 0.5;
}

.filter-no-results p {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.filter-no-results small {
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .jogos-filter-bar {
    padding: 0.8rem 1rem;
  }
  .filter-pill {
    font-size: 0.66rem;
    padding: 0.28rem 0.6rem;
  }
  .filter-pill.hab-pill .hab-desc {
    display: none;
  }
}

/* ========== EIXO SECTIONS ========== */
.eixo-section {
  margin-bottom: 3rem;
}

.eixo-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  color: white;
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
}

.eixo-header::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px;
  height: 100%;
  background: rgba(255,255,255,0.08);
  border-radius: 0 0 0 100px;
}

.eixo-header h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.eixo-header i { font-size: 1.4rem; }
.eixo-header.eixo-pc { background: var(--pc-gradient); }
.eixo-header.eixo-cd { background: var(--cd-gradient); }
.eixo-header.eixo-md { background: var(--md-gradient); }

/* ========== GAME CARDS ========== */
.jogo-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
  position: relative;
}

.jogo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.jogo-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.jogo-card.eixo-pc::before { background: var(--pc-gradient); }
.jogo-card.eixo-cd::before { background: var(--cd-gradient); }
.jogo-card.eixo-md::before { background: var(--md-gradient); }

.jogo-card.eixo-pc:hover { border-color: var(--pc-medium); box-shadow: var(--shadow-glow-pc); }
.jogo-card.eixo-cd:hover { border-color: var(--cd-medium); box-shadow: var(--shadow-glow-cd); }
.jogo-card.eixo-md:hover { border-color: var(--md-medium); box-shadow: var(--shadow-glow-md); }

.jogo-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.jogo-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1rem;
  position: relative;
}

.jogo-card-icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 20px;
  opacity: 0.25;
  z-index: -1;
}

.jogo-card-icon.icon-pc { background: var(--pc-gradient); }
.jogo-card-icon.icon-pc::after { background: var(--pc-gradient); }
.jogo-card-icon.icon-cd { background: var(--cd-gradient); }
.jogo-card-icon.icon-cd::after { background: var(--cd-gradient); }
.jogo-card-icon.icon-md { background: var(--md-gradient); }
.jogo-card-icon.icon-md::after { background: var(--md-gradient); }

.jogo-card-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--jogos-dark);
  margin-bottom: 0.5rem;
}

.jogo-card-desc {
  font-size: 0.85rem;
  color: #64748B;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.jogo-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.jogo-meta-tag {
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.jogo-meta-tag.tag-type {
  background: #F1F5F9;
  color: #475569;
}

.jogo-meta-tag.tag-questions {
  background: #FEF3C7;
  color: #92400E;
}

.jogo-meta-tag.tag-hab {
  background: #EDE9FE;
  color: #6D28D9;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.jogo-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  border-top: 1px solid #F1F5F9;
}

.jogo-badge {
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.jogo-badge.badge-pc { background: var(--pc-light); color: var(--pc-dark); }
.jogo-badge.badge-cd { background: var(--cd-light); color: var(--cd-dark); }
.jogo-badge.badge-md { background: var(--md-light); color: var(--md-dark); }

/* High score badge */
.jogo-card-highscore {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  color: #78350F;
  font-weight: 700;
  display: none;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  z-index: 2;
}

.jogo-card-highscore.visible { display: inline-flex; }

/* Jogar button */
.btn-jogar {
  padding: 0.5rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-jogar::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transition: all 0.5s ease;
  transform: translate(-50%, -50%);
}

.btn-jogar:hover::before {
  width: 200%; height: 200%;
}

.btn-jogar:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: white;
}

.btn-jogar.btn-pc { background: var(--pc-gradient); }
.btn-jogar.btn-cd { background: var(--cd-gradient); }
.btn-jogar.btn-md { background: var(--md-gradient); }

/* ========== GAME MODAL ========== */
#gameModal .modal-content {
  border: none;
  border-radius: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #F8FAFF 0%, #EEF2FF 100%);
}

#gameModal .modal-header {
  background: linear-gradient(135deg, var(--jogos-dark) 0%, #312E81 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  position: relative;
  z-index: 10;
}

#gameModal .modal-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pc-color), var(--cd-color), var(--md-color));
}

#gameModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: all 0.3s ease;
}

#gameModal .modal-header .btn-close:hover {
  opacity: 1;
  transform: scale(1.2);
}

#gameModal .modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

#gameModal .modal-body {
  padding: 0;
  overflow-y: auto;
}

/* Timer bar */
.game-timer-bar {
  height: 4px;
  background: #E2E8F0;
  position: relative;
  overflow: hidden;
}

.game-timer-bar .timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jogos-success), var(--jogos-warning), var(--jogos-danger));
  transition: width 1s linear;
  border-radius: 0 2px 2px 0;
}

/* Score header badges */
.game-header-stats {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.game-stat-badge {
  font-size: 0.82rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
}

.game-stat-badge.badge-score {
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
}

.game-stat-badge.badge-combo {
  background: rgba(99, 102, 241, 0.2);
  color: #A5B4FC;
  display: none;
}

.game-stat-badge.badge-combo.active {
  display: inline-flex;
  animation: comboPulse 0.5s ease;
}

.game-stat-badge.badge-timer {
  background: rgba(34, 197, 94, 0.2);
  color: #86EFAC;
}

.game-stat-badge.badge-timer.warning {
  background: rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
  animation: timerPulse 1s ease infinite;
}

@keyframes comboPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========== INSTRUCTIONS SCREEN ========== */
.game-instructions {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2.5rem;
  text-align: center;
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.game-instructions .game-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1.8rem;
}

.game-instructions .game-icon {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: white;
  position: relative;
  z-index: 2;
  animation: iconFloat 3s ease-in-out infinite;
}

.game-instructions .game-icon-glow {
  position: absolute;
  inset: -8px;
  border-radius: 36px;
  opacity: 0.3;
  filter: blur(15px);
  z-index: 1;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.05); }
}

.game-instructions h2 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--jogos-dark);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.game-instructions .instructions-text {
  font-size: 1.05rem;
  color: #64748B;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.game-instructions .objective {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.game-instructions .objective.obj-pc { border-color: var(--pc-color); background: var(--pc-light); }
.game-instructions .objective.obj-cd { border-color: var(--cd-color); background: var(--cd-light); }
.game-instructions .objective.obj-md { border-color: var(--md-color); background: var(--md-light); }

.game-instructions .objective .obj-label {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  display: block;
}

.game-instructions .game-tips {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.game-instructions .tip-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
}

.btn-iniciar {
  padding: 1rem 3.5rem;
  border-radius: var(--radius-pill);
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-display);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.btn-iniciar::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.btn-iniciar:hover::before {
  left: 100%;
}

.btn-iniciar:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  color: white;
}

.btn-iniciar.btn-pc { background: var(--pc-gradient); }
.btn-iniciar.btn-cd { background: var(--cd-gradient); }
.btn-iniciar.btn-md { background: var(--md-gradient); }

/* ========== GAME AREA ========== */
.game-area {
  max-width: 850px;
  margin: 0 auto;
  padding: 2rem;
  animation: fadeInUp 0.4s ease;
}

/* Axis-themed game area */
.game-area.game-pc .quiz-question::before { background: var(--pc-gradient); }
.game-area.game-cd .quiz-question::before { background: var(--cd-gradient); }
.game-area.game-md .quiz-question::before { background: var(--md-gradient); }

.game-area.game-pc .progress-bar { background: var(--pc-gradient) !important; }
.game-area.game-cd .progress-bar { background: var(--cd-gradient) !important; }
.game-area.game-md .progress-bar { background: var(--md-gradient) !important; }

.game-area.game-pc .challenge-num { color: var(--pc-color); }
.game-area.game-cd .challenge-num { color: var(--cd-color); }
.game-area.game-md .challenge-num { color: var(--md-color); }

.game-area.game-pc .quiz-option:hover { border-color: var(--pc-medium); }
.game-area.game-pc .quiz-option:hover .option-letter { background: var(--pc-gradient); color: white; }
.game-area.game-cd .quiz-option:hover { border-color: var(--cd-medium); }
.game-area.game-cd .quiz-option:hover .option-letter { background: var(--cd-gradient); color: white; }
.game-area.game-md .quiz-option:hover { border-color: var(--md-medium); }
.game-area.game-md .quiz-option:hover .option-letter { background: var(--md-gradient); color: white; }

.game-area.game-pc .ordering-item.selected { border-color: var(--pc-color); box-shadow: 0 0 0 3px var(--pc-glow); background: var(--pc-light); }
.game-area.game-cd .ordering-item.selected { border-color: var(--cd-color); box-shadow: 0 0 0 3px var(--cd-glow); background: var(--cd-light); }
.game-area.game-md .ordering-item.selected { border-color: var(--md-color); box-shadow: 0 0 0 3px var(--md-glow); background: var(--md-light); }

/* Progress bar */
.game-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.8rem 1.3rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
}

.challenge-badge {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}

.challenge-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--jogos-dark);
  line-height: 1;
}

.challenge-label {
  font-size: 0.78rem;
  color: #94A3B8;
  font-weight: 600;
}

.game-progress .score-display {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--jogos-warning);
  white-space: nowrap;
}

.game-progress .progress {
  flex: 1;
  margin: 0 1rem;
  height: 10px;
  border-radius: var(--radius-pill);
  background: #E2E8F0;
  overflow: hidden;
}

.game-progress .progress-bar {
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #6366F1, #10B981);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Combo indicator */
.combo-indicator {
  position: fixed;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  z-index: 1060;
  pointer-events: none;
  opacity: 0;
  transition: all 0.4s ease;
}

.combo-indicator.visible {
  opacity: 1;
}

.combo-indicator .combo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--pc-color);
  text-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  animation: comboFloat 0.5s ease;
  white-space: nowrap;
}

@keyframes comboFloat {
  from { transform: translateY(20px) scale(0.8); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ========== QUIZ STYLES ========== */
.quiz-question {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  animation: slideInUp 0.4s ease;
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.quiz-question::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pc-color), var(--cd-color), var(--md-color));
}

.quiz-question h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--jogos-dark);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  white-space: pre-line;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #FAFBFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.quiz-option::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(99,102,241,0.02));
  transition: width 0.3s ease;
}

.quiz-option:hover {
  border-color: var(--pc-medium);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.quiz-option:hover::before { width: 100%; }

.quiz-option .option-letter {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 1rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
  font-family: var(--font-display);
}

.quiz-option:hover .option-letter {
  background: var(--pc-gradient);
  color: white;
}

.quiz-option.correct {
  border-color: var(--jogos-success);
  background: var(--jogos-success-light);
  animation: correctBounce 0.5s ease;
}

.quiz-option.correct .option-letter {
  background: var(--jogos-success);
  color: white;
}

.quiz-option.wrong {
  border-color: var(--jogos-danger);
  background: var(--jogos-danger-light);
  animation: wrongShake 0.5s ease;
}

.quiz-option.wrong .option-letter {
  background: var(--jogos-danger);
  color: white;
}

.quiz-option.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.quiz-option.disabled.correct { opacity: 1; }

/* ========== ORDERING STYLES ========== */
.ordering-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  animation: slideInUp 0.4s ease;
  border: 1px solid rgba(0,0,0,0.04);
}

.ordering-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--jogos-dark);
  margin-bottom: 1rem;
}

.ordering-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ordering-item {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.2rem;
  background: #FAFBFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.92rem;
  user-select: none;
}

.ordering-item:hover {
  border-color: var(--pc-medium);
  background: var(--pc-light);
  transform: translateX(4px);
}

.ordering-item.selected {
  border-color: var(--pc-color);
  background: var(--pc-light);
  box-shadow: 0 0 0 3px var(--pc-glow);
}

.ordering-item .item-number {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  margin-right: 0.8rem;
  flex-shrink: 0;
  font-family: var(--font-display);
}

.ordering-item.correct-pos {
  border-color: var(--jogos-success);
  background: var(--jogos-success-light);
}

.ordering-item.correct-pos .item-number {
  background: var(--jogos-success);
  color: white;
}

.ordering-item.wrong-pos {
  border-color: var(--jogos-danger);
  background: var(--jogos-danger-light);
}

.ordering-item.wrong-pos .item-number {
  background: var(--jogos-danger);
  color: white;
}

/* ========== CLASSIFY STYLES ========== */
.classify-container { animation: slideInUp 0.4s ease; }

.classify-items-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  min-height: 80px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.04);
}

.classify-item {
  padding: 0.6rem 1.2rem;
  background: #FAFBFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.88rem;
  font-weight: 500;
}

.classify-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--pc-medium);
}

.classify-item.selected {
  border-color: var(--pc-color);
  background: var(--pc-light);
  box-shadow: 0 0 0 3px var(--pc-glow);
  transform: scale(1.05);
}

.classify-item.correct {
  border-color: var(--jogos-success);
  background: var(--jogos-success-light);
  pointer-events: none;
}

.classify-item.wrong {
  border-color: var(--jogos-danger);
  background: var(--jogos-danger-light);
  pointer-events: none;
}

.classify-zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.classify-zone {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-height: 150px;
  box-shadow: var(--shadow-sm);
  border: 2px dashed #CBD5E1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.classify-zone:hover { border-color: var(--pc-color); background: rgba(99,102,241,0.02); }
.classify-zone.active { border-color: var(--pc-color); background: var(--pc-light); border-style: solid; }

.classify-zone h5 {
  font-family: var(--font-display);
  text-align: center;
  padding-bottom: 0.5rem;
  margin-bottom: 0.8rem;
  border-bottom: 2px solid #E2E8F0;
  font-size: 1rem;
}

.classify-zone-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ========== MATCHING STYLES ========== */
.matching-container { animation: slideInUp 0.4s ease; }

.matching-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.matching-column {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.matching-column h5 {
  font-family: var(--font-display);
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #E2E8F0;
  font-size: 0.95rem;
}

.matching-item {
  padding: 0.8rem 1rem;
  background: #FAFBFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  text-align: center;
  line-height: 1.4;
}

.matching-item:hover { border-color: var(--pc-medium); transform: scale(1.02); }

.matching-item.selected {
  border-color: var(--pc-color);
  background: var(--pc-light);
  box-shadow: 0 0 0 3px var(--pc-glow);
  transform: scale(1.03);
}

.matching-item.matched {
  border-color: var(--jogos-success);
  background: var(--jogos-success-light);
  pointer-events: none;
  opacity: 0.85;
}

.matching-item.wrong-match {
  border-color: var(--jogos-danger);
  background: var(--jogos-danger-light);
  animation: wrongShake 0.5s ease;
}

/* ========== MAZE STYLES ========== */
.maze-container {
  animation: slideInUp 0.4s ease;
  text-align: center;
}

.maze-grid-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: inline-block;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.04);
}

.maze-grid {
  display: inline-grid;
  gap: 3px;
  background: #94A3B8;
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 3px;
}

.maze-cell {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.maze-cell.wall { background: #1E293B; }
.maze-cell.path { background: #F8FAFC; }
.maze-cell.start { background: #DBEAFE; }
.maze-cell.end { background: #DCFCE7; }
.maze-cell.player { background: #FEF3C7; animation: playerPulse 1s ease-in-out infinite; }

@keyframes playerPulse {
  0%, 100% { background: #FEF3C7; }
  50% { background: #FDE68A; }
}

.maze-controls {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.maze-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.maze-cmd-btn {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  border: 2px solid #E2E8F0;
  background: white;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.maze-cmd-btn:hover {
  background: var(--pc-light);
  border-color: var(--pc-color);
  transform: scale(1.12);
  box-shadow: var(--shadow-sm);
}

.maze-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 1rem;
  background: #F8FAFC;
  border-radius: var(--radius-md);
  min-height: 55px;
  margin-bottom: 1rem;
  border: 2px dashed #CBD5E1;
  align-items: center;
  justify-content: center;
}

.maze-seq-item {
  width: 42px;
  height: 42px;
  background: var(--pc-light);
  border: 2px solid var(--pc-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: popIn 0.2s ease;
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.maze-seq-item:hover {
  background: var(--jogos-danger-light);
  border-color: var(--jogos-danger);
  transform: scale(1.1);
}

/* ========== BINARY STYLES ========== */
.binary-container {
  animation: slideInUp 0.4s ease;
  text-align: center;
}

.binary-display {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.binary-display::before {
  content: '01010110';
  position: absolute;
  font-family: 'Courier New', monospace;
  font-size: 6rem;
  opacity: 0.03;
  top: -10px;
  right: -20px;
  font-weight: 800;
  transform: rotate(-12deg);
  color: var(--md-color);
}

.binary-target {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--jogos-dark);
  margin-bottom: 0.5rem;
}

.binary-bits {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.binary-bit {
  width: 58px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 3px solid #E2E8F0;
  background: white;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.binary-bit:hover {
  transform: translateY(-3px);
  border-color: var(--md-medium);
}

.binary-bit.active {
  background: var(--md-gradient);
  color: white;
  border-color: var(--md-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}

.binary-bit .bit-value {
  font-size: 0.6rem;
  opacity: 0.6;
  font-weight: 600;
}

.binary-result {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #64748B;
  margin: 1rem 0;
}

/* ========== CODE FIX STYLES ========== */
.codefix-container { animation: slideInUp 0.4s ease; }

.code-block {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.code-block::before {
  content: '● ● ●';
  position: absolute;
  top: 10px;
  left: 15px;
  color: rgba(255,255,255,0.2);
  font-size: 0.7rem;
  letter-spacing: 3px;
}

.code-block-inner {
  margin-top: 1rem;
}

.code-line {
  display: flex;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-family: 'Courier New', monospace;
  font-size: 0.92rem;
}

.code-line .line-number {
  color: #475569;
  min-width: 30px;
  text-align: right;
  margin-right: 1rem;
  user-select: none;
  font-size: 0.8rem;
}

.code-line .line-code { color: #E2E8F0; }

.code-line.bug-line {
  background: rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--jogos-danger);
  animation: bugFlash 2s ease infinite;
}

@keyframes bugFlash {
  0%, 100% { background: rgba(239, 68, 68, 0.1); }
  50% { background: rgba(239, 68, 68, 0.2); }
}

/* ========== PASSWORD STYLES ========== */
.password-display {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: slideInUp 0.4s ease;
  border: 1px solid rgba(0,0,0,0.04);
}

.password-visual {
  margin: 1.5rem 0;
}

.password-text {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--jogos-dark);
  background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
  padding: 1.2rem 2rem;
  border-radius: var(--radius-md);
  letter-spacing: 3px;
  border: 2px solid #E2E8F0;
  display: inline-block;
}

.password-strength-meter {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 1rem;
}

.strength-bar {
  width: 40px;
  height: 6px;
  border-radius: 3px;
  background: #E2E8F0;
  transition: all 0.3s ease;
}

.password-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn-forte, .btn-fraca {
  padding: 0.9rem 2.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-display);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-forte {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: white;
}

.btn-fraca {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
}

.btn-forte:hover, .btn-fraca:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ========== FILL BLANK STYLES ========== */
.fillblank-container { animation: slideInUp 0.4s ease; }

.fillblank-text {
  font-size: 1.05rem;
  line-height: 2;
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.04);
}

.fillblank-blank {
  display: inline-block;
  min-width: 130px;
  border-bottom: 3px dashed var(--pc-color);
  padding: 0.3rem 0.6rem;
  margin: 0 0.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: var(--pc-color);
  text-align: center;
  border-radius: 4px 4px 0 0;
  background: rgba(99,102,241,0.04);
}

.fillblank-blank:hover { background: var(--pc-light); }
.fillblank-blank.filled { border-bottom-style: solid; background: var(--pc-light); border-radius: 8px; }
.fillblank-blank.correct { border-color: var(--jogos-success); background: var(--jogos-success-light); color: #166534; }
.fillblank-blank.wrong { border-color: var(--jogos-danger); background: var(--jogos-danger-light); color: #991B1B; }

.fillblank-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.fillblank-opt {
  padding: 0.6rem 1.3rem;
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.fillblank-opt:hover {
  border-color: var(--pc-color);
  background: var(--pc-light);
  transform: translateY(-2px);
}

.fillblank-opt.used { opacity: 0.35; pointer-events: none; }

/* ========== MEMORY GAME STYLES ========== */
.memory-container { animation: slideInUp 0.4s ease; }

.memory-grid {
  display: grid;
  gap: 0.8rem;
  justify-content: center;
  margin: 1.5rem auto;
  max-width: 600px;
}

.memory-card {
  aspect-ratio: 1;
  perspective: 800px;
  cursor: pointer;
}

.memory-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius-md);
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid #E2E8F0;
}

.memory-card-front {
  background: linear-gradient(135deg, #4338CA, #6366F1);
  color: white;
  font-size: 2rem;
}

.memory-card-back {
  background: white;
  transform: rotateY(180deg);
  padding: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--jogos-dark);
  overflow: hidden;
}

.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card.matched .memory-card-back {
  border-color: var(--jogos-success);
  background: var(--jogos-success-light);
}

.memory-card.wrong .memory-card-inner {
  animation: wrongShake 0.5s ease;
}

/* ========== FEEDBACK AREA ========== */
.feedback-area {
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  animation: slideInUp 0.3s ease;
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.feedback-area.correct {
  background: var(--jogos-success-light);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.feedback-area.wrong {
  background: var(--jogos-danger-light);
  color: #991B1B;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.feedback-area .feedback-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ========== ERROR OVERLAY (retry on wrong) ========== */
.error-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1060;
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 1.5rem;
}

.error-overlay.visible {
  opacity: 1;
}

.error-overlay-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.85) translateY(30px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.error-overlay.visible .error-overlay-card {
  transform: scale(1) translateY(0);
}

.error-overlay-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #EF4444, #F97316, #EF4444);
}

.error-overlay-header {
  margin-bottom: 1.5rem;
}

.error-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  animation: errorShake 0.6s ease 0.2s;
}

.error-icon-circle i {
  font-size: 2rem;
  color: #EF4444;
}

@keyframes errorShake {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-12deg); }
  30% { transform: rotate(12deg); }
  45% { transform: rotate(-8deg); }
  60% { transform: rotate(8deg); }
  75% { transform: rotate(-4deg); }
  90% { transform: rotate(4deg); }
}

.error-overlay-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--jogos-dark);
  margin-bottom: 0.3rem;
}

.error-subtitle {
  color: #64748B;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.error-details-section {
  background: #F8FAFC;
  border-radius: var(--radius-md);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
  text-align: left;
}

.error-answer-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.7rem 0;
}

.error-answer-row + .error-answer-row {
  border-top: 1px solid #E2E8F0;
}

.error-answer-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94A3B8;
}

.error-answer-row.wrong-row .error-answer-value {
  color: #DC2626;
}

.error-answer-row.correct-row .error-answer-value {
  color: #16A34A;
}

.error-answer-value {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-answer-value code {
  background: rgba(0,0,0,0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.88rem;
}

.letter-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.letter-badge.wrong-badge { background: #EF4444; }
.letter-badge.correct-badge { background: #22C55E; }

.error-correct-order {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.error-order-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--jogos-dark);
  font-weight: 500;
}

.error-order-item .order-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #22C55E;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.error-number {
  font-family: var(--font-display);
  font-size: 1.5rem !important;
  font-weight: 800 !important;
}

.error-maze-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.error-maze-sequence {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.maze-cmd-display {
  width: 38px;
  height: 38px;
  background: #EEF2FF;
  border: 2px solid var(--pc-color);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.error-blanks-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.error-blank-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.error-blank-row .blank-num {
  font-weight: 700;
  font-size: 0.78rem;
  color: #64748B;
  white-space: nowrap;
}

.wrong-text {
  color: #DC2626;
  font-weight: 600;
  text-decoration: line-through;
}

.correct-text {
  color: #16A34A;
  font-weight: 600;
}

.error-classify-info p {
  margin: 0;
  color: #64748B;
  font-size: 0.92rem;
}

.error-explanation-section {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 1rem 1.3rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.explanation-label {
  font-weight: 700;
  font-size: 0.82rem;
  color: #92400E;
  margin-bottom: 0.4rem;
}

.error-explanation-section p {
  margin: 0;
  font-size: 0.88rem;
  color: #78716C;
  line-height: 1.65;
}

.btn-retry-challenge {
  padding: 1rem 3rem;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-display);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn-retry-challenge::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.btn-retry-challenge:hover::before {
  left: 100%;
}

.btn-retry-challenge:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  color: white;
}

/* Success feedback enhancement */
.feedback-area.correct {
  background: linear-gradient(135deg, #DCFCE7, #D1FAE5);
  border: 1px solid rgba(34, 197, 94, 0.3);
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
  0% { transform: scale(0.9); opacity: 0; }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

/* Enhanced ordering items */
.ordering-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ordering-item:active {
  transform: scale(0.97);
}

/* Enhanced quiz options */
.quiz-option {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option:active:not(.disabled) {
  transform: scale(0.97);
}

/* Modal body relative for overlays */
#gameModal .modal-body {
  position: relative;
}

/* Error overlay responsive */
@media (max-width: 576px) {
  .error-overlay-card {
    padding: 1.8rem 1.3rem;
  }

  .error-overlay-header h3 {
    font-size: 1.2rem;
  }

  .error-icon-circle {
    width: 64px;
    height: 64px;
  }

  .error-icon-circle i {
    font-size: 1.5rem;
  }

  .btn-retry-challenge {
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    width: 100%;
  }

  .challenge-num {
    font-size: 1.2rem;
  }
}

/* ========== RESULT SCREEN ========== */
.game-result {
  text-align: center;
  max-width: 520px;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.game-result::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--pc-color), var(--cd-color), var(--md-color), var(--jogos-warning));
}

.result-emoji {
  font-size: 5rem;
  margin-bottom: 0.5rem;
  display: block;
  animation: resultBounce 1s ease;
}

@keyframes resultBounce {
  0% { transform: scale(0) rotate(-20deg); }
  50% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.game-result h2 {
  font-family: var(--font-display);
  color: var(--jogos-dark);
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.result-stars {
  font-size: 2.8rem;
  margin: 1rem 0;
}

.result-stars .star {
  margin: 0 0.15rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.result-stars .star.filled {
  color: var(--jogos-warning);
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  animation: starPop 0.5s ease;
}

.result-stars .star.empty {
  color: #E2E8F0;
}

.result-score {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, var(--jogos-warning), #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-message {
  font-size: 1.1rem;
  color: #64748B;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.result-stat-card {
  background: var(--jogos-light);
  border-radius: var(--radius-md);
  padding: 0.8rem;
}

.result-stat-card .stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--jogos-dark);
  display: block;
}

.result-stat-card .stat-name {
  font-size: 0.72rem;
  color: #64748B;
  font-weight: 500;
}

.result-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-reiniciar {
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-reiniciar:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ========== CONFETTI ========== */
.confetti-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s ease-in forwards;
}

@keyframes confettiFall {
  0% { top: -10px; transform: rotate(0deg) scale(1); opacity: 1; }
  100% { top: 110vh; transform: rotate(720deg) scale(0.5); opacity: 0; }
}

/* ========== GENERAL GAME BUTTONS ========== */
.btn-game {
  padding: 0.65rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.92rem;
  font-family: var(--font-display);
}

.btn-game:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-game.btn-primary-game { background: var(--pc-gradient); color: white; }
.btn-game.btn-success-game { background: var(--cd-gradient); color: white; }
.btn-game.btn-warning-game { background: var(--md-gradient); color: white; }

.btn-next {
  padding: 0.7rem 2.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #6366F1, #818CF8);
  color: white;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-family: var(--font-display);
  margin-top: 1rem;
}

.btn-next:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Hint button */
.btn-hint {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  border: 2px solid #F59E0B;
  background: #FFFBEB;
  color: #92400E;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-hint:hover {
  background: #FEF3C7;
  transform: scale(1.05);
}

.btn-hint:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ========== EMOJI BURST ========== */
.emoji-burst {
  position: fixed;
  font-size: 2rem;
  pointer-events: none;
  z-index: 9999;
  animation: emojiBurst 1s ease forwards;
}

@keyframes emojiBurst {
  0% { transform: scale(0) translateY(0); opacity: 1; }
  50% { transform: scale(1.5) translateY(-40px); opacity: 1; }
  100% { transform: scale(0.8) translateY(-80px); opacity: 0; }
}

/* ========== FOOTER ========== */
.jogos-footer {
  background: linear-gradient(135deg, var(--jogos-darker) 0%, var(--jogos-dark) 100%);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.88rem;
  position: relative;
}

.jogos-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pc-color), var(--cd-color), var(--md-color));
}

.jogos-footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
}

.jogos-footer a:hover { color: white; text-decoration: underline; }

/* ========== SCROLL TO TOP ========== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366F1, #818CF8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.scroll-to-top.visible { opacity: 1; visibility: visible; }

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

/* ========== ANIMATIONS ========== */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes correctBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.03); }
  60% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

@keyframes starPop {
  0% { transform: scale(0) rotate(-30deg); }
  60% { transform: scale(1.4) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
  .navbar-collapse {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-height: 80vh;
    overflow-y: auto;
  }
  .nav-link { font-size: 0.85rem !important; padding: 0.5rem 0.8rem !important; white-space: normal; }
  .nav-link::after { display: none; }
  .dropdown-menu { box-shadow: none; background: #F8FAFC; border-radius: var(--radius-sm); }
  .dropdown-submenu .dropdown-menu { left: 0; top: 100%; position: relative; }
}

@media (max-width: 768px) {
  .jogos-hero { padding: 120px 0 70px; min-height: auto; }
  .jogos-hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 0.8rem; }
  .hero-stat { padding: 0.8rem 1.2rem; min-width: 110px; }
  .hero-stat .stat-number { font-size: 1.8rem; }
  .hero-floating { display: none; }
  .jogos-tabs .nav-link { font-size: 0.88rem !important; padding: 0.6rem 1.2rem !important; }
  .eixo-header h3 { font-size: 1rem; }
  .game-area { padding: 1rem; }
  .quiz-question { padding: 1.5rem; }
  .quiz-question h4 { font-size: 1rem; }
  .maze-cell { width: 42px; height: 42px; font-size: 1rem; }
  .binary-bit { width: 48px; height: 60px; font-size: 1.3rem; }
  .binary-target { font-size: 2.5rem; }
  .matching-columns { grid-template-columns: 1fr; }
  .result-score { font-size: 2.5rem; }
  .result-stats { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .game-result { padding: 2rem 1.5rem; margin: 1.5rem auto; }
  .game-instructions { padding: 1.5rem; }
  .password-text { font-size: 1.4rem; letter-spacing: 2px; }
}

@media (max-width: 576px) {
  .jogos-hero h1 { font-size: 1.5rem; }
  .hero-mascot { font-size: 3rem; }
  .jogos-tabs { gap: 0.4rem; }
  .jogos-tabs .nav-link { font-size: 0.78rem !important; padding: 0.5rem 0.8rem !important; }
  .jogo-card-body { padding: 1.2rem; }
  .jogo-card-icon { width: 50px; height: 50px; font-size: 1.2rem; }
  .quiz-option { padding: 0.75rem 1rem; font-size: 0.85rem; }
  .quiz-option .option-letter { width: 32px; height: 32px; font-size: 0.8rem; }
  .maze-cell { width: 36px; height: 36px; font-size: 0.9rem; }
  .maze-cmd-btn { width: 48px; height: 48px; }
  .password-text { font-size: 1.2rem; padding: 0.8rem 1rem; }
  .password-buttons { flex-direction: column; }
  .btn-forte, .btn-fraca { width: 100%; justify-content: center; }
  .classify-zones { grid-template-columns: 1fr; }
  .result-stats { grid-template-columns: 1fr 1fr 1fr; }
  .btn-reiniciar { padding: 0.7rem 1.5rem; font-size: 0.85rem; }
  .progress-dashboard { padding: 1rem 1.2rem; }
  .memory-grid { gap: 0.5rem; }
}
