/* Floundermode Dictionary - Carousel & WOTD Styles */

/* Carousel Styles */
.carousel {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0.5rem;
}

@media (max-width: 768px) {
  .carousel {
    padding: 0 0.25rem;
    gap: 0.25rem;
  }
}

.carousel button {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  border: 2px solid #000;
  background: #fff200;
  color: #000;
  font-weight: bold;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  border-radius: 12px;
  font-family: "Roboto Mono", monospace;
  white-space: nowrap;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .carousel button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

.carousel button:hover {
  background: #d97706;
  transform: translateY(-2px);
}

.carousel button:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 #000;
}

/* WOTD Title - Static font size */
.wotd-title {
  text-align: center;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  font-size: 1.2rem !important; /* Static size, not responsive */
  line-height: 1.2;
}

/* Speech Bubble & WOTD Styles */
.speech-bubble {
  position: absolute;
  background: white;
  border: 3px solid #000;
  border-radius: 15px;
  min-height: 120px;
  width: 340px !important; /* Static width, not responsive */
  max-width: 340px !important; /* Static max-width */
  top: -12rem;
  left: 3rem;
  padding: .75rem;
  opacity: 1;
  transition: opacity 0.25s ease, height 0.3s ease, background-color 0.8s ease, color 0.8s ease, border-color 0.8s ease;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #000;
  box-shadow: 4px 4px 0 #000;
  word-wrap: break-word;
  hyphens: auto;
}

@media (max-width: 768px) {
  .speech-bubble {
    left: 1rem;
    top: -10rem;
  }
}

/* Tail shadow (behind) */
.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -74px;
  right: 58px;
  width: 0;
  height: 0;
  border-left: 24px solid transparent;
  border-right: 24px solid transparent;
  border-top: 74px solid #000;
  z-index: 1;
}

/* Tail main (front) */
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -70px;
  right: 66px;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 70px solid white;
  z-index: 2;
  transition: border-top-color 0.8s ease;
}

/* WOTD Term Styling */
.wotd-term {
  background: #000;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 0px;
  font-weight: bold;
  font-size: 1rem;
  display: block;
  margin: 0 auto 0.5rem auto;
  text-align: center;
  width: fit-content;
}

/* Carter's Running Animation */
@keyframes carterRun {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(calc(100vw + 300px));
  }
  51% {
    transform: translateX(calc(-100vw - 300px));
  }
  100% {
    transform: translateX(0);
  }
}

.wotd-container.running {
  animation: carterRun 2s ease-in-out;
  z-index: 9999;
}

/* Prevent scrollbars during Carter's run */
body.carter-running {
  overflow-x: hidden;
}

.wotd-container {
  position: fixed;
  bottom: -0.5rem;
  left: -0.25rem;
  transition: bottom 0.25s ease;
}

.wotd-container img {
  height: 25rem;
}

.wotd-container.hide {
  bottom: -234px;
}

.wotd-container.hide .speech-bubble {
  opacity: 0;
  pointer-events: none;
}

/* Thought Bubble for Mobile WOTD Teaser */
.thought-bubble {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: white;
  border: 2px solid #000;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: bold;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  z-index: 50;
  user-select: none;
}

.thought-bubble:hover {
  background: #ffe680;
  transform: translateY(-2px);
}

.thought-bubble:active {
  transform: translateY(0);
}

/* Keep thought bubble visible but change appearance when fish is shown */
.wotd-container:not(.hide) ~ .thought-bubble {
  background: #ffcccc;
  border-color: #ff4444;
}

/* Mobile-specific thought bubble adjustments */
@media (max-width: 768px) {
  .thought-bubble {
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .thought-bubble {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Dark Mode Styles for Carousel & WOTD */
body.dark-mode .speech-bubble {
  background: #333;
  color: #f5f5f5;
  border: 3px solid #555;
}

body.dark-mode .speech-bubble::after {
  border-top-color: #333;
}

body.dark-mode .wotd-term {
  background: #ffe680;
  color: #000;
}

/* Dark mode thought bubble */
body.dark-mode .thought-bubble {
  background: #333;
  color: #f5f5f5;
  border: 2px solid #555;
  box-shadow: 3px 3px 0 #555;
}

body.dark-mode .thought-bubble:hover {
  background: #444;
}

/* Dark mode dismissal state */
body.dark-mode .wotd-container:not(.hide) ~ .thought-bubble {
  background: #663333;
  border-color: #aa5555;
}
