div.story-text p {
    padding-top: 1.75rem;
}

.tooltip {
    max-width: 400px;
    background-color: #ffffff;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    position: absolute;
    z-index: 50;
}

.tooltip .arrow {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    position: absolute;
    top: -8px;
    left: 10px;
}

/* Drop shadow for the arrow */
.tooltip .arrow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(0, 0, 0, 0.1);
}

/* Flashcard Button */
#add-to-flashcards {
    font-size: 0.875rem;
    cursor: pointer;
}

/* Additional styling */
#original-word, #translated-word {
    display: block;
}

/* Highlight animation */
.highlight {
    background-color: yellow;
    transition: background-color 0.4s ease-in-out;
}

/* Loading animation */
.loading {
    display: inline-block;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: #000;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.swiper-wrapper {
    width: 100%;
    height: max-content !important;
    padding-bottom: 0px !important;
    -webkit-transition-timing-function: linear !important;
    transition-timing-function: linear !important;
    position: relative;
}
.swiper-pagination-bullet {
    background: #4f46e5;
}

.my-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    hyphens: auto; /* Allows better word breaks */
}

.my-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    hyphens: auto; /* Allows better word breaks */
}

/* Bottom border progress animation */
.loading-border-progress {
    border-bottom: 2px solid transparent; /* Regular state */
    position: relative; /* Needed for the ::after positioning */
}

.loading-border-progress::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background-color: #4f46e5; /* Indigo color */
    animation: loading-progress 1.5s infinite; /* Animation effect */
}

@keyframes loading-progress {
    0% {
        width: 0;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 0;
    }
}


/* Flashcard Modal CSSs */

#termModal {
    display: flex;
    align-items: center;
    justify-content: center;
}

#termModal.hidden {
    display: none;
}

/* Default state for carousel images */
#gif-carousel img {
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1; /* Ensure they load with full opacity */
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Style for selected GIF */
.selected-gif-animation {
    transform: scale(1.15); /* Scale up effect */
    opacity: 1; /* Ensure selected GIF remains fully visible */
    box-shadow: 0 0 3px rgba(79, 70, 229, 0.7); /* Nice subtle shadow */
    border: 4px solid rgba(79, 70, 229, 0.8); /* Indigo border for emphasis */
    transition: all 0.3s ease-in-out;
}

/* For unselected images, apply the faded effect */
#gif-carousel img.unselected {
    opacity: 0.5; /* Reduce opacity for unselected */
    transform: scale(1); /* Reset scale */
}

/* Add transition effects for the border */
#gif-carousel img.selected-gif-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(79, 70, 229, 0.8);
    box-sizing: border-box;
    pointer-events: none;
    z-index: 1;
    transition: border-color 0.3s ease;
}

/* Smooth scrolling for the GIF carousel */
#gif-carousel {
    scroll-behavior: smooth;
    padding-left: 15px;
    padding-right: 15px;
}


.no-terms-section {
    min-height: 60vh;
}

.no-terms-section button:hover {
    transform: scale(1.05);
    transition: all 0.2s ease-in-out;
}


/* Practice Modal */
/* Modal Styling */
#practice-modal {
    display: none; /* Initially hidden */
}

#practice-modal.show {
    display: flex;
}

/* Full screen modal */
.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.z-50 {
    z-index: 50; /* Ensure it is above other content */
}

/* Simple close button styling */
#close-modal svg {
    width: 24px;
    height: 24px;
}

#close-modal:hover {
    color: #ff0000; /* Example hover color for close button */
}

#shortcuts-btn:hover {
    box-shadow: 0 4px 6px rgba(50, 115, 220, 0.2);
}

#shortcuts-menu:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

body.no-scroll {
    overflow: hidden;
}

/* flipping of the card */
/* Container that holds the front and back */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform: rotateY(0deg);
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* Hide the backface of both sides of the card */
.backface-hidden {
    backface-visibility: hidden;
}

/* Front side of the flashcard */
.flip-card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
}

/* Back side of the flashcard */
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #f0f5ff;
    transform: rotateY(180deg);
}

/* Flipping effect */
.flipped .flip-card-inner {
    transform: rotateY(180deg);
}


.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flipped {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

@keyframes throw-left {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100vw) rotate(-20deg);
        opacity: 0;
    }
}

@keyframes throw-right {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100vw) rotate(20deg);
        opacity: 0;
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.throw-left {
    animation: throw-left 0.6s forwards;
}

.throw-right {
    animation: throw-right 0.6s forwards;
}

.fade-in {
    animation: fade-in 0.6s forwards;
}

/* Flashcard Modal Animation */
@keyframes glow {
    0% {
        box-shadow: 0 0 10px 0 rgba(225, 29, 72, 0.7);
    }
    50% {
        background-color: rgba(225, 29, 72, 1);
        color: #ffffff;
        box-shadow: 0 0 20px 5px rgba(225, 29, 72, 1);
    }
    100% {
        box-shadow: 0 0 10px 0 rgba(225, 29, 72, 0.7);
    }
}

@keyframes scale-up {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1);
    }
}

.glow-and-scale {
    animation: glow 0.6s ease-in-out, scale-up 0.6s ease-in-out;
    transition: transform 0.3s;
}

.star-toast {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    z-index: 1000;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
}

.star-toast.fade-out {
    opacity: 0;
}

.scrollable-content {
    position: relative;
    max-height: 600px;
    overflow-y: auto;
}

.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Smooth transition for showing/hiding flashcard terms */
.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.transition-all {
    transition: all 0.3s ease-in-out;
}

/* Audio Player */
.audio-player-container {
    height: 60px; /* Fix the height of the audio player */
    z-index: 1000;
    position: fixed;  /* Keep it fixed */
    bottom: 0 !important;  /* Stick to bottom */
}

@media (min-width: 640px) {
    .audio-player-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

#play-pause, #backward, #forward {
    cursor: pointer;
}

  /* Disabled button styles */
.btn-disabled {
    background-color: #E5E7EB; /* gray-300 */
    color: #9CA3AF; /* gray-500 */
    cursor: not-allowed;
}

  /* Enabled button styles */
.btn-enabled {
    background-color: #4F46E5; /* indigo-600 */
    color: #FFFFFF; /* white */
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-enabled:hover {
    background-color: #4338CA; /* indigo-700 */
}

.btn-enabled:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3); /* focus:ring-2 focus:ring-indigo-300 */
}

/* Overlay Styling */
#loading-overlay {
    background: rgba(255, 255, 255, 0.4);
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.text-gradient {
    stroke: url(#gradient);
    fill: none;
}

.animate-fade-in {
    animation: fade-in 0.3s ease-in-out forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

#cookie-popup {
    z-index: 1000;
}

#cookie-popup.show {
    transform: translateY(0);
}


.cc--light-funky {
    color-scheme: light;

    --cc-bg: #f9faff;
    --cc-primary-color: #112954;
    --cc-secondary-color: #112954;

    --cc-btn-primary-bg: #3859d0;
    --cc-btn-primary-color: var(--cc-bg);
    --cc-btn-primary-hover-bg: #213657;
    --cc-btn-primary-hover-color: #fff;

    --cc-btn-secondary-bg: #dfe7f9;
    --cc-btn-secondary-color: var(--cc-secondary-color);
    --cc-btn-secondary-hover-bg: #c6d1ea;
    --cc-btn-secondary-hover-color: #000;

    --cc-cookie-category-block-bg: #ebeff9;
    --cc-cookie-category-block-border: #ebeff9;
    --cc-cookie-category-block-hover-bg: #dbe5f9;
    --cc-cookie-category-block-hover-border: #dbe5f9;
    --cc-cookie-category-expanded-block-hover-bg: #ebeff9;
    --cc-cookie-category-expanded-block-bg: #ebeff9;

    --cc-overlay-bg: rgba(219, 232, 255, 0.85)!important;

    --cc-toggle-readonly-bg: #cbd8f1;
    --cc-toggle-on-knob-bg: var(--cc-bg);
    --cc-toggle-off-bg: #8fa8d6;
    --cc-toggle-readonly-knob-bg: var(--cc-bg);

    --cc-separator-border-color: #f1f3f5;

    --cc-footer-border-color: #f1f3f5;
    --cc-footer-bg: var(--cc-bg);
}

#googleSignInDiv svg {
    width: 18px;
    height: 18px;
}
