:root {
  --bgTitle: #f26e6c;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1em 0 0;
  background-color: var(--bgTitle);
}

#lang-switcher {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

#toggle-btn svg {
  width: 1.2rem;
  height: 1.2rem;
}

@supports (view-transition-name: none) {
  @view-transition {
    navigation: auto;
  }
}

nav a {
  color: #222;
  margin-left: 1rem;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  #lang-switcher {
    position: static;
    transform: none;
    width: 100%;
    justify-content: center;
  }
  
  header {
    flex-wrap: wrap;
  }
  
  nav {
    margin-top: 0.5rem;
    width: 100%;
    display: flex;
    justify-content: space-around;
  }
  nav a {
    margin: 0;
  }

  card{
    max-width: 90vw;
  }

}

button{
  border-radius: 7px;
  border: 2px solid #222;
  padding: 0.5em 0.7em;
  background-color: #f8f4ea;
  color: black;
  font-weight: bold;
}

#lang-switcher button.active {
  background-color: #5f8f5f;
  margin-right: 1px;
  color: white;
  transform: translate(-1px, -1px);
  box-shadow:
    2px 4px 2px rgba(0,0,0,0.45);
}

#prettify {background-color: #8fbc8f;}
#copyText {background-color: #32cd32;}
#removeEmpty {background-color: #daa520;}
#clearAll {background-color: var(--bgTitle);}

.grid{
  display: grid;
  border: 2px solid #888;
  border-radius: 11px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  background-color: papayawhip;
  justify-content: space-between;
  gap: 1rem;
  box-sizing: border-box;
  margin-top: 0.5rem;
  padding: 20px;
}

.flex-parent {
  display: flex;
  padding: 10px;
  margin-right: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}

/*.flex-parent.spaced{
  justify-content: space-around;
}*/

.flex-child {
  flex: 0 1 auto;
  width: 100%;
}

.card{
  border: 2px solid #888;
  border-radius: 17px;
  max-width: 50vw;
  padding-inline: 1em;
  background-color: transparent;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0), rgba(42, 42, 42, 0), rgba(42, 42, 42, 0.17));
}

@media (max-width: 600px) {
  .card {
    max-width: 90vw;
  }
}

.area {
  font-family: system-ui, sans-serif;
  width: 100%;
  border: 2px solid #888;
  border-radius: 7px;
}