/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --container-width: 1280px;

  /* ESPAÇAMENTOS PADRÕES */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;

  --radius: 12px;

  --blue: #4c6fff;
  --purple: #8b5cf6;
  --green: #22c55e;

  --gray-100: #f5f5f5;
  --gray-200: #e4e4e4;
  --gray-300: #d4d4d4;
  --gray-700: #3f3f46;
}

body {
  font-family: Arial, sans-serif;
  background: #ffffff;
  color: #222;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* HEADER */
.header {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--gray-300);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.logo h1 {
  font-size: 2rem;
}

.menu {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.menu a {
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 600;
}

.search-area input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
}

/* ETAPAS */
.grades-section {
  padding: var(--space-lg) 0 var(--space-md);
}

.grades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-xs);
}

.grade {
  border: none;
  padding: var(--space-md) var(--space-sm);
  font-weight: bold;
  cursor: pointer;
  border-radius: var(--radius);
  transition: 0.25s ease;
}

.grade:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  opacity: 0.95;
}

.infantil {
  background: #fde047;
}

.fundamental {
  background: #86efac;
}

.anos-finais {
  background: #7dd3fc;
}

.medio {
  background: #fdba74;
}

/* TRILHAS */
.tracks-section,
.filters-section {
  padding-bottom: var(--space-xs);
}

.tracks-grid,
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-sm);
}

.track,
.filter {
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
}

.track:hover,
.filter:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.10);
}

.track {
  background: #eef2ff;
}

.track.active {
  background: var(--blue);
  color: white;
}

.filter {
  background: #dcfce7;
}

.filter.active {
  background: #15803d;
  color: white;
}

/* MAIN */
.main-content {
  padding: var(--space-lg) 0 var(--space-xl);
  transition: opacity 0.3s ease;
}

.education-level {
  background: #fde047;
  padding: var(--space-md);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
}

/* SEÇÕES */
.content-section {
  margin-bottom: var(--space-xl);
}

.section-header {
  padding: var(--space-sm);
  border-radius: var(--radius);
  margin-bottom: var(--space-lg);
  color: white;
}

.section-header.blue {
  background: var(--blue);
}

.section-header.purple {
  background: var(--purple);
}

.section-header.green {
  background: var(--green);
}

.skill-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.skill-block h3 {
  color: #1d4ed8;
}

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.game-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  transition: 0.3s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.game-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card-content a {
  text-decoration: none;
  color: #2563eb;
  font-weight: bold;
}

.rating {
  font-size: 1.1rem;
}

.simple-card h4 {
  font-size: 1.2rem;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu {
    width: 100%;
    justify-content: flex-start;
  }

  .tracks-grid,
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}