@import url('https://fonts.googleapis.com/css2?family=DynaPuff:wght@400..700&display=swap');
.words-power {
    /* filter: blur(10px); */
    position: relative;
}
.result-page,
.intro-page {
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: rgba(255,255,255,.8);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.result-page.level-2,
.intro-page.level-2 {
    background-color: rgba(223,247,255,0.8);
}
.result-page.level-3,
.intro-page.level-3 {
    background-color: rgba(240,255,223,0.8);
}
.result-page__title,
.intro-page__title {
    font-size: 60px;
    color: #4463b2;
    font-family: "DynaPuff", system-ui;
}
.result-page__level {
    font-family: "DynaPuff", system-ui;
    text-transform: uppercase;
    position: relative;
    background-color: #ff6d00;
    color: #ffe6c5;
    padding: 2px 36px;
    border-radius: 20px;
}
.result-page img {
    display: none;
    height: auto;
    width: 90%; 
    margin-top: auto;
}
.result-page__level::before,
.result-page__level::after {
    content: '';
    height: 12px;
    width: 12px;
    border-radius: 100%;
    background-color: #ffb657;
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto;
}
.result-page__level::before {
    right: auto;
    left: 6px;
}
.result-page__level::after {
    right: 6px;
    left: auto;
}
.result-page__message {
    color:#008069;
    font-size: 28px;
    text-align: center;
}
.result-page__message,
.intro-page__goal {
    font-family: "DynaPuff", system-ui;
}
.intro-page__goal {
    font-size: 20px;
}
.result-page__btns {
    display: flex;
}
.result-page__btn {
    margin: 0 8px;
}
.result-page__btn:disabled {
    background: #c7c7c7;
    color: #ededed;
    box-shadow: 0 4px 15px rgba(44, 44, 44, 0.4);
}
/* .result-page .btn-try-again,
.result-page .btn-next-level {
    display: none;
} */
.result-page.success img.mood-good {
    display: block;
}
.result-page.normal img.mood-neutral {
    display: block;
}
.result-page.failed img.mood-angry {
    display: block;
} 
.result-page__btn,
.intro-page__btn {
    background: linear-gradient(270deg, #008069, #00c896, #008069);
    background-size: 600% 600%;
    font-family: "DynaPuff", system-ui;
    color: #fff;
    border: none;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
    animation: gradientFlow 5s ease infinite;
    box-shadow: 0 4px 15px rgba(0, 128, 105, 0.4);
}

/* Hover effect */
.intro-page__btn:hover {
    transform: scale(1.08) rotate(-1deg);
    box-shadow: 0 8px 25px rgba(0, 200, 150, 0.7);
}

/* Gradient animation */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.chat-game {
    position: relative;
    z-index: 1;
}
.chat-game__wrapper {
}
.chat-game__robot-list {
    max-height: 400px;
    overflow-x: hidden;
    overflow-y: auto;
}
.chat-game__row {
    display: flex;
}
.chat-game__chats {
    border-right: 1px solid;
    padding: 12px 0;
    max-width: 35%;
    flex: 0 0 35%;
    box-sizing: border-box;
    background-color: white;
    border-radius: 8px 0 0 8px;
    border: 1px solid #d1d1d1;
}
.chat-game__chats .robot {
    border-bottom: 1px solid #e7e7e7;
    padding: 8px 12px;
}
.chat-game__chats .robot:first-of-type {
    background-color: #f1f1f1;
}
.chat-game__chats-title {
    font-size: 32px;
    font-weight: bold;
    color: #008069;
    padding: 0 12px;
}
.chat-game__chats .robot:last-child {
    border: none;
}
.chat-game__chat {
    /* padding: 12px; */
    max-width: 65%;
    flex: 0 0 65%;
    border-radius: 0 8px 8px 0;
    /* border: 1px solid #d1d1d1; */
    background-color: white;
    overflow: hidden;
}
.chat {
    position: relative;
}
.chat__top {
    background-color: #008069;
    color: #fff;
    border: 1px solid #008069;
    padding: 8px 12px;
    height: 70px;
    display: flex;
    align-items: center;
}
.robot {
    display: flex;
    width: 100%;
    position: relative;
}
.robot__photo {
    height: 50px;
    width: 50px;
    border-radius: 100%;
    overflow: hidden;
    margin-right: 12px;
}
.robot__photo img {
    height: 100%;
    width: auto;
}
.robot__name {
    font-size: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.robot__name span {
    display: block;
    line-height: 1.2;
}
.robot__name span:last-of-type {
    font-size: 12px;
}
.robot__status {
    /* font-style: italic; */
    opacity: 0.6;
    font-size: 14px;
}
.robot__new-message {
    background-color: #008069;
    color: #fff;
    width: 24px;
    height: 24x;
    position: absolute;
    top: calc(50% - 12px);
    right: 12px;
    bottom: auto;
    left: auto;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.robot__icons {
    margin-left: auto;
    display: flex;
    align-items: center;
    margin-right: 8px;
}
.robot__icons-btn {
    opacity: 0.6;
    background: unset;
    margin-left: 9px;
    border: unset;
    color: #fff;
    font-size: 18px;
}
.chat__message {
    /* background-color: #eee8e1; */
    background-image: url(/pages/games/img/mean-words/chat-bg.png);
    background-size: 70% auto;
    background-repeat: repeat;
    height: calc(100% - 70px);
    min-height: 400px;
    overflow: hidden;
}
.chat__input {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 52px;
}
.typing-message {
    display: flex;
    padding: 8px;
}
.typing-message.recording .typing-message__input::before {
    content: 'Recording...';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #008069;
    z-index: 1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}
.typing-message.recording .typing-message__btn {
    background-color: #ff3c00;
}
.typing-message.recording .typing-message__btn::after {
    content: '';
    height: 16px;
    width: 16px;
    background-color: #fff;
    border-radius: 2px;
}
.typing-message.recording .typing-message__btn i {
    display: none;
}
.typing-message__input {
    width: calc(100% - 48px);
    margin-right: 8px;
    display: flex;
    position: relative;
}
.typing-message__input-icons {
    position: absolute;
    left: auto;
    right: 8px;
    top: 0;
    bottom: 0;
    opacity: 0.6;
    display: flex;
    align-items: center;
    margin-right: 8px;
}
.typing-message__input-icons i {
    margin-left: 12px;
}
.typing-message__input input {
    width: 100%;
    border: unset;
    border-radius: 20px;
    height: 36px;
    padding: 4px 100px  4px 12px;
}
.typing-message__input input:focus {
    border: unset;
    outline: unset;
}
.typing-message__btn {
    background-color: #008069;
    border: unset;
    color: #fff;
    border-radius: 100%;
    height: 36px;
    width: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.messages {
    height: calc(100% - 52px);
    max-height: 400px;
    overflow: auto;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    /* justify-content: flex-end; */
}
/* width */
.chat-game__robot-list::-webkit-scrollbar,
.messages::-webkit-scrollbar {
  width: 3px;
}
/* Track */
.chat-game__robot-list::-webkit-scrollbar-track,
.messages::-webkit-scrollbar-track {
  background: transparent;
}
/* Handle */
.chat-game__robot-list::-webkit-scrollbar-thumb,
.messages::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 10px;
}
/* Handle on hover */
.chat-game__robot-list::-webkit-scrollbar-thumb:hover,
.messages::-webkit-scrollbar-thumb:hover {
  background: #555;
}
.message {
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.04);
    margin-bottom: 4px;
    padding-right: 44px;
    position: relative;
    line-height: 1.1;
    max-width: 80%;
}
.message:first-of-type {
    margin-top: auto;
}
.message::after{
    content: ""attr(data-time)"";
    font-size: 9px;
    position: absolute;
    left: auto;
    right: 4px;
    top: auto;
    bottom: 2px;
    line-height: 1;
}
.message__photo {
    padding: 6px 6px 14px 6px;
}
.message__audio {
    padding: 0;
    margin-bottom: 20px;
}
.message__photo img {
    width: 240px;
    height: auto;
    border-radius: 6px;
}
.message__user {
    background-color: #e3edd4;
    width: max-content;
    margin-left: auto;
    margin-right: 12px;
}
.message__robot {
    background-color: #fff;
    width: max-content;
    margin-left: 12px
}
.message__user::before,
.message__robot::before {
  content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    position: absolute;
    top: 0;
}
.message__user::before {
    right: -7px;
    border-top: 7px solid #e3edd4;
}
.message__robot::before {
    border-top: 7px solid #ffffff;
    left: -7px;
}
.message__call {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-left: -8px;
}
.message__call::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    height: calc(100% - 6px);
    width: calc(100% - 6px);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.04);
    /* background-color: rgb(254, 62, 13, 0.08); */
}
.message__call-message {
    display: flex;
    flex-direction: column;
}
.message__call-message span {
    line-height: 1.2;
}
.message__call-message span:first-child {
    font-weight: 700;
}
.message__call-message span:last-child {
    font-size: 12px;
    opacity: 0.7;
}
.message__call-icon {
    background-color: rgba(255, 255, 255, 0.7);
    height: 36px;
    width: 36px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}
.message__call-icon i {
    /* color: rgb(254, 62, 13) */
}
/* green #008069 */
/* bg #ece6e0 */
.answers {
    position: relative;
    background-color: #ffebd0;
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    z-index: 1;
}
.answers__add-score,
.answers__minus-score {
    display: none;
}
.answers__title {
    font-family: "DynaPuff", system-ui;
}
.answers__list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.answers__list button {
    border: unset;
    margin-bottom: 8px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2px 12px;
}
.answers__list button.selected {
    background-color: #ffb657;
    color: #fff;
}
.answers__reaction {
    display: none;
    font-size: 48px;
    font-family: "DynaPuff", system-ui;
}
.answers__reaction.neutral,
.answers__reaction.positive,
.answers__reaction.negative {
    display: inline-block;
    animation: floatUp 1.5s ease-out forwards;
}
.answers__reaction.positive:before {
    content: '👍 +2';
}
.answers__reaction.level-3.positive:before {
    content: '👍🎉 +3';
}
.answers__reaction.positive .answers__add-score {
    color: #4463b2;
}
.answers__reaction.negative .answers__minus-score {
    color: red;
}
.answers__reaction.positive .answers__add-score,
.answers__reaction.negative .answers__minus-score {
    display: inline-block;
}
.answers__reaction.negative:before {
    content: '😧 -1';
}
.answers__reaction.neutral:before {
    content: '🤨 +1';
}

.answers__reaction {
    /* display: inline-block;
    background: #008069;
    color: #fff;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 16px; */
    position: absolute; /* so it can float freely */
    right: 0;
    top: 0;
}

/* floating up and disappearing */
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-40px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8);
    }
}
.confetti-container {
  position: absolute;
  /* top: 0;
  left: 0;
  width: 100%;
  height: 100%; */
  /* pointer-events: none; */
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  background-color: red;
  opacity: 0.8;
  animation: fall linear infinite;
  transform: rotate(45deg);
}

/* Randomize confetti colors */
.confetti:nth-child(odd) {
  background-color: yellow;
}
.confetti:nth-child(even) {
  background-color: blue;
}
.confetti:nth-child(3n) {
  background-color: green;
}

/* Falling animation */
@keyframes fall {
  0% {
    transform: translateY(-10%) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}
.loader {
    position: relative;
    padding-right: 24px!important;
}
.loader::after {
    content: '';
    position: absolute;
    top: auto;
    right: 12px;
    bottom: 10px;
    left: auto;
    width: 10px;
    aspect-ratio: 4;
    background: radial-gradient(circle closest-side,#000 90%,#0000) 0/calc(100%/3) 100% space;
    clip-path: inset(0 100% 0 0);
    animation: l1 2s steps(4) infinite;
}
@keyframes l1 {to{clip-path: inset(0 -34% 0 0)}}
/* Audio player */
.audio-message {
    position: relative;
    /* background: #dcf8c6; */
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 200px;
    /* box-shadow: 0 1px 3px rgba(0,0,0,0.15); */
}
.audio-message.reacted::after {
    content: '😆';
    position: absolute;
    right: 4px;
    bottom: -16px;
    background-color: #fff;
    border-radius: 100%;
    height: 20px;
    width: 20px;
    font-size: 13px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.play-btn::before {
    content: "▶";
    font-size: 14px;
    margin-left: 2px;
}

.play-btn.pause::before {
    content: "⏸";
    margin-left: 0;
}

.waveform {
    flex: 1;
    display: flex;
    gap: 2px;
    height: 20px;
    align-items: center;
}
.audio-message.init .waveform span,
.audio-message.playing .waveform span {
    animation-play-state: running;
}
.waveform span {
    display: block;
    width: 2px;
    background: #4caf50;
    border-radius: 1px;
    animation: bounce 1.2s infinite ease-in-out;
    animation-play-state: paused;
}
.waveform span:nth-child(1)  { height: 8px; }
.waveform span:nth-child(2)  { height: 12px; }
.waveform span:nth-child(3)  { height: 6px; }
.waveform span:nth-child(4)  { height: 15px; }
.waveform span:nth-child(5)  { height: 10px; }
.waveform span:nth-child(6)  { height: 5px; }
.waveform span:nth-child(7)  { height: 14px; }
.waveform span:nth-child(8)  { height: 9px; }
.waveform span:nth-child(9)  { height: 13px; }
.waveform span:nth-child(10) { height: 7px; }
.waveform span:nth-child(11) { height: 11px; }
.waveform span:nth-child(12) { height: 6px; }
.waveform span:nth-child(13) { height: 15px; }
.waveform span:nth-child(14) { height: 8px; }
.waveform span:nth-child(15) { height: 12px; }
.waveform span:nth-child(16) { height: 5px; }
.waveform span:nth-child(17) { height: 14px; }
.waveform span:nth-child(18) { height: 7px; }
.waveform span:nth-child(19) { height: 10px; }
.waveform span:nth-child(20) { height: 6px; }
.waveform span:nth-child(21) { height: 13px; }
.waveform span:nth-child(22) { height: 8px; }
.waveform span:nth-child(23) { height: 15px; }
.waveform span:nth-child(24) { height: 9px; }
.waveform span:nth-child(25) { height: 11px; }

.waveform span:nth-child(2) { animation-delay: 0.2s; }
.waveform span:nth-child(3) { animation-delay: 0.3s; }
.waveform span:nth-child(4) { animation-delay: 0.4s; }
.waveform span:nth-child(5) { animation-delay: 0.5s; }
.waveform span:nth-child(6) { animation-delay: 0.6s; }
.waveform span:nth-child(7) { animation-delay: 0.7s; }
.waveform span:nth-child(9) { animation-delay: 0.9s; }
.waveform span:nth-child(10) { animation-delay: 1.0s; }
.waveform span:nth-child(11) { animation-delay: 1.1s; }
.waveform span:nth-child(12) { animation-delay: 1.2s; }
.waveform span:nth-child(13) { animation-delay: 1.3s; }
.waveform span:nth-child(14) { animation-delay: 1.4s; }
.waveform span:nth-child(15) { animation-delay: 1.5s; }
.waveform span:nth-child(16) { animation-delay: 1.6s; }
.waveform span:nth-child(17) { animation-delay: 1.7s; }
.waveform span:nth-child(18) { animation-delay: 1.8s; }
.waveform span:nth-child(19) { animation-delay: 1.9s; }
.waveform span:nth-child(20) { animation-delay: 2.0s; }
.waveform span:nth-child(21) { animation-delay: 2.1s; }
.waveform span:nth-child(22) { animation-delay: 2.2s; }
.waveform span:nth-child(23) { animation-delay: 2.3s; }
.waveform span:nth-child(24) { animation-delay: 2.4s; }

@keyframes bounce {
    0%, 40%, 100% { height: 5px; }
    20% { height: 15px; }
}

.time {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

audio {
    display: none;
}
/* ./Audio player */