/* Main container */
main {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 24px;
  font-family: 'Play', sans-serif;
  color: #f0f0f0;
}

/* Remove underline from all links and add color transition */
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: #81a1ff;
}

/* Search bar styling */
.search-container {
  margin: 90px auto 40px; /* clears fixed navbar height */
  max-width: 420px;
  text-align: center;
}

#searchInput {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.1rem;
  border: 2px solid #4c6ef5;
  border-radius: 40px;
  outline: none;
  background: rgba(255,255,255,0.30);
  color: #1e1e2f;
  box-shadow: 0 4px 18px rgba(31, 38, 135, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#searchInput:focus {
  border-color: #81a1ff;
  box-shadow: 0 0 10px #81a1ff;
  background: rgba(255,255,255,0.60);
}

/* Categories grid with responsive columns */
.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .categories {
    grid-template-columns: 1fr;
  }
}

/* Uniform sized category cards */
.category-card {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 24px 4px rgba(31, 38, 135, 0.1);
  border-radius: 18px;
  padding: 32px 24px;
  color: #e0e0e0;
  cursor: pointer;
  transition: box-shadow 0.32s cubic-bezier(.6,.3,.3,.9), transform 0.32s cubic-bezier(.6,.3,.3,.9), background 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 240px;
  min-width: 0;
  box-sizing: border-box;
  border: 1.5px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  overflow: hidden;
}

.category-card:hover {
  box-shadow: 0 8px 40px 0 rgba(81, 140, 255, 0.23);
  transform: translateY(-7px) scale(1.02);
  background: rgba(255,255,255,0.21);
}

.category-icon {
  font-size: 2.4rem;
  color: #4c6ef5;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
  line-height: 1;
}

/* Ensure long text wraps and stays in box */
.category-title {
  font-family: 'Fredoka One', cursive, sans-serif;
  font-size: 1.15rem;
  margin-bottom: 12px;
  text-align: center;
  color: #b6cafc;
  word-break: break-word;
  line-height: 1.15;
  white-space: normal;
  max-height: 2.4em;
  overflow: hidden;
}

.category-desc {
  font-size: 1.06rem;
  line-height: 1.38;
  color: #e0e6f7;
  text-align: center;
  flex-grow: 1;
  word-break: break-word;
  white-space: normal;
  max-height: 5em;
  overflow: hidden;
  margin: 0;
}

/* Body background and base colors */
body {
  background: linear-gradient(135deg, #2233aa, #3d4ad6);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
