:root {
  --cell: 75px;
  --gap: 3px;
}

* {
  margin: 0;
  padding: 0;
  outline: none;
  cursor: pointer;
}

html {
  font-family: 'Open Sans', sans-serif;
  color: white;
  background-color: #232528;
  overflow: hidden;
  width: 100%;
  height: 100%;
  line-height: normal;
  font-weight: normal;
  font-size: calc(var(--cell) / 12);
}

#grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--cell), 1fr));
  grid-gap: var(--gap);
  position: absolute;
  top: calc(50%);
  left: 50%;
  transform: translate(-50% , -50%);
}

.cell, .btn {
  background-color: #2d3e50; 
  transition: transform 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  width: var(--cell);
  height: calc(var(--cell) / 5);
}

.hide {
  display: none !important;
}

/* Окно с результатами или неподдержкой */
#unsupport, #result {
  position: fixed;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  color: white;
  background-color: black;
  flex-direction: column;
  text-align: center;
}

.app-name {
  padding-left: calc(var(--cell) / 5);
  display: block;
  position: absolute;
}

.cell-number, .cell-img, .V {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--cell) / 5);
  height: calc(var(--cell) / 5);
  background-color: #275680;
  color: white;
  text-align: center;
  line-height: calc(var(--cell) / 4);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: 2px 0 0 0 #232528;
  pointer-events: none;
}

.V {
  background-color: #4bbb71;
}

.V::before {
  content: "+";
  font-weight: bold;
  font-size: 1.5rem;
  color: black;
}

.cell:focus .cell-img,
.cell:hover .cell-img {
  z-index: 1000;
  transform: scale(1.7) translate(-0.04rem, -0.04rem);
  border-radius: 5px;
  border: solid 2px white;
}

.cell:focus .btn,
.cell:hover .btn {
  z-index: 0;
  color: black;
  background-color: white;
  letter-spacing: -0.5px;
  /*animation: btnIn 0.4s ease forwards;*/
}

.text0, .text1{
  display: none;  
  padding-left: calc(var(--cell) / 3.5);
  color: black;
  /*font-weight: bold;*/
}

.cell:hover .app-name,
.cell:focus .app-name {
  display: none;
}

.cell:hover .text0,
.cell:hover .text1,
.cell:focus .text0,
.cell:focus .text1{
  display: block;
}

.button {
  border-radius: 2px;
  display: inline-block;
  width: calc(var(--cell) / 10);
  height: calc(var(--cell) / 16);
}

.blue { background-color: blue; }
.red { background-color: red; }

.menu-item{
  background: transparent;
  border: none;
  outline: none;
  color: white;
  letter-spacing: 1px;
  font-size: calc(var(--cell) / 14);
  margin: auto calc(var(--cell) / 30) 0px 0px;
}

#grid > div:first-child {
  grid-column: 1 / -1 !important;
  justify-self: end;
  height: calc(var(--cell) / 6);
}

@keyframes btnIn {
  from { transform: scaleX(0) translateX(-150px); }
  to { transform: scaleX(1) translateX(0); }
}

.app-info {
  display: block;
  position: fixed;
  left: 0;
  top: calc(var(--cell) / 111 * -1);
  display: none;
  max-width: calc(100% - var(--cell) - var(--gap)*2);
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;  

}
.cell:hover .app-info,
.cell:focus .app-info{
  display: block;
}