/* Visual indicator when audio is playing */
.playing-audio {
    position: relative;
}

.playing-audio::after {
    content: "🔊 Playing audio...";
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 1000;
    animation: pulse 2s infinite;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Styling for floating text notifications */
.floating-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    animation: fadeInOut 3s ease-in-out forwards;
    text-align: center;
    max-width: 80%;
}

/* Persistent floating notifications */
.floating-text.persistent {
    animation: none;
    top: 20%;
    background-color: rgba(0, 0, 0, 0.85);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001; /* Higher than regular floating text */
}

/* Dismiss button for persistent notifications */
.dismiss-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}

.dismiss-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Fade out animation */
.fade-out {
    animation: fadeOut 1s ease-in-out forwards;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -60%); }
    10% { opacity: 1; transform: translate(-50%, -50%); }
    90% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -40%); }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}