.box-panel {
  margin: auto;
  width: 50%;
}

.detailed-box-title-row {
  width: 100%;
  padding: 0.5em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.detailed-box-title {
  font-size: 1.3em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
}

.detailed-box-back-button {
  color: #f47c57;
  font-size: 1.3em;
  text-align: right;
  flex-shrink: 0;
  padding-left: 1em;
}

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

.box-options a {
  display: block;
  padding: 9px;
  cursor: pointer;
}

.box-options form {
  display: flex;
}

.box-options form button {
  width: 100%;
  margin-top: 0;
  padding: 10px;
  cursor: pointer;
}

.box-container {
  padding: 0.5em;
  margin: 0.5em;
  border-radius: 20px;
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.box-title {
  font-size: 2em;
}

.box-description {
  font-size: 0.9em;
  padding: 0 0.5em 0.2em 0.5em;
  margin-top: 1em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  white-space: normal;
}

.idea-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.idea-box {
  background-color: #ffffff;
  width: 15em;
  min-height: 5em;
  border-radius: 20px;
  padding: 1em;
  margin: 0.5em;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transform-origin: center;
}

.idea-box:hover {
  transform: scale(1.03);
}

.scale-in {
  animation: scaleIn 0.5s ease-out;
}

.idea-name {
  font-weight: 600;
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: 2.6em;
  flex: 1 1 auto;
  word-break: break-word;
  max-width: 97%;
  margin-bottom: 0.3em;
}

.idea-remove-button {
  position: absolute;
  right: 0.5em;
  background: none;
  border: none;
  color: #f47c57;
  font-size: 1.3em;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.idea-remove-button:hover {
  color: #e2633f;
}

.idea-image {
  max-width: 100%;
  max-height: 10em;
  margin: 0.5em;
  object-fit: contain;
}

.product-wrapper {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.product-wrapper a {
  text-decoration: none;
}

.old-price {
  text-decoration: line-through;
  color: #88857f;
  font-size: 0.9em;
  border-bottom: none !important;
  box-shadow: none !important;
}

.discount {
  color: #e74c3c;
  font-weight: bold;
}

.login-container {
  padding: 0.5em;
  margin: 0.5em;
  text-align: center;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.ai-container {
  padding: 0.5em;
  margin: 0.5em;
  position: relative;
  border-radius: 20px;
  background: #ffffff;
}

#ai-glow {
  position: absolute;
  inset: -20px;
  z-index: -1;
}

#ai-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from var(--ai-glow-angle, 0deg),
      #8b5cf6,
      #f43f5e,
      #22d3ee,
      #a78bfa,
      #f472b6,
      #8b5cf6);
  filter: brightness(1) saturate(2);
  animation: aiGlowPulse 2s ease-in-out infinite alternate;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes aiGlowPulse {
  0% {
    opacity: 0.62;
    filter: blur(24px) brightness(1.2) saturate(1.8);
  }

  50% {
    opacity: 0.75;
    filter: blur(34px) brightness(1.5) saturate(2.4);
  }

  100% {
    opacity: 0.62;
    filter: blur(24px) brightness(1.2) saturate(1.8);
  }
}

@media screen and (max-width: 940px) {
  .box-panel {
    width: 100%;
  }

  .idea-box:hover {
    transform: none;
  }
}
