/* OutOfPointsModal.css */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.out-of-points-modal {
  background: white;
  border-radius: 20px;
  padding: 30px 40px;
  max-width: 700px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

.out-of-points-modal::before {
  content: '';
  width: 110%;
  height: 42%;
  top: -10%;
  left: 0;
  position: absolute;
  background: url('/penci_resources/icons/background_bubble.png') no-repeat center;
  background-size: contain;
}

.bubble:nth-child(1) {
  width: 26% !important;
  bottom: 0;
  left: 5%;
  animation-duration: 8s;
  animation-delay: 0s;
}

.bubble:nth-child(2) {
  width: 36% !important;
  bottom: 0;
  left: 20%;
  animation-duration: 6s;
  animation-delay: 2s;
}

.bubble:nth-child(3) {
  width: 26% !important;
  bottom: 0;
  left: 35%;
  animation-duration: 9s;
  animation-delay: 3s;
}

.bubble:nth-child(4) {
  width: 40% !important;
  bottom: 0;
  left: 50%;
  animation-duration: 7s;
  animation-delay: 2s;
}

.bubble:nth-child(5) {
  width: 32% !important;
  bottom: 0;
  left: 100%;
  animation-duration: 6s;
  animation-delay: 3s;
}

.bubble:nth-child(6) {
  width: 26% !important;
  bottom: 0;
  left: 80%;
  animation-duration: 8s;
  animation-delay: 4s;
}

.bubble:nth-child(7) {
  width: 16% !important;
  bottom: 0;
  left: 70%;
  animation-duration: 7s;
  animation-delay: 3s;

}

.bubble:nth-child(8) {
  width: 32% !important;
  bottom: 0;
  left: 30%;
  animation-duration: 8s;
  animation-delay: 2s;
  /* animation-direction: alternate;
    animation-timing-function: linear;
    animation-iteration-count: infinite; */
}

.bubble:nth-child(9) {
  width: 46% !important;
  bottom: 0;
  left: 45%;
  animation-duration: 7s;
  animation-delay: 3s;
  /* animation-direction: alternate;
    animation-timing-function: linear;
    animation-iteration-count: infinite; */
}

.bubble:nth-child(10) {
  width: 20% !important;
  bottom: 0;
  left: 100%;
  animation-duration: 7s;
  animation-delay: 1s;
  /* animation-direction: alternate;
    animation-timing-function: linear;
    animation-iteration-count: infinite; */
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

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

.close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.2s;
  border: 1px solid #f1f1f1;
  z-index: 99999;
}

.close-btn:hover {
  background-color: #f5f5f5;
}

/* Character Section */
.character-section {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  height: 90px;
}

.character-container-modal {
  position: relative;
  display: inline-block;
}

.character {
  position: relative;
  z-index: 2;
}

.character-body {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-60%);
}

.character-head img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.character-cloud img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.character-head {
  width: 320px;
  position: relative;
  z-index: 2;
}

.character-cloud {
  position: absolute;
  top: 30px;
  left: 45%;
  width: 280px;
  z-index: 1;
}


/* Bubbles */
.out-of-points-modal .bubble img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.out-of-points-modal .bubble {
  position: absolute;
  border-radius: 50%;
  height: auto !important;
  animation: floatBubble .3s linear infinite;
  opacity: 0;
}

.out-of-points-modal .bubble-1 {
  width: 20% !important;
  animation-duration: 4s;
}

.out-of-points-modal .bubble-2 {
  width: 10% !important;
  animation-duration: 3s;
}

.out-of-points-modal .bubble-3 {
  width: 12% !important;
  animation-duration: 5s;
}

.out-of-points-modal .bubble-4 {
  width: 18% !important;
  animation-duration: 2.5s;
}

.out-of-points-modal .bubble-5 {
  width: 20% !important;
  left: 90% !important;
  animation-duration: 3.5s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatBubble {
  0% {
    transform: translateY(65vh) translateX(-50%) rotate(0deg);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  90% {
    opacity: 1;

  }

  100% {
    transform: translateY(-65vh) translateX(-50%) rotate(360deg);
    opacity: 0;
  }
}

/* Content Styles */
.modal-overlay .modal-content {
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-shadow: none !important;
}

.modal-title {
  font-size: 30px;
  font-weight: 600;
  color: #07A7CC;
  margin-bottom: 0px;
  line-height: normal;
  margin-bottom: 20px;
}

.modal-subtitle {
  font-size: 18px;
  color: #5E6278;
  line-height: 1.4;
  border-top: 1px solid #eee;
  margin-bottom: 20px;
}

.info-section {
  text-align: left;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  font-size: 20px;
  line-height: normal;
  color: #5E6278;
  font-weight: 400;
}

.info-dot {
  width: 10px;
  height: 10px;
  background: #07A7CC;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

/* .bonus-text {
  color: #ff6b6b;
  font-weight: 600;
} */

.highlight-text {
  color: #07A7CC;
  font-weight: 600;
}

/* Copy Section */
.copy-section {
  margin-top: 20px;
}

.copy-container {
  display: flex;
  align-items: center;
  /* background: #fff; */
  border-radius: 500px;
  padding: 4px;
  border: 1px solid #C4C4C7;
}

.copy-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 20px;
  outline: none;
  color: #07A7CC;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

.copy-btn {
  border: none;
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
}

.copy-btn:hover {
  background: #4a9bc7;
}

.copy-btn:hover svg path {
  fill: white;
}

.copy-btn svg {
  fill: white;
}

/* Animation shake nhẹ cho character */
.character-head {
  animation: gentleShake 2s ease-in-out infinite;
  transform-origin: center bottom;
}

.character-head img {
  width: 100%;
  height: auto;
  display: block;
}

/* Keyframes cho shake nhẹ */
@keyframes gentleShake {

  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  10% {
    transform: translateX(-2px) rotate(-1deg);
  }

  20% {
    transform: translateX(2px) rotate(1deg);
  }

  30% {
    transform: translateX(-1px) rotate(-0.5deg);
  }

  40% {
    transform: translateX(1px) rotate(0.5deg);
  }

  50% {
    transform: translateX(0) rotate(0deg);
  }

  60% {
    transform: translateX(-1px) rotate(-0.5deg);
  }

  70% {
    transform: translateX(1px) rotate(0.5deg);
  }

  80% {
    transform: translateX(-2px) rotate(-1deg);
  }

  90% {
    transform: translateX(2px) rotate(1deg);
  }
}

/* Animation cho cloud cũng shake nhẹ */
.character-cloud {
  animation: cloudFloat 3s ease-in-out infinite;
  animation-delay: 0.5s;
}

@keyframes cloudFloat {

  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }

  25% {
    transform: translateY(-3px) translateX(-1px);
  }

  50% {
    transform: translateY(-5px) translateX(1px);
  }

  75% {
    transform: translateY(-3px) translateX(-1px);
  }
}


/* Animation cho bubbles */
/* .bubble {
  animation: bubbleFloat 4s ease-in-out infinite;
} */

.bubble-1 {
  animation-delay: 0s;
}

.bubble-2 {
  animation-delay: 0.8s;
}

.bubble-3 {
  animation-delay: 1.6s;
}

.bubble-4 {
  animation-delay: 2.4s;
}

.bubble-5 {
  animation-delay: 3.2s;
}



/* Hover effect cho character - shake mạnh hơn */
.character-head:hover {
  animation: strongShake 0.5s ease-in-out;
}

@keyframes strongShake {

  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  10% {
    transform: translateX(-5px) rotate(-2deg);
  }

  20% {
    transform: translateX(5px) rotate(2deg);
  }

  30% {
    transform: translateX(-4px) rotate(-1.5deg);
  }

  40% {
    transform: translateX(4px) rotate(1.5deg);
  }

  50% {
    transform: translateX(-3px) rotate(-1deg);
  }

  60% {
    transform: translateX(3px) rotate(1deg);
  }

  70% {
    transform: translateX(-2px) rotate(-0.5deg);
  }

  80% {
    transform: translateX(2px) rotate(0.5deg);
  }

  90% {
    transform: translateX(-1px) rotate(-0.2deg);
  }
}

/* Animation cho modal xuất hiện */
.out-of-points-modal {
  animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }

  50% {
    opacity: 0.8;
    transform: translateY(-10px) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation cho close button */
.close-btn {
  transition: all 0.3s ease;
}

.close-btn:hover {
  transform: rotate(90deg) scale(1.1);
  background-color: rgba(107, 211, 255, 0.1);
}

/* Animation cho copy button */
.copy-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.copy-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(45deg, #5db8e8, #4a9bc7);
}

.copy-btn:active {
  transform: scale(0.95);
}

/* Ripple effect cho copy button */
.copy-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.copy-btn:active::after {
  width: 300px;
  height: 300px;
}

/* Text animations */
.modal-title {
  animation: textSlideIn 0.6s ease-out 0.2s both;
}

.modal-subtitle {
  animation: textSlideIn 0.6s ease-out 0.4s both;
}

.info-section {
  animation: textSlideIn 0.6s ease-out 0.6s both;
}

.copy-section {
  animation: textSlideIn 0.6s ease-out 0.8s both;
}

@keyframes textSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Breathing animation cho info dots */
.info-dot {
  animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Subtle pulse cho highlighted text */
.bonus-text,
.highlight-text {
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {

  .character-section {
    height: 55px;
  }

  .character-body {
    top: -110px;
    left: 50%;
    transform: translateX(-70%);
  }

  .character-head {
    animation-duration: 1.5s;
    width: 230px;
  }

  .character-cloud {
    width: 200px;
    top: 20px;
    left: 50%;
  }

  .out-of-points-modal::before {
    width: 100%;
    background-size: contain;
  }

  @keyframes gentleShake {

    0%,
    100% {
      transform: translateX(0) rotate(0deg);
    }

    25% {
      transform: translateX(-1px) rotate(-0.5deg);
    }

    50% {
      transform: translateX(0) rotate(0deg);
    }

    75% {
      transform: translateX(1px) rotate(0.5deg);
    }
  }
}

/* Performance optimization */
.character-head,
.character-cloud,
.bubble {
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Responsive */
@media (max-width: 768px) {
  .out-of-points-modal {
    padding: 20px;
    margin: 20px;
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-subtitle {
    font-size: 16px;
  }

  .info-item {
    font-size: 16px;
  }

  .copy-input {
    font-size: 14px;
  }
}

.points-display {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
}



.points-badge {
  background: linear-gradient(135deg, #4a4a4a 0%, #5a5a5a 50%, #4a4a4a 100%);
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* OutOfPointsModal.css */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999999;
  backdrop-filter: blur(4px);
}

.out-of-points-modal {
  background: white;
  border-radius: 20px;
  padding: 30px 40px;
  max-width: 700px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

.out-of-points-modal::before {
  content: '';
  width: 800px;
  height: 200px;
  top: -10%;
  left: 0;
  position: absolute;
  background: url('/images/page_tool_ai/background_bubble.png') no-repeat center;
  background-size: cover;
}

#outOfPointsModal .bubble:nth-child(1) {
  width: 26% !important;
  bottom: 0;
  left: 5%;
  animation-duration: 8s;
  animation-delay: 0s;
}

#outOfPointsModal .bubble:nth-child(2) {
  width: 36% !important;
  bottom: 0;
  left: 20%;
  animation-duration: 6s;
  animation-delay: 2s;
}

#outOfPointsModal .bubble:nth-child(3) {
  width: 26% !important;
  bottom: 0;
  left: 35%;
  animation-duration: 9s;
  animation-delay: 3s;
}

#outOfPointsModal .bubble:nth-child(4) {
  width: 40% !important;
  bottom: 0;
  left: 50%;
  animation-duration: 7s;
  animation-delay: 2s;
}

#outOfPointsModal .bubble:nth-child(5) {
  width: 32% !important;
  bottom: 0;
  left: 100%;
  animation-duration: 6s;
  animation-delay: 3s;
}

#outOfPointsModal .bubble:nth-child(6) {
  width: 26% !important;
  bottom: 0;
  left: 80%;
  animation-duration: 8s;
  animation-delay: 4s;
}

#outOfPointsModal .bubble:nth-child(7) {
  width: 16% !important;
  bottom: 0;
  left: 70%;
  animation-duration: 7s;
  animation-delay: 3s;

}

#outOfPointsModal .bubble:nth-child(8) {
  width: 32% !important;
  bottom: 0;
  left: 30%;
  animation-duration: 8s;
  animation-delay: 2s;
  /* animation-direction: alternate;
    animation-timing-function: linear;
    animation-iteration-count: infinite; */
}

#outOfPointsModal .bubble:nth-child(9) {
  width: 46% !important;
  bottom: 0;
  left: 45%;
  animation-duration: 7s;
  animation-delay: 3s;
  /* animation-direction: alternate;
    animation-timing-function: linear;
    animation-iteration-count: infinite; */
}

#outOfPointsModal .bubble:nth-child(10) {
  width: 20% !important;
  bottom: 0;
  left: 100%;
  animation-duration: 7s;
  animation-delay: 1s;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

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

.close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.2s;
  border: 1px solid #f1f1f1;
  z-index: 99999;
}

.close-btn:hover {
  background-color: #f5f5f5;
}

/* Character Section */
.character-section {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  height: 90px;
}

.character-container-modal {
  position: relative;
  display: inline-block;
}

.character {
  position: relative;
  z-index: 2;
}

.character-body {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-60%);
}

.character-head img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.character-cloud img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.character-head {
  width: 320px;
  position: relative;
  z-index: 2;
}

.character-cloud {
  position: absolute;
  top: 30px;
  left: 45%;
  width: 280px;
  z-index: 1;
}


/* Bubbles */
.out-of-points-modal .bubble img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.out-of-points-modal .bubble {
  position: absolute;
  border-radius: 50%;
  height: auto !important;
  animation: floatBubble .3s linear infinite;
  opacity: 0;
}

.out-of-points-modal .bubble-1 {
  width: 20% !important;
  animation-duration: 4s;
}

.out-of-points-modal .bubble-2 {
  width: 10% !important;
  animation-duration: 3s;
}

.out-of-points-modal .bubble-3 {
  width: 12% !important;
  animation-duration: 5s;
}

.out-of-points-modal .bubble-4 {
  width: 18% !important;
  animation-duration: 2.5s;
}

.out-of-points-modal .bubble-5 {
  width: 20% !important;
  left: 90% !important;
  animation-duration: 3.5s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatBubble {
  0% {
    transform: translateY(65vh) translateX(-50%) rotate(0deg);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  90% {
    opacity: 1;

  }

  100% {
    transform: translateY(-65vh) translateX(-50%) rotate(360deg);
    opacity: 0;
  }
}



/* Content Styles */
.modal-content {
  text-align: center;
}

.modal-title {
  font-size: 30px;
  font-weight: 600;
  color: #07A7CC;
  margin-bottom: 0px;
  line-height: normal;
  margin-bottom: 20px;
}

.modal-subtitle {
  font-size: 18px;
  color: #5E6278;
  padding-top: 15px;
  line-height: 1.4;
  border-top: 1px solid #eee;
  margin-bottom: 10px;
}

.info-section {
  text-align: left;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  font-size: 20px;
  line-height: normal;
  color: #5E6278;
  font-weight: 400;
}

.info-dot {
  width: 10px;
  height: 10px;
  background: #07A7CC;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

.highlight-text {
  color: #07A7CC;
  font-weight: 600;
}

/* Copy Section */
.copy-section {
  margin-top: 20px;
}

.copy-container {
  display: flex;
  align-items: center;
  /* background: #fff; */
  border-radius: 500px;
  padding: 4px;
  border: 1px solid #C4C4C7;
}

.copy-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 20px;
  outline: none;
  color: #07A7CC;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

.copy-btn {
  border: none;
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
}

.copy-btn:hover {
  background: #4a9bc7;
}

.copy-btn:hover svg path {
  fill: white;
}

.copy-btn svg {
  fill: white;
}

/* Animation shake nhẹ cho character */
.character-head {
  animation: gentleShake 2s ease-in-out infinite;
  transform-origin: center bottom;
}

.character-head img {
  width: 100%;
  height: auto;
  display: block;
}

/* Keyframes cho shake nhẹ */
@keyframes gentleShake {

  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  10% {
    transform: translateX(-2px) rotate(-1deg);
  }

  20% {
    transform: translateX(2px) rotate(1deg);
  }

  30% {
    transform: translateX(-1px) rotate(-0.5deg);
  }

  40% {
    transform: translateX(1px) rotate(0.5deg);
  }

  50% {
    transform: translateX(0) rotate(0deg);
  }

  60% {
    transform: translateX(-1px) rotate(-0.5deg);
  }

  70% {
    transform: translateX(1px) rotate(0.5deg);
  }

  80% {
    transform: translateX(-2px) rotate(-1deg);
  }

  90% {
    transform: translateX(2px) rotate(1deg);
  }
}

/* Animation cho cloud cũng shake nhẹ */
.character-cloud {
  animation: cloudFloat 3s ease-in-out infinite;
  animation-delay: 0.5s;
}

@keyframes cloudFloat {

  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }

  25% {
    transform: translateY(-3px) translateX(-1px);
  }

  50% {
    transform: translateY(-5px) translateX(1px);
  }

  75% {
    transform: translateY(-3px) translateX(-1px);
  }
}

.bubble-1 {
  animation-delay: 0s;
}

.bubble-2 {
  animation-delay: 0.8s;
}

.bubble-3 {
  animation-delay: 1.6s;
}

.bubble-4 {
  animation-delay: 2.4s;
}

.bubble-5 {
  animation-delay: 3.2s;
}



/* Hover effect cho character - shake mạnh hơn */
.character-head:hover {
  animation: strongShake 0.5s ease-in-out;
}

@keyframes strongShake {

  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  10% {
    transform: translateX(-5px) rotate(-2deg);
  }

  20% {
    transform: translateX(5px) rotate(2deg);
  }

  30% {
    transform: translateX(-4px) rotate(-1.5deg);
  }

  40% {
    transform: translateX(4px) rotate(1.5deg);
  }

  50% {
    transform: translateX(-3px) rotate(-1deg);
  }

  60% {
    transform: translateX(3px) rotate(1deg);
  }

  70% {
    transform: translateX(-2px) rotate(-0.5deg);
  }

  80% {
    transform: translateX(2px) rotate(0.5deg);
  }

  90% {
    transform: translateX(-1px) rotate(-0.2deg);
  }
}

/* Animation cho modal xuất hiện */
.out-of-points-modal {
  animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }

  50% {
    opacity: 0.8;
    transform: translateY(-10px) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation cho close button */
.close-btn {
  transition: all 0.3s ease;
}

.close-btn:hover {
  transform: rotate(90deg) scale(1.1);
  background-color: rgba(107, 211, 255, 0.1);
}

/* Animation cho copy button */
.copy-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.copy-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(45deg, #5db8e8, #4a9bc7);
}

.copy-btn:active {
  transform: scale(0.95);
}

/* Ripple effect cho copy button */
.copy-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.copy-btn:active::after {
  width: 300px;
  height: 300px;
}

/* Text animations */
.modal-title {
  animation: textSlideIn 0.6s ease-out 0.2s both;
}

.modal-subtitle {
  animation: textSlideIn 0.6s ease-out 0.4s both;
}

.info-section {
  animation: textSlideIn 0.6s ease-out 0.6s both;
}

.copy-section {
  animation: textSlideIn 0.6s ease-out 0.8s both;
}

@keyframes textSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Breathing animation cho info dots */
.info-dot {
  animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Subtle pulse cho highlighted text */
.bonus-text,
.highlight-text {
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {

  .character-section {
    height: 55px;
  }

  .character-body {
    top: -110px;
    left: 50%;
    transform: translateX(-70%);
  }

  .character-head {
    animation-duration: 1.5s;
    width: 230px;
  }

  .character-cloud {
    width: 200px;
    top: 20px;
    left: 50%;
  }

  .out-of-points-modal::before {
    width: 100%;
    background-size: contain;
  }

  @keyframes gentleShake {

    0%,
    100% {
      transform: translateX(0) rotate(0deg);
    }

    25% {
      transform: translateX(-1px) rotate(-0.5deg);
    }

    50% {
      transform: translateX(0) rotate(0deg);
    }

    75% {
      transform: translateX(1px) rotate(0.5deg);
    }
  }
}

/* Performance optimization */
.character-head,
.character-cloud,
.bubble {
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Responsive */
@media (max-width: 768px) {
  .sm-responsive {
    padding: 0 10px !important;
  }

  .out-of-points-modal {
    padding: 20px;
    margin: 20px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-subtitle {
    font-size: 16px;
  }

  .info-item {
    font-size: 16px;
  }

  .copy-input {
    font-size: 14px;
  }
}

.points-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%,
      rgba(0, 0, 0, 0.1) 100%);
  border-radius: inherit;
  pointer-events: none;
}

.points-badge .points-number {
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  margin: 0;
  line-height: 14px;
}

.star-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  background: rgba(255, 215, 0, 0.2);
  border-radius: 50%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.star-icon svg {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Hover effect */
.points-badge:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

/* Animation khi tăng điểm */
@keyframes pointsIncrease {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.points-badge.animate {
  animation: pointsIncrease 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .points-badge {
    padding: 2px 6px;
  }



  .star-icon {
    width: 10px;
    height: 10px;
  }

  .star-icon svg {
    width: 14px;
    height: 14px;
  }
}