@import url('https://fonts.googleapis.com/css2?family=Klee+One&display=swap');

body {
  font-family: 'Klee One', system-ui, sans-serif;
  background: var(--bg, #000);
  color: white;
  height: 100vh;
  margin: 0;
  transition: background 0.3s;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  grid-template-areas: 
    "head"
    "main"
    "aside"
    "footer";
}

header {
  grid-area: head;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  flex-grow: 0;

  h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
    
    &.desktop { display: none; }
  }
}

main {
  grid-area: main;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

aside {
  grid-area: aside;
  flex: 0;
  padding-bottom: 1rem;
  text-align: center;
}

footer {
  text-align: center;
  font-size: 0.9rem;
  color: #BBB;
  padding-bottom: 1rem;
}

a,
a:visited {
  color: #89c3eb;
}

a:hover,
a:active {
  color: #fef263;
}

.hidden {
  display: none;
}

.btn {
  margin: 0 auto;
  display: block;
  background-color: #f8b862;
  color: black;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.btn:hover,
.btn:active {
  background-color: #c3d825;
  transition: all 0.3s ease-in-out;
}

.status {
  color: #BBB;
  font-size: 0.9rem;
  margin-top: 15px;
}

.card {
  background: #c0c6c9;
  color: black;
  border-radius: 8px;
  padding: 0.5rem 1rem 1.5rem;
  margin: 1rem;
  text-align: center;

  .idiom ruby {
    font-size: 4rem;
    line-height: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    
    > rt {
      font-size: 1rem;
      text-align: center;
      margin: 0;
      padding: 0;
    }
  }
  
  .jp {
    font-size: 1.5rem;
    margin-top: 2rem;
  }
}

@media (min-width: 768px) {
  body {
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas: 
      "head"
      "aside"
      "main"
      "footer";
  }
  
  header h1.mobile { display: none; }
  header h1.desktop { display: block; }
  
  main {
    display: block;
  }
  
  .card {
    max-width: 600px;
    margin: 1rem auto;
  }
}