body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to bottom right, #ffecb3, #ffe0b2);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

#game-container {
  max-width: 520px;
  width: 95%;
  margin: 20px auto;
  padding: 20px;
  background: #fff8e1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  text-align: center;
  border: 4px solid #ffb300;
}

/* Branding Header */
#branding {
  display: flex;
  align-items: center;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
}

#logo {
  height: 40px; /* Keeps the logo size reasonable */
  width: auto;  /* Maintains aspect ratio */
  margin-right: 10px;
}

#name {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}


h1 {
  font-size: 26px;
  margin-bottom: 15px;
  color: #ef6c00;
  font-weight: 800;
  text-shadow: 1px 1px 2px #fff3e0;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: bold;
  color: #ff6f00;
  font-size: 16px;
}

#word-list {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.word {
  background-color: #ffe082;
  color: #5d4037;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
}

#grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 5px;
  justify-content: center;
  margin-bottom: 10px;
}

#grid.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.cell {
  width: 100%;
  padding-top: 100%;
  position: relative;
  background-color: #fff3e0;
  color: #3e2723;
  font-weight: bold;
  border-radius: 8px;
  user-select: none;
  border: 2px solid #ffb74d;
  transition: transform 0.2s;
}

.cell:hover {
  transform: scale(1.1);
}

.cell::after {
  content: attr(data-letter);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
}

.cell.selected {
  background-color: #ffcc80;
}

.cell.found {
  background-color: #81c784;
  color: white;
  font-weight: bold;
}

#status {
  margin-top: 12px;
  font-size: 16px;
  color: #6d4c41;
  min-height: 24px;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

button {
  padding: 10px 18px;
  font-size: 16px;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

#start-button {
  background-color: #43a047;
}

#start-button:hover {
  background-color: #2e7d32;
}

#reveal-button {
  background-color: #f4511e;
}

#reveal-button:hover {
  background-color: #bf360c;
}

#reset-button {
  background-color: #039be5;
}

#reset-button:hover {
  background-color: #0277bd;
}


 


#next-activity-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4081;
  color: white;
  padding: 6px 12px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.8rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition:  transform 0.2s ease;
}

#next-activity-button:hover {
  background: #e73370;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .match-container {
    flex-direction: column;
    align-items: center;
  }

  .column {
    min-width: 90%;
    padding: 0.5rem;
  }

  .word-box,
  .definition-box {
    font-size: 1rem;
    padding: 1rem;
  }

  header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .nav-button {
    margin-top: 0.5rem;
  }

  button {
    width: 100%;
    max-width: 300px;
  }
}

