body {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  margin: 0;
  margin-top: 125px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #f1f5f9;
  font-family: "Arial", sans-serif;
  overflow: hidden;
}

:root {
  --border-color: #22d3ee;
  --border-size: 2px;
  --border-wh: 100%;
  --cell-size: 20px;
}

button {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: 2px solid #22d3ee;
  color: #f1f5f9;
  padding: 8px 12px;
  font-size: medium;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

input#size {
  border: 1px solid #22d3ee;
  padding: 8px;
  background: #1e293b;
  color: #22d3ee;
  border-radius: 4px;
}

label {
  color: #38bdf8;
  font-weight: bold;
}

.cell.start {
  background: radial-gradient(circle at center, #22d3ee, #1e293b);
  border-radius: 4px;
}

.cell.end {
  background: radial-gradient(circle at center, #f43f5e, #1e293b);
  border-radius: 4px;
}

.cell.player {
  background: radial-gradient(circle at center, #f1f5f9 0.25rem, transparent 0);
}

.cell.solution {
  background-color: #0ea5e9;
}

#controls {
  margin: 20px;
}

#maze-container {
  display: grid;
  gap: 2px;
  border: var(--border-color) 10px solid;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cell {
  position: relative;
  width: var(--cell-size);
  height: var(--cell-size);
  background-color: #334155;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cell:hover {
  background-color: #475569;
  transform: scale(1.1);
}

.cell::before,
.cell::after {
  content: "";
  position: absolute;
  background-color: var(--border-color);
  z-index: 1;
}

.cell.top::before {
  width: var(--border-wh);
  height: var(--border-size);
  top: 0;
  left: 0;
}

.cell.right::after {
  width: var(--border-size);
  height: var(--border-wh);
  top: 0px;
  right: 0px;
}

span {
  font-size: xx-small;
}
span.right-hand::before,
span.left-hand::before,
span.bottom-hand::before,
span.top-hand::before,
span.to-left::after,
span.to-right::after,
span.to-top::after,
span.to-bottom::after {
  background: #f1f5f9;
}

#controls2 {
  position: absolute;
  top: 50%;
  left: 100px;
  transform: translate(-50%, -50%);
}

#win-modal {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  z-index: 10;
  background-color: rgba(14, 14, 14, 0.5);
}

#modal-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 10rem;
  width: 16rem;
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  padding: 1rem 1.5rem;
  border: 3px solid #1c2739;
  border-radius: 10px;
  background-color: #0ea5e9;
}
