/* Reset and font */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

/* Center div */
.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  height: 100%;
  text-align: center;
}

/* Responsive text */
h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 600;
}

.link-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  width: min(860px, 100%);
  margin-top: 2rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.15rem;
  border-radius: 0;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-4px);
}

.link-icon {
  width: 76px;
  height: 76px;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background-color: rgba(72, 145, 240, 0.06);
  overflow: hidden;
}

.link-icon img {
  max-width: 60%;
  max-height: 60%;
  display: block;
}

.link-label {
  font-size: 0.96rem;
  font-weight: 600;
}

/* Animation */
.fade-in {
  animation: fadeZoom 1.5s ease forwards;
  opacity: 0;
  transform: scale(0.95);
}

@keyframes fadeZoom {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Light mode */
body {
  background-color: #ffffff;
  color: #000000;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #ffffff;
  }
}

@media (max-width: 600px) {
  .container {
    gap: 1.2rem;
    padding: 1.2rem 0.5rem;
    min-height: 100vh;
  }
}

@media (max-width: 600px) {
  .link-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
    margin-top: 1.2rem;
    width: 100%;
  }
  .container {
    min-height: 100dvh;
    height: auto;
    justify-content: flex-start;
  }
  h1 {
    font-size: 2rem;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
  }
  .link-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .link-label {
    word-break: break-word;
  }
}

@media (max-width: 600px) {
  .link-card {
    padding: 0.7rem;
    gap: 0.5rem;
  }
}

@media (max-width: 600px) {
  .link-icon {
    width: 54px;
    height: 54px;
    border-radius: 0.7rem;
  }
}

@media (max-width: 600px) {
  .link-label {
    font-size: 0.88rem;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }
}
