.text-center {
  text-align: center;
}

.word-cloud-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.word-cloud-card {
  width: 100%;
  max-width: 800px;
  padding: 60px; /* Increased padding for better visual frame */
  border: 1px solid #c0c0c0; /* Thinner outer border */
  border-radius: 10px;
  /* Removed drop shadow */
  background-color: #f8f9fa;
  margin: 20px auto; /* Center the card and add margin */
  box-sizing: border-box; /* Ensure padding is included in width calculation */
}

.word-cloud-title {
  font-weight: bold;
  font-size: 1.2em;
  text-align: center;
  text-decoration: underline;
  margin-bottom: 15px;
}

#word-cloud-canvas-hover-box {
  pointer-events: none;
  position: absolute;
  box-shadow: 0 0 200px 200px rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  border-style: solid;
  cursor: pointer;
}

.word-cloud-item {
  transition: transform 0.3s ease, opacity 0.3s ease !important;
  -webkit-transition: transform 0.3s ease, opacity 0.3s ease !important;
  -ms-transition: transform 0.3s ease, opacity 0.3s ease !important;
  cursor: pointer !important;
  transform: scale(1) !important;
  display: inline-block !important;
}

.word-cloud-item:hover {
  transform: scale(1.15) !important;
  opacity: 0.9 !important;
}

#word-cloud-html {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: transparent;
}

/* Responsive adjustments for word cloud container */
@media (max-width: 768px) {
  .word-cloud-card {
    padding: 20px !important; /* Reduce padding on mobile */
    margin: 10px 10px !important; /* Add horizontal margin to prevent overflow */
    width: calc(100% - 20px) !important; /* Account for margins */
    max-width: calc(100% - 20px) !important;
  }
  
  #word-cloud-html {
    min-height: 300px; /* Smaller height on mobile */
  }
  
  .word-cloud-title {
    font-size: 1.1em !important; /* Slightly smaller title on mobile */
  }
}

@media (max-width: 480px) {
  .word-cloud-card {
    padding: 15px !important; /* Even less padding on phones */
    margin: 10px 10px !important; /* Add horizontal margin to prevent overflow */
    width: calc(100% - 20px) !important; /* Account for margins */
    max-width: calc(100% - 20px) !important;
    border-radius: 6px !important;
  }
  
  #word-cloud-html {
    min-height: 250px; /* Even smaller on phones */
  }
  
  .word-cloud-title {
    font-size: 1.0em !important; /* Smaller title on phones */
    margin-bottom: 10px !important;
  }
}

.button-3 {
  appearance: none;
  background-color: #2ea44f;
  border: 1px solid rgba(27, 31, 35, .15);
  border-radius: 6px;
  box-shadow: rgba(27, 31, 35, .1) 0 1px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: -apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 6px 16px;
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  white-space: nowrap;
  margin-bottom: 15px;
}

.button-3:focus:not(:focus-visible):not(.focus-visible) {
  box-shadow: none;
  outline: none;
}

.button-3:hover {
  background-color: #2c974b;
}

.button-3:focus {
  box-shadow: rgba(46, 164, 79, .4) 0 0 0 3px;
  outline: none;
}

.button-3:disabled {
  background-color: #94d3a2;
  border-color: rgba(27, 31, 35, .1);
  color: rgba(255, 255, 255, .8);
  cursor: default;
}

.button-3:active {
  background-color: #298e46;
  box-shadow: rgba(20, 70, 32, .2) 0 1px 0 inset;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .word-cloud-container {
    flex-direction: column;
  }
  
  #word-cloud-html {
    width: 100% !important;
    height: 300px !important;
  }
} 