/** Module 6 CSS Layout Styling **/

/*Basic Styles*/
body {
  margin: 100px;
  font-size: 1.3rem;
}

header {
  text-align: center;
  border-bottom: 1px solid gray;
  margin-bottom: 50px;
  padding-bottom: 10px;
  font-size: 0.9rem;
}

footer{
  text-align: center;
  border-top: 1px solid gray;
  margin-top: 50px;
  padding-top: 10px;
  color: gray;
  font-size: 0.9rem;
}

section {
  /*Space at bottom of each section*/
  padding-bottom: 25px
}

div {
  text-align: center;
  padding-bottom: 20px;
}

h2 {
  text-align: center;
}

/*Show definitions even when scrolling*/
.definition {
  background: white;
  position: sticky;
  top: 0;
  overflow: auto;
}

/*Rank List Styling*/
.ranks {
  font-size: 0.8em;
  align-items: center;
  width: 100px;
  background-color: white;
  border: 1px solid #cccccc; /*gray80*/
  border-radius: 8px;
  padding-right: 24px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  float: right;
  margin-left: 15px;
}
.ranks h3 {
  font-family: monospace;
  padding-left: 20px;
}

/*Platform Stats Styling*/
.sns {
  border: 1px solid black;
  background: white;
  border-radius: 5px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  padding: 10px;
}
.sns img {
  margin: auto;
}
.sns ul {
  margin: auto;
  padding: 0px 0px 10px;
  list-style-type: none;
  text-align: left;
  font-family: monospace;
  font-variant: small-caps
}
a.button {
  display: block;
  color: white;
  background: purple;
  padding: 8px 10px;
  margin: 10px auto;
  text-align: center;
  font-weight: bold;
  text-decoration: none;
  border-radius: 10px;
}
a.button:hover {
  background: #B19CD9 /*light purple*/
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #B19CD9;/*purple*/
  padding: 10px;
  gap: 10px;
}

/*Fixed Sidenote*/
.sidenote {
  /*Fixed position on screen when scrolling*/
  position: fixed;
  bottom: 50px;
  background-color: #B19CD9; /*Purple*/
  color: white;
  padding: 5px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  /*Make sure it stay on top of other elements*/
  z-index: 1000;
}

/****Responsive media adjustments****/
/*Tablets*/
@media screen and (max-width: 900px) {
  body {
    margin: 50px;
  }
  
  /*Smaller definition text*/
  .definition {
    font-size: 1rem;
  }

  /*2 Stat cards*/
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/*Mobile devices*/
@media screen and (max-width: 600px) {   
  /*Smaller definition text*/
  .definition {
    font-size: 0.9rem; 
  }
  
  /*Ranks on top*/
  .ranks {
    float: none;
    margin-bottom: 25px;
  }
  
  /*1 Stat card*/
  .stats {
    grid-template-columns: 1fr;
  }
  
  .sidenote {
    font-size: 0.6em;
    padding: 1px 5px;
}