:root{
  --bg1:#87ceeb;
  --bg2:#eef9ff;
  --panel:rgba(255,255,255,.82);
  --panel-strong:#ffffff;
  --text:#18324a;
  --primary:#7b4dff;
  --primary2:#9a73ff;
  --danger:#d94b4b;
  --success:#1f9b57;
  --shadow:0 12px 30px rgba(0,0,0,.18);
  --radius:24px;
}
*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  width:100%;
  min-height:100%;
  overflow-x:hidden;
  background:transparent;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--text);
}
body{
  background:linear-gradient(180deg,var(--bg1),var(--bg2));
}
button{font:inherit}
.hidden{display:none !important}

#titleScreen,#app{min-height:100vh}
#titleScreen{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

@media (orientation: portrait){
  #titleScreen{
    background-image:url("../images/title_portrait.png");
  }
}
@media (orientation: landscape){
  #titleScreen{
    background-image:url("../images/title_landscape.png");
  }
}

#titleContent{
  width:min(1100px,96vw);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:28px;
  background:rgba(255,255,255,.14);
  backdrop-filter:blur(8px);
  border-radius:28px;
}
.heroText{max-width:520px}
.heroText h1{
  font-size:clamp(2.4rem,6vw,4.8rem);
  margin:0 0 10px;
  line-height:1;
  color:#fff;
  text-shadow:0 2px 14px rgba(0,0,0,.28);
}
.heroText p{
  margin:0;
  font-size:1.15rem;
  color:rgba(255,255,255,.95);
  text-shadow:0 1px 8px rgba(0,0,0,.24);
}
#startButton,.primaryBtn,.secondaryBtn,.categoryBtn,.answerButton,.menu-item,.quickCard,.listItem{
  border:none;
  border-radius:18px;
  cursor:pointer;
  transition:transform .12s ease,opacity .12s ease,background .12s ease,box-shadow .12s ease;
}
#startButton,.primaryBtn,.categoryBtn,.answerButton{
  background:linear-gradient(180deg,var(--primary2),var(--primary));
  color:#fff;
  box-shadow:0 10px 18px rgba(123,77,255,.25);
}
#startButton:hover,.primaryBtn:hover,.categoryBtn:hover,.answerButton:hover,.menu-item:hover,.quickCard:hover,.listItem:hover{transform:translateY(-1px)}
#startButton{
  padding:16px 34px;
  font-size:1.2rem;
  font-weight:700;
  min-width:160px;
}
.secondaryBtn{
  background:#eef3fb;
  color:var(--text);
  padding:14px 22px;
  font-weight:700;
  box-shadow:0 8px 16px rgba(0,0,0,.08);
}
#app{
  width:100%;
  padding:18px 18px 108px;
}
.screen{
  width:min(1180px,96vw);
  margin:0 auto;
  padding:18px;
}
.panel{
  background:var(--panel);
  backdrop-filter:blur(8px);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.topBar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}
.topBar h2{margin:0;font-size:clamp(1.5rem,3vw,2.4rem)}
.subtle{opacity:.75;font-size:.98rem}
.statsRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.chip{
  padding:10px 14px;
  background:rgba(255,255,255,.88);
  color:var(--text);
  font-weight:700;
  border:1px solid rgba(0,0,0,.06);
  border-radius:999px;
}
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}
.categoryBtn{
  width:100%;
  min-height:110px;
  padding:16px;
  text-align:left;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.categoryBtn.locked{
  background:linear-gradient(180deg,#8d99ae,#667085);
  cursor:not-allowed;
  box-shadow:none;
}
.categoryTitle{font-size:1.35rem;font-weight:800}
.categoryDesc{opacity:.92;font-size:.95rem;line-height:1.3}
.categoryMeta{display:flex;justify-content:space-between;align-items:center;font-size:.92rem;opacity:.95;gap:10px}
.lockTag{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.18);font-weight:700
}

.homeHero{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
  align-items:center;
  padding:22px;
}
.heroCopy h2{
  margin:6px 0 8px;
  font-size:clamp(2rem,4vw,3.2rem);
  line-height:1.05;
}
.eyebrow{
  display:inline-block;
  padding:7px 11px;
  border-radius:999px;
  background:rgba(123,77,255,.12);
  color:var(--primary);
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-size:.78rem;
}
.homeMascot{
  width:min(100%,260px);
  justify-self:end;
  filter:drop-shadow(0 14px 24px rgba(0,0,0,.14));
}
.sectionTitle{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin:18px 0 12px;
}
.sectionTitle h3{margin:0;font-size:1.35rem}
.sectionTitle span{opacity:.7}
.quickGrid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.quickCard{
  padding:16px;
  text-align:left;
  min-height:124px;
  background:rgba(255,255,255,.88);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.quickCard strong{font-size:1.05rem}
.quickCard small{opacity:.8;line-height:1.3}
.quickIcon{font-size:1.6rem}
.featuredGrid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.featuredCard{
  padding:18px;
  background:rgba(255,255,255,.88);
}
.cardHeader{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.featuredCard h4{margin:0 0 8px;font-size:1.2rem}
.featuredCard p{margin:0 0 14px;opacity:.82;line-height:1.4}

.sheetIntro{margin-bottom:12px;opacity:.82}
.listStack{display:grid;gap:10px}
.listItem{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  width:100%;
  padding:14px 16px;
  background:rgba(255,255,255,.88);
  text-align:left;
}
.listIcon{font-size:1.6rem}
.listText{display:flex;flex-direction:column;gap:3px}
.listText small{opacity:.75}
.listMeta{
  font-size:.85rem;
  font-weight:800;
  color:var(--primary);
  white-space:nowrap;
}
.emptyState{opacity:.75}

.storyPage{
  padding:22px;
}
.storyTop{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.storyTop h2{margin:6px 0 8px;font-size:2rem}
.storyTop p{margin:0;opacity:.82;max-width:70ch}
.storyBadge{
  padding:10px 14px;
  border-radius:999px;
  background:rgba(123,77,255,.12);
  color:var(--primary);
  font-weight:800;
  white-space:nowrap;
}
.storyBody{
  margin-top:18px;
  background:rgba(255,255,255,.76);
  border-radius:20px;
  padding:18px;
  line-height:1.75;
}
.storyBody p{margin:0 0 12px}
.vocabGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
}
.vocabCard,.statCard,.achievementChip{
  background:rgba(255,255,255,.88);
  border-radius:18px;
  padding:14px 16px;
  box-shadow:0 6px 12px rgba(0,0,0,.06);
}
.vocabCard strong,.statCard strong{display:block;font-size:1.06rem}
.vocabCard small,.statCard small{opacity:.7}
.profilePanel{padding:22px}
.profileTop{
  display:flex;
  align-items:center;
  gap:16px;
}
.profileAvatar{
  width:92px;
  height:92px;
  object-fit:contain;
  filter:drop-shadow(0 10px 16px rgba(0,0,0,.12));
}
.statsGrid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:18px 0;
}
.achievementList{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.achievementChip{
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
}
.resultButtons{
  margin-top:18px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px;
}

.overlay{
  position:fixed;
  inset:0;
  background:rgba(10,18,30,.55);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:16px;
  z-index:9999;
}
.overlayCard{
  width:min(720px,100%);
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(12px);
  border-radius:28px;
  box-shadow:0 18px 38px rgba(0,0,0,.22);
  padding:18px;
}
.overlayCard.sheet{
  border-radius:28px 28px 24px 24px;
}
.overlayCard.dialog{
  align-self:center;
}
.overlayHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.overlayHeader h3{margin:0;font-size:1.55rem}
.overlayClose{
  border:none;
  background:rgba(123,77,255,.10);
  color:var(--primary);
  width:40px;
  height:40px;
  border-radius:12px;
  cursor:pointer;
  font-size:1rem;
}
.overlayBody{max-height:min(68vh,600px);overflow:auto;padding-right:2px}
.overlayMenu{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}
.bottom-menu{
  position:fixed;
  bottom:15px;
  left:50%;
  transform:translateX(-50%);
  width:92%;
  max-width:560px;
  height:72px;
  display:flex;
  justify-content:space-around;
  align-items:center;
  background:rgba(123,77,255,.75);
  backdrop-filter:blur(15px);
  -webkit-backdrop-filter:blur(15px);
  border-radius:24px;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 8px 25px rgba(0,0,0,.25);
  z-index:9998;
}

.menu-item{
  flex:1;
  height:100%;
  background:transparent;
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  opacity:.88;
}

.menu-item span{
  display:block;
  font-size:24px;
  margin-bottom:2px;
}

.menu-item.active{
  opacity:1;
  background:rgba(255,255,255,.18);
}

.menu-item:hover{
  color:#fff;
}

/* ===== CELULAR ===== */
@media (max-width: 768px){

  .bottom-menu{
    display:flex !important;
    height:68px;
    border-radius:22px;
  }

  .homeHero{
    grid-template-columns:1fr;
    text-align:center;
  }

  .homeMascot{
    justify-self:center;
  }

  .quickGrid{
    grid-template-columns:1fr;
  }

  .featuredGrid{
    grid-template-columns:1fr;
  }

  .statsGrid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  #titleContent{
    flex-direction:column;
    text-align:center;
  }

  .heroText h1,
  .heroText p{
    color:#fff;
  }

  .overlay{
    padding:10px;
  }

  .overlayBody{
    max-height:64vh;
  }

  .storyTop{
    flex-direction:column;
  }

  .overlayMenu{
    flex-direction:column;
  }
}

/* ===== COMPUTADOR ===== */
@media (min-width: 769px){

  .bottom-menu{
    display:none !important;
  }

}

@media (orientation:landscape) and (max-height:620px){

  #titleContent{
    flex-direction:row;
  }

  .homeHero{
    grid-template-columns:1fr .6fr;
  }

  .overlayBody{
    max-height:54vh;
  }

}
