.space-grotesk-normal {
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.space-grotesk-bold {
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

* {
  font-family: "Space Grotesk", sans-serif;
}

body {
  background-color: #FFF8E9 !important;
}

p {
  margin: 0;
}

hr {
  border: 1px solid #e5e5e5 !important;
  margin: 2rem 0 !important;
}

ul, ol {
  margin: 1em 0 1em 2em;  /* reasonable spacing and indentation */
  padding-left: 1.5em;
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: 0.5em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Header row */
table thead th {
  background-color: #4CAF50;
  color: white;
  padding: 0.75em;
  text-align: left;
  font-size: 1em;
  border-bottom: 2px solid #3e8e41;
}

/* Body cells */
table tbody td {
  padding: 0.75em;
  border: 1px solid #ddd;
  font-size: 0.95em;
}

/* Optional caption styling */
table caption {
  caption-side: bottom;
  text-align: right;
  padding: 0.5em;
  font-style: italic;
  color: #555;
}

.main-content {
  width: 100%;
}

.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    display: block;
    width: 30%;
  }

  .main-content {
    width: 70%;
  }
}

.primary-btn, .secondary-btn {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 8px 24px;
  border: 1px solid #030303;
  border-radius: 100px;
}

.primary-btn {
  background-color: #030303;
  color: #fff;
}

.primary-btn:hover {
  background-color: #fff;
  color: #030303;
}

.secondary-btn {
  background: rgb(255, 255, 255);
}

.secondary-btn:hover {
  background-color: #f3f3f3;
}

.secondary-btn:disabled {
  opacity: 0.5;
}

/* TEST YOUR KNOWLEDGE GRID */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.knowledge-card {
  position: relative;
  perspective: 1000px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  isolation: isolate;
  /* max-width: 183.25px; */
  max-width: 350px;
  height: 288px;
  background: inherit;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  flex: none;
  order: 0;
  flex-grow: 1;
  z-index: 0;
  text-align: center;
}

.knowledge-card .corner-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 37.51px;
  height: 37.51px;
  background:
    linear-gradient(135deg, #FFE6AD 0%, #ebce8d 20%, #784716 50%, transparent 40%),
    #ffffff;
  border-radius: 8px 0px 8px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0;
  margin-right: 0;
}

.knowledge-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
  cursor: pointer;
}

/* --- FLIP CARD ANIMATION --- */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(.4, 2, .6, 1);
  transform-style: preserve-3d;
}

.knowledge-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-front {
  background: #FFE6AD;
}

.card-back {
  background: #fff;
  color: #222;
  transform: rotateY(180deg);
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid #e5e7eb;
}

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.knowledge-card.shake {
  animation: shake 0.5s;
}

@media (min-width: 1024px) and (max-width: 1300px) {
  .knowledge-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }

  .content-class {
    margin-left: 1.5rem; /* lg:mx-50 */
    margin-right: 1.5rem;
  }
}

.content-class {
  display: flex;
  flex-direction: row;
  gap: 2.5rem; /* gap-10 */
  margin-top: 2.5rem; /* my-10 */
  margin-bottom: 2.5rem;
  margin-left: 2.5rem; /* mx-10 */
  margin-right: 2.5rem;
}

@media (min-width: 768px) {
  .content-class {
    margin-left: 6.25rem; /* md:mx-25 */
    margin-right: 6.25rem;
  }
}

@media (min-width: 1300px) {
  .content-class {
    margin-left: 12.5rem; /* lg:mx-50 */
    margin-right: 12.5rem;
  }
}

#list-of {
  font-size: 3rem;
  font-weight: bold;
}

#frase-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px; /* vertical and horizontal gap between words */
  align-items: center;
  justify-content: center;
  padding: 12px 0;
}

.letter-row {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  margin-right: 0;
}

.letter-square {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(3, 3, 3, 1);
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  background: rgba(251, 249, 245, 1);
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  transition: background 0.2s;
}

.letter-square.revealed {
  background: #d2f8d2;
  color: #222;
}

.letter-square.space {
  border: none;
  background: transparent;
  cursor: default;
}

#anagram-squares {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px; /* or match #anagram-letters */
  align-items: center;
  justify-content: center;
  padding: 12px 0;
}

.frase-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  background-color: white;
  padding: 2rem;
  border-radius: 0.25rem;
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.primary-btn:disabled {
  opacity: 0.5 !important;
  pointer-events: none;
}

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

  .knowledge-card {
    height: 320px;
  }

  #list-of {
    font-size: 2rem !important;
  }

  .frase-container {
    padding: 1rem;
    width: screen;
  }

  .letter-square {
    width: 28px;
    height: 28px;
  }
}

