@import url("/assets/css/style.css");

#word-cloud {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  margin-top: 20px;
}

#word-cloud svg {
  display: block;
  margin: 0 auto;
}

#word-cloud text {
  cursor: pointer;
  transition: transform 0.2s ease;
}

#word-cloud text:hover {
  transform: scale(1.2);
}

#word-cloud line {
  stroke-dasharray: 4;
  opacity: 0.8;
}

.word-cloud-container {
  position: relative;
  text-align: center;
  margin: 50px auto;
  width: 100%;
  height: 600px;
  /* border: 1px solid #ecf0f1; */
  /* border-radius: 10px; */
  overflow: hidden;
  /* background: #f8f9fa; */
}

.main-word-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  background: #ffffff;
  border: 3px solid #f1f1f174;
  padding: 20px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  min-height: 120px;
  max-width: 90vw;
  max-height: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.related-words-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

#relation-canvas {
  width: 100%;
  height: 100%;
  border: none;
}

.synonyms-antonyms-section {
  text-align: center;
  margin: 40px 0;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 10px;
}

.word-list {
  list-style-type: none;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 36px;
}

.word-list li {
  margin: 5px 0;
  background: var(--primary-blue);
  color: white;
  padding: 8px 18px;
  border-radius: 22px;
  border: none;
  font-size: 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.08);
  outline: none;
  position: relative;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.main-word {
  font-size: 5rem;
  font-weight: bold;
  color: #2c3e50;
  margin: 0 0 15px 0;
  /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); */
}

.word-attributes {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.attribute-tag {
  background: #3498db;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  cursor: help;
  transition: all 0.3s ease;
}

.relation-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.synonyms-antonyms-section h2 {
  color: #2c3e50;
  margin-bottom: 15px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
}

.word-list li:hover {
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  color: #fff;
  transform: translateY(-2px) scale(1.07);
  box-shadow: 0 6px 18px rgba(52, 152, 219, 0.13);
  z-index: 2;
}

.synonyms-antonyms-flex {
  display: flex !important;
  gap: 40px;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.relation-box {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 24px 28px;
  min-width: 260px;
  max-width: 350px;
  flex: 1 1 300px;
  transition: box-shadow 0.3s;
  border: 1.5px solid #e3eaf3;
  position: relative;
}
.relation-box:hover {
  box-shadow: 0 8px 32px rgba(52, 152, 219, 0.18),
    0 2px 8px rgba(44, 62, 80, 0.1);
  /* border-color: #3498db; */
}

.relation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.relation-header h2 {
  color: #2c3e50;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
}
.relation-icon {
  font-size: 2.1rem;
  color: #3498db;
  filter: drop-shadow(0 2px 4px rgba(52, 152, 219, 0.1));
}

@media (max-width: 900px) {
  .synonyms-antonyms-flex {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }
  .relation-box {
    max-width: 100%;
    min-width: 0;
  }
}
