/* General styles */
.section.definition {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow: hidden;
}

.definition-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
}

@media (max-width: 700px) {
    .definition-content {
        flex-direction: column;
    }
}

/* Styling for definition-left and definition-right */
.definition-left,
.definition-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 20px;
}

.definition-left {
    width: 225px;
}

/* Word animation */
.word {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    font-size: 2.5rem;
    font-weight: 300;
    font-family: 'Geist';
}

.word::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background-color: #000;
    transition: none;
    animation: none;
}

.word.word-underline::after {
    animation: draw-erase 1s forwards;
}

/* Syllable and bullet animations */
.syllable {
    opacity: 0;
    animation: slideInRight 0.5s forwards;
}

.bullet {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0px;
    opacity: 0;
    overflow: hidden;
    animation: wideBullet 0.5s forwards;
}

.bullet:before {
    width: 10px;
    height: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-black);
    content: '•';
}

/* Speech and pronunciation animations */
.speech {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 20px;
    text-transform: lowercase;
}

.speech-slash {
    font-style: normal !important;
    margin: 0 5px;
    opacity: 0;
    animation: slideInRight 0.5s forwards;
}

.pronunciation {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    opacity: 0;
    margin-top: 1px;
    letter-spacing: 1px;
    font-weight: 500;
    animation: slideInUp 0.5s forwards;
}

/* Part of speech animation */
.part-of-speech {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    text-transform: lowercase;
    opacity: 0;
    animation: slideInUp 0.5s forwards;
    font-weight: 500;
    /* font-style: italic; */
}

/* Play pronunciation */
.play-pronunciation {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    animation: slideInRight 0.5s forwards;
    transition: width ease 0.5s;
}

#playButton {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    font-weight: 600;
}

#playButton:hover {
    color: var(--black);
}

.adjust-play-icon {
    margin-top: 3px;
    margin-left: 1px;
}

/* Wave bars animation */
.wave-bars ul {
    height: 20px;
    margin-top: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: ease 0.2s;
    position: relative;
}

.wave-bars li {
    list-style: none;
    height: 10px;
    width: 4px;
    border-radius: 10px;
    background: var(--black);
    margin: 0 2px;
    padding: 0;
    animation-name: wave1;
    animation-duration: 0.3s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    transition: ease 0.2s;
}

.wave-bars li:nth-child(2) {
    animation-name: wave2;
    animation-delay: 0.2s;
}

.wave-bars li:nth-child(3) {
    animation-name: wave3;
    animation-delay: 0.23s;
    animation-duration: 0.4s;
}

.wave-bars li:nth-child(4) {
    animation-name: wave4;
    animation-delay: 0.1s;
    animation-duration: 0.3s;
}

.wave-bars li:nth-child(5) {
    animation-delay: 0.5s;
}

.wave-bars li:nth-child(6) {
    animation-name: wave2;
    animation-duration: 0.5s;
}

.wave-bars li:nth-child(8) {
    animation-name: wave4;
    animation-delay: 0.4s;
    animation-duration: 0.25s;
}

.wave-bars li:nth-child(9) {
    animation-name: wave3;
    animation-delay: 0.15s;
}

/* Definition text animation */
.definition-text {
    display: flex;
    align-items: baseline;
    margin-bottom: 5px;
    font-style: italic;
}

.definition-number {
    height: 20px;
    width: 20px;
    text-align: right;
    margin-right: 5px;
    opacity: 0;
    animation: slideInUp 0.2s forwards;
    font-size: 0.8rem;
    line-height: 1;
    vertical-align: top;
    position: relative;
    top: -0.5em;
    color: var(--text-grey);
    font-weight: 500;
}

.definition-body {
    text-transform: lowercase;
    opacity: 1;
}

.definition-body span {
    position: relative;
    overflow: hidden;
    display: block;
    line-height: 1.2;
    width: auto;
    font-family: 'PTRootUI';
}

.definition-body span:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    animation: a-ltr-after 2s cubic-bezier(.77, 0, .18, 1) forwards;
    transform: translateX(-101%);
}

.definition-body span:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    animation: a-ltr-before 2s cubic-bezier(.77, 0, .18, 1) forwards;
    transform: translateX(0);
}

/* Scroll down animation */
#scroll-down-animation {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.mouse {
    margin: 0 auto;
    display: block;
    border-radius: 25px;
    border: 2px solid var(--text-grey);
    height: 35px;
    width: 25px;
    position: relative;
}

.move {
    position: absolute;
    background-color: var(--text-grey);
    height: 5px;
    width: 2px;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    animation: move 5s linear infinite;
}

/* Animation Delays */
.syllable.one {
    animation-delay: 0.5s;
}


.syllable.two {
    animation-delay: 1.0s;
}

.syllable.three {
    animation-delay: 1.5s;
}


.bullet.one,
.bullet.two {
    animation-delay: 2.0s;
}

.pronunciation {
    animation-delay: 2.0s;
}

.speech-slash {
    animation-delay: 2.5s;
}

.play-pronunciation {
    animation-delay: 3.0s;
}

.part-of-speech {
    animation-delay: 3.5s;
}

.definition-text:nth-child(1) .definition-number {
    animation-delay: 4.0s;
}

.definition-text:nth-child(2) .definition-number {
    animation-delay: 4.3s;
}

.definition-text:nth-child(3) .definition-number {
    animation-delay: 4.6s;
}

.definition-body .definition-one:before,
.definition-body .definition-one:after {
    animation-delay: 4.9s;
}

.definition-body .definition-two:before,
.definition-body .definition-two:after {
    animation-delay: 5.2s;
}

.definition-body .definition-three:before,
.definition-body .definition-three:after {
    animation-delay: 5.4s;
}

.text-grey {
    animation: textToGrey 0.5s forwards 7.3s;
}

/* Additional classes for specific elements */
.highlight-background {
    background: var(--text-grey);
    border-radius: 5px;
}

.remove-bullets {
    animation: removeBullets 0.5s forwards 0s !important;
}

/* Animation keyframes */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

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

@keyframes textToGrey {
    from {
        color: var(--black);
    }

    to {
        color: var(--text-grey);
    }
}

@keyframes draw-erase {
    0% {
        width: 0;
        left: 0;
    }

    50% {
        width: 100%;
        left: 0;
    }

    100% {
        width: 0;
        left: 100%;
    }
}

@keyframes move {
    0% {
        transform: translate(-50%, 5px);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, 10px);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 45px);
        opacity: 0;
    }
}

@keyframes wave1 {
    from {
        transform: scaleY(1);
    }

    to {
        transform: scaleY(0.5);
    }
}

@keyframes wave2 {
    from {
        transform: scaleY(0.3);
    }

    to {
        transform: scaleY(0.6);
    }
}

@keyframes wave3 {
    from {
        transform: scaleY(0.6);
    }

    to {
        transform: scaleY(0.8);
    }
}

@keyframes wave4 {
    from {
        transform: scaleY(0.2);
    }

    to {
        transform: scaleY(0.5);
    }
}

@keyframes a-ltr-after {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(101%);
    }
}

@keyframes a-ltr-before {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(200%);
    }
}

@keyframes removeBullets {
    from {
        opacity: 1;
        width: 30px;
    }

    to {
        opacity: 0;
        width: 0;
    }
}


@keyframes wideBullet {
    from {
        opacity: 0;
        width: 0px;
    }

    to {
        opacity: 1;
        width: 30px;
    }
}
