* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: #121212; /* Dark background for better contrast */
}

main {
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.item {
  width: 200px;
  height: 300px;
  list-style-type: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background-position: center;
  background-size: cover;
  border-radius: 20px;
  box-shadow: 0 20px 30px rgba(255,255,255,0.3) inset;
  transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;
}

.item:nth-child(1), .item:nth-child(2) {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
}

.item:nth-child(3) { left: 50%; }
.item:nth-child(4) { left: calc(50% + 220px); }
.item:nth-child(5) { left: calc(50% + 440px); }
.item:nth-child(6) { left: calc(50% + 660px); opacity: 0; }

.content {
  width: min(30vw, 400px);
  position: absolute;
  top: 50%;
  left: 3rem;
  transform: translateY(-50%);
  font: 400 0.85rem helvetica, sans-serif;
  color: white;
  text-shadow: 0 3px 8px rgba(0,0,0,0.5);
  opacity: 0;
  display: none;
}

.content .title {
  font-family: 'Arial Black', sans-serif;
  text-transform: uppercase;
}

.content .description {
  line-height: 1.7;
  margin: 1rem 0 1.5rem;
  font-size: 0.8rem;
}

/* Updated link styling */
.content .description a {
  color: lightyellow;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap; /* Prevents line breaking */
}

.content .description a:hover {
  text-decoration: underline;
}

.content button {
  width: fit-content;
  background-color: rgba(0, 0, 0, 0.1);
  color: white;
  border: 2px solid white;
  border-radius: 0.25rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.3s;
}

.content button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.content .increased-font {
  font-size: 20px;
}

.item:nth-of-type(2) .content {
  display: block;
  animation: show 0.75s ease-in-out 0.3s forwards;
}

@keyframes show {
  0% {
    filter: blur(5px);
    transform: translateY(calc(-50% + 75px));
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

/* Updated arrow key navigation */
.arrow-key-container {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
  border-radius: 8px;
}

.arrow-key {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  font-size: 1.8rem;
  font-weight: bold;
  color: black;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.arrow-key:active, .arrow-key.press {
  transform: scale(0.9);
  box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.4);
}

.arrow-key:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Arrow icons */
.arrow-key.left:before { content: "←"; }
.arrow-key.right:before { content: "→"; }

/* Responsive Design */
@media (width > 650px) and (width < 900px) {
  .content .title { font-size: 1rem; }
  .content .description { font-size: 0.7rem; }
  .content button { font-size: 0.7rem; }
}

@media (width < 650px) {
  .content .title { font-size: 0.9rem; }
  .content .description { font-size: 0.65rem; }
  .content button { font-size: 0.7rem; }
}
