@font-face {
    font-family: Bricolage Grotesque;
    /* set name */
    src: url("../fonts/BricolageGrotesque-Regular.ttf");
    /* url of the font */
}

* {
    outline: none;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #111;
    color: white;
    font-family: "Bricolage Grotesque", sans-serif;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Username display with loading dots */
.username-display {
    position: fixed;
    top: 27px;
    left: 120px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px 8px 35px;
    border-radius: 20px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #000000;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-shadow: 0px 0px 15px -7px #000000;
    box-shadow: 0px 0px 15px -7px #000000;
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 34px;
    /* Fixed height for consistent alignment */
}

/* Loading dots animation */
.username-display.loading::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #666;
    margin-left: 2px;
    animation: loadingDots 1.4s infinite ease-in-out both;
}

.username-display.loading::before {
    animation: pulseIcon 2s infinite ease-in-out;
}

/* Individual dots for more sophisticated animation */
.username-display.loading-dots::after {
    content: "";
    display: none;
    /* Hide the single dot */
}

.loading-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #666;
    animation: dotPulse 1.4s infinite ease-in-out both;
    margin: 0 1px;
    vertical-align: middle;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0s;
}

/* Animations */
@keyframes loadingDots {

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

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes dotPulse {

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

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseIcon {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* User icon pseudo-element - enhanced for loading state */
.username-display::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: opacity 0.3s ease;
}

.controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    width: max-content;
    -webkit-box-shadow: 0px 0px 20px -7px #000000;
    box-shadow: 0px 0px 20px -7px #000000;
}

#status {
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-right: 20px;
}

button {
    background: black;
    color: white;
    border: 4px solid rgb(50, 50, 50);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

button img {
    width: 30px;
    height: 30px;
    margin-top: 2px;
    transition: all 0.3s ease;
}

/* KEEP ORIGINAL RECORDING ANIMATION */
button.recording {
    background: crimson;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.6);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(220, 20, 60, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0);
    }
}

/* ONLY ADD THIS: MIC ICON GLOW WHEN VOICE ACTIVE */
#recordBtn.recording.voice-active img {
    animation: micPulse 0.8s infinite alternate;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
}

@keyframes micPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.6));
    }

    100% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
    }
}

/* OPTIONAL: SUBTLE PULSE SPEED INCREASE WHEN VOICE ACTIVE */
#recordBtn.recording.voice-active {
    animation: pulse 1.5s infinite;
    /* Slightly faster pulse */
}

#donate {
    position: absolute;
    bottom: 40px;
    left: 0;
    z-index: 999;
    z-index: 9999;
    background-color: white;
    width: auto;
    height: auto;
    padding: 10px;
    padding-left: 6px;
    padding-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    -webkit-box-shadow: 0px 0px 15px -7px #000000;
    box-shadow: 0px 0px 15px -7px #000000;
    transition: all 0.3s ease;
}

#donate img {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

#helpBtn {
    position: fixed;
    right: 50px;
    top: 25px;
    z-index: 9999;
    background-color: white;
    width: auto;
    height: auto;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-box-shadow: 0px 0px 15px -7px #000000;
    box-shadow: 0px 0px 15px -7px #000000;
    transition: all 0.3s ease;
}

#helpBtn img {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

#settingsBtn {
    position: fixed;
    right: 100px;
    top: 25px;
    border: none;
    z-index: 9999;
    width: fit-content;
    height: fit-content;
    background: none;
    -webkit-tap-highlight-color: transparent;
    background-color: white;
    width: auto;
    height: auto;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-box-shadow: 0px 0px 15px -7px #000000;
    box-shadow: 0px 0px 15px -7px #000000;
    transition: all 0.3s ease;
}

#settingsBtn img {
    width: 20px;
    height: 20px;
    pointer-events: none;
    margin-bottom: 2px;
}

#reloadBtn {
    position: fixed;
    right: 150px;
    top: 25px;
    border: none;
    z-index: 9999;
    width: fit-content;
    height: fit-content;
    background: none;
    -webkit-tap-highlight-color: transparent;
    background-color: white;
    width: auto;
    height: auto;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-box-shadow: 0px 0px 15px -7px #000000;
    box-shadow: 0px 0px 15px -7px #000000;
    transition: all 0.3s ease;
}

#reloadBtn img {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

#helpBtn img,
#settingsBtn img,
#reloadBtn img,
#donate img {
    margin: 0;
    padding: 0;
}

#helpBtn:hover,
#settingsBtn:hover,
#reloadBtn:hover,
#donate:hover {
    opacity: 0.75;
}

#donate:hover {
    padding-left: 12px;
}

/* Toggle button */
#toggleListBtn {
    position: fixed;
    left: 50px;
    top: 20px;
    z-index: 9999;
    background: black;
    width: auto;
    height: auto;
    padding: 12px;
    border: none;
    outline: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.25s ease;
    transform: scale(1.1);
    -webkit-box-shadow: 0px 0px 20px -7px #000000;
    box-shadow: 0px 0px 20px -7px #000000;
}

#toggleListBtn:focus {
    outline: none;
    box-shadow: none;
    -webkit-box-shadow: 0px 0px 20px -7px #000000;
    box-shadow: 0px 0px 20px -7px #000000;
}

#toggleListBtn:active {
    -webkit-box-shadow: 0px 0px 20px -7px #000000;
    box-shadow: 0px 0px 20px -7px #000000;
}

#toggleListBtn img {
    width: 25px;
    height: auto;
    pointer-events: none;
    margin: 0;
    padding: 0;
    filter: blur(0.7px);
}

#echoList {
    position: fixed;
    left: 50px;
    top: 90px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    z-index: 10000;
    overflow-y: auto;
    font-size: 14px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    width: 340px;
    border-radius: 30px;
    margin: auto;
    color: black;
    max-height: 60vh;
    scrollbar-gutter: stable both-edges;
}

/* Custom scrollbar that respects border radius */
#echoList::-webkit-scrollbar {
    width: 3px;
}

#echoList::-webkit-scrollbar-track {
    background: transparent;
    margin: 25px 0;
}

#echoList::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#echoList.hidden {
    display: none;
}

.echo-item {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.no-echoes-msg {
    color: black;
}

.face-marker {
    position: relative !important;
    background: none;
    width: auto;
    height: auto;
    background-image: url("/images/echoe.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.face-marker::before {
    content: none;
}

/* Mood emoji on face markers */
.face-marker.with-plays {
    position: relative;
}

.marker-mood {
    position: absolute;
    top: -10px;
    /* Position above the marker */
    left: -10px;
    /* Position to the left of the marker */
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* For single echoes without play count */
.face-marker:not(.with-plays) {
    position: relative;
}

.face-marker:not(.with-plays) .marker-mood {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Mood emoji in popups */
.popup-mood-emoji {
    font-size: 1.2em;
    vertical-align: middle;
}

.popup-echo-user {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center horizontally */
    gap: 5px;
    text-align: center;
}

.popup-echo-info {
    text-align: center;
    /* Center all content */
}

.popup-echo-date {
    text-align: center;
    /* Center the date and play count */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Mood emoji in list */
.list-mood-emoji {
    font-size: 1.2em;
    vertical-align: middle;
}

.echo-user {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center horizontally */
    gap: 6px;
    text-align: center;
}

.echo-info {
    text-align: center;
    /* Center all content */
}

.echo-details {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center the details */
    gap: 5px;
    text-align: center;
}

.echo-user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-marker {
    background: #4caf50;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.user-marker {
    position: relative;
}

.user-marker::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border: 1px solid #4caf50;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: subtleWave 4s ease-out infinite;
    pointer-events: none;
}

@keyframes subtleWave {
    0% {
        width: 10px;
        height: 10px;
        opacity: 0.4;
    }

    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

.range-circle {
    fill: rgba(0, 0, 0, 0.3);
    stroke: #fff;
    stroke-width: 2;
    stroke-opacity: 0.3;
    transform-origin: center;
}

.loading {
    color: black;
}

.leaflet-control-zoom {
    display: none !important;
}

.leaflet-control-attribution {
    font-size: 10px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: #888 !important;
    padding: 2px 5px !important;
}

.leaflet-control-attribution a {
    color: #aaa !important;
}

.multi-echo-popup {
    max-width: 300px;
    max-height: 400px;
    overflow: visible;
}

.popup-echo-item {
    margin-bottom: 15px;
    text-align: center;
}

.popup-echo-date {
    min-width: 70%;
    color: black;
    margin-bottom: 8px;
    font-family: "Bricolage Grotesque", sans-serif !important;
}

.popup-echo-count {
    color: black;
    margin-top: 5px;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    font-family: "Bricolage Grotesque", sans-serif !important;
}

.leaflet-bottom {
    display: none;
}

.leaflet-popup-content-wrapper {
    border-radius: 30px !important;
}

.leaflet-popup-close-button {
    top: 15px !important;
    right: 15px !important;
    font-size: 25px !important;
}

.leaflet-popup-content-wrapper {
    min-width: 300px !important;
}

/* Play count in markers */
.face-marker.with-plays {
    position: relative;
}

.marker-plays {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    height: max-content;
    background: rgba(255, 255, 255, 1);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    color: #838383;
    padding: 6px 12px;
    padding-bottom: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 11px;
    text-align: center;
}

/* Play count in list */
.echo-details {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.echo-user {
    font-weight: bold;
    color: #333;
    font-family: "Bricolage Grotesque", sans-serif;
}

.popup-echo-date {
    font-weight: 400;
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    font-family: "Bricolage Grotesque", sans-serif;
}

.popup-echo-date img,
.echo-details img {
    width: 15px;
    height: auto;
    vertical-align: middle;
    opacity: 0.6;
}

.popup-echo-user {
    font-weight: bold;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 14px;
}

.controls button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.controls button:disabled:hover {
    transform: none !important;
}

/* System message markers */
.system-message-marker {
    background: none !important;
    border: none !important;
}

.system-marker {
    width: 40px;
    height: 40px;
    margin-top: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

@keyframes float {

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

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

/* System message popup */
.system-message-popup {
    text-align: center;
    padding: 15px;
    min-width: 250px;
    font-family: "Bricolage Grotesque", sans-serif;
}

.system-message-emoji {
    font-size: 2em;
    margin-bottom: 10px;
}

.system-message-text {
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 14px;
}

.system-audio {
    width: 100%;
    margin: 10px 0;
    border-radius: 10px;
}

.system-audio-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Make sure system markers are above other layers */
.system-message-marker {
    z-index: 1000 !important;
}

/* Compass Rose Visualization */
.compass-rose {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 2px solid #333;
    z-index: 1000;
    transition: transform 0.1s ease;
}

.compass-rose::before {
    content: "N";
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    color: red;
    font-size: 12px;
}

.compass-rose::after {
    content: "";
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 2px;
    height: 20px;
    background: #333;
    transform: translateX(-50%);
}

#autoReloadProgress {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

#autoReloadProgress .progress-bar {
    height: 100%;
    width: 0%;
    background: #4caf50;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* Notification System */
#notificationBtn {
    position: fixed;
    right: 200px;
    top: 45px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: black;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    -webkit-box-shadow: 0px 0px 15px -7px #000000;
    box-shadow: 0px 0px 15px -7px #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#notificationBtn:hover {
    opacity: 0.75;
}

#notificationBtn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    margin-bottom: 1px;
}

/* Red dot for local notifications (someone nearby) */
#notificationBtn.has-local-notifications::after {
    content: "";
    position: absolute;
    top: 0px;
    right: 0px;
    width: 10px;
    height: 10px;
    background: #ff4444;
    /* Red */
    border-radius: 50%;
    border: 2px solid white;
    animation: pulseNotification 2s infinite;
}

/* Blue dot for global highlights (curated content) */
#notificationBtn.has-global-highlights::after {
    content: "";
    position: absolute;
    top: 0px;
    right: 0px;
    width: 10px;
    height: 10px;
    background: #2196f3;
    /* Blue */
    border-radius: 50%;
    border: 2px solid white;
    animation: pulseGlobal 3s infinite;
}

/* When both exist - show red (local takes priority) or make it special */
/* When both exist - show red/blue split */
#notificationBtn.has-both::after {
    content: "";
    position: absolute;
    top: -3px;
    right: 0px;
    width: 12px;
    height: 12px;
    background: linear-gradient(90deg, #ff4444 50%, #2196f3 50%);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulseBoth 1.5s infinite;
}

@keyframes pulseGlobal {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(33, 150, 243, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);
    }
}

@keyframes pulseBoth {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

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

#notificationPanel {
    position: fixed;
    bottom: 0;
    left: -100%;
    width: 90%;
    max-width: 400px;
    height: 95%;
    background: white;
    z-index: 10001;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

#notificationPanel.open {
    left: 0;
}

.notification-header {
    padding: 0 1.5rem;
    background: #000000;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    font-size: 1em;
}

#closeNotifications {
    background: rgb(255, 255, 255);
    border-radius: 30px;
    border: none;
    font-size: 0.9em;
    cursor: pointer;
    position: relative;
    width: auto;
    height: auto;
    margin: 10px 0;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
    color: rgb(0, 0, 0);
    width: max-content;
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on iOS */
    touch-action: manipulation;
    /* Improve touch responsiveness */
}

/* Active state for mobile taps */
#closeNotifications:active {
    opacity: 0.6;
    transform: scale(0.95);
}

/* Remove hover effects for mobile - they cause issues */
@media (hover: hover) {
    #closeNotifications:hover::before {
        transform: translateY(-50%) rotate(90deg);
    }

    #closeNotifications:hover {
        opacity: 0.8;
    }
}

.notification-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.notification-content-wrapper {
    padding-left: 10px;
    margin-bottom: 15px;
}

.notification-message {
    font-weight: bold;
    margin-bottom: 4px;
    color: rgb(62, 62, 62);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.notification-user {
    color: #666;
    font-size: 1rem;
    margin-bottom: 3px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 3px 0;
}

.notification-user img {
    width: 15px;
    height: auto;
    vertical-align: middle;
    margin-right: 5px;
    opacity: 0.5;
}

.notification-details {
    color: #666;
    font-size: 0.85rem;
    position: relative;
    display: flex;
    align-items: center;
    padding: 3px 0;
    margin-bottom: 8px;
}

.notification-details img {
    width: 15px;
    height: auto;
    vertical-align: middle;
    margin-right: 5px;
    opacity: 0.5;
}

.notification-audio {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    background-color: rgb(0, 0, 0);
    border-radius: 30px;
    padding: 5px;
    margin-bottom: 15px;
}

.play-sample-btn {
    background: rgba(76, 175, 80, 1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.play-sample-btn:hover {
    background: rgb(64, 152, 67);
}

.play-sample-btn.playing {
    background: #ff4444;
}

.play-sample-btn.playing:hover {
    background: #cc3333;
}

/* Larger play icon with rounded corners */
.play-sample-btn::before {
    content: "";
    width: 22px;
    /* Larger */
    height: 22px;
    /* Larger */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 6v12c0 .2.1.4.3.5.1.1.3.1.4.1.1 0 .3 0 .4-.1l9-6c.2-.1.3-.4.3-.5s-.1-.4-.3-.5l-9-6c-.2-.1-.5-.1-.7 0-.2.1-.3.4-.3.5z" rx="2" ry="2"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Larger stop icon with rounded corners */
.play-sample-btn.playing::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><rect x="6" y="6" width="12" height="12" rx="2" ry="2"/></svg>');
}

.audio-duration {
    font-size: 0.9rem;
    color: #ffffff;
}

.no-notifications {
    text-transform: uppercase;
    text-align: center;
    display: block;
    color: #666;
    padding: 20px;
    font-size: 1rem;
    font-weight: 600;
}

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
}

.notification-overlay.show {
    display: block;
}

/* Manual refresh button in notifications */
.notification-refresh {
    text-align: center;
    padding: 15px;
    border-top: 1px solid #eee;
}

#refreshNotifications {
    background: rgba(0, 0, 0, 1);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    width: max-content;
    height: 40px;
    border-radius: 25px;
    padding: 0 20px 0 40px;
    transition: all 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    margin: auto;
    font-weight: 500;
}

#refreshNotifications::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    margin-top: 0px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234caf50"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.15s ease;
}

#refreshNotifications:hover::before {
    transform: translateY(-50%) rotate(180deg);
}

#refreshNotifications:active::before {
    animation: spinOnce 0.3s ease-in-out;
}

@keyframes spinOnce {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

#refreshNotifications:active {
    transform: scale(0.92);
}

.notification-map-container {
    margin: auto;
}

.notification-map {
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.notification-location-marker {
    background: #ff4444;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.leaflet-container .notification-map {
    background: transparent;
}

.notification-load-more {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #eee;
}

.notification-load-more button {
    background: #4caf50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: "Bricolage Grotesque", sans-serif;
}

.notification-load-more button:hover {
    background: #45a049;
}

.load-more-container {
    padding-top: 10px;
}

.load-more-btn {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 25px;
    padding: 15px 30px;
    border: none;
    color: rgb(59, 59, 59);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: auto;
    width: max-content;
    height: auto;
    font-weight: 600;
}

.load-more-btn:hover {
    background: #d0d0d0;
}

/* Updated Custom Audio Player Styles */
.echo-audio-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: #f0f2f5;
    border-radius: 35px;
    width: 100%;
    max-width: none;
    min-width: auto;
    transition: opacity 0.3s ease;
}

.echo-audio-player.stopping {
    opacity: 0.7;
}

.echo-play-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    /* Hide text content */
    position: relative;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    /* Prevent button from shrinking */
}

.echo-play-btn.loading {
    background: #999;
}

.echo-play-btn.error {
    background: #ff4444;
}

/* Custom play icon using your image */
.echo-play-icon {
    width: 20px;
    height: 20px;
    background-image: url("/images/play-icon.png");
    /* Add your play icon */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Custom pause icon using your image */
.echo-pause-icon {
    width: 20px;
    height: 20px;
    background-image: url("/images/pause-icon.png");
    /* Add your pause icon */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: none;
}

.echo-loading-spinner {
    display: none;
}

.echo-play-btn.playing .echo-play-icon {
    display: none;
}

.echo-play-btn.playing .echo-pause-icon {
    display: block;
}

.echo-play-btn.loading .echo-play-icon,
.echo-play-btn.loading .echo-pause-icon {
    display: none;
}

.echo-play-btn.loading .echo-loading-spinner {
    display: block;
}

.echo-loading-spinner .spinner {
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: echo-spin 1s linear infinite;
}

@keyframes echo-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.echo-audio-visualization {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
    flex-grow: 1;
    /* Take all available space */
    justify-content: center;
    /* Center the waves in the available space */
    min-width: 0;
    /* Allow shrinking */
}

.echo-audio-bar {
    width: 3px;
    background: #65676b;
    border-radius: 1px;
    transition: all 0.3s ease;
    flex: 1;
    /* Make bars flexible to fill space */
    max-width: 4px;
    /* Limit maximum width */
    /* Default heights - will be overridden by JavaScript */
    height: 6px;
    transition: height 0.1s ease;
}

.echo-time-display {
    font-size: 16px;
    color: #65676b;
    min-width: 35px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    /* Prevent time from shrinking */
    text-align: right;
}

/* Minimal circular progress */
.echo-circular-progress {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    /* Added for better positioning */
}

.echo-progress-ring {
    width: 24px;
    height: 24px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center center;
}

.echo-progress-ring-circle {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-width 0.3s ease;
}

.echo-progress-ring-bg {
    stroke: #e0e0e0;
}

.echo-progress-ring-fill {
    stroke: #4caf50;
}

/* On hover, scale only the SVG (which contains both circles) */
.echo-circular-progress:hover .echo-progress-ring {
    transform: scale(3);
    background: white;
    border-radius: 50%;
    margin-left: 15px;
}

/* Make the green progress ring thicker when scaled */
.echo-circular-progress:hover .echo-progress-ring-fill {
    stroke-width: 3px;
    stroke: #4caf50;
}

/* Keep the background ring subtle */
.echo-circular-progress:hover .echo-progress-ring-bg {
    stroke-width: 2px;
    /* Slightly thicker */
}

/* Encouragement Popup - SIMPLE like echo popup */
.encouragement-popup {
    position: fixed;
    bottom: 120px;
    /* Above the record button */
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: black;
    padding: 30px;
    border-radius: 20px;
    max-width: 350px;
    width: 90%;
    z-index: 10000;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    text-align: center;
    font-family: "Bricolage Grotesque", sans-serif;
}

.encouragement-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.encouragement-message {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
}

.encouragement-message b {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.encouragement-buttons {
    display: flex;
    justify-content: center;
}

#closeEncouragement {
    padding: 15px 20px;
    border: none;
    background: rgb(76, 175, 80);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-family: "Bricolage Grotesque", sans-serif;
    min-width: 100%;
    transition: 0.2s;
}

#closeEncouragement:hover {
    background: #45a049;
}

/* Global Highlights Section */
.global-highlights-section {
    position: relative;
}

.global-highlights-header {
    text-align: center;
}

.global-highlights-header h4 {
    text-transform: uppercase;
    display: block;
    color: #666;
    margin-bottom: 12px;
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Simple solid background */
.highlight-content-wrapper {
    margin-bottom: 15px;
    padding-left: 10px;
}

.highlight-message {
    font-weight: bold;
    margin-bottom: 4px;
    color: rgb(62, 62, 62);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.highlight-user {
    color: #666;
    font-size: 1rem;
    margin-bottom: 3px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 3px 0;
}

.highlight-details {
    color: #666;
    font-size: 0.85rem;
    position: relative;
    display: flex;
    align-items: center;
    padding: 3px 0;
}

.highlight-details img {
    width: 15px;
    height: auto;
    vertical-align: middle;
    margin-right: 5px;
    opacity: 0.5;
}

.highlight-player-container {
    margin: 15px 0;
}

.highlight-map-container {
    margin-top: 15px;
}

.highlight-map {
    height: 200px;
    width: 100%;
    overflow: hidden;
}

/* Load More container for global highlights */
.load-more-global-container {
    text-align: center;
    margin: 15px 0;
    padding-top: 10px;
}

/* Local Notifications Section */
.local-notifications-section {
    position: relative;
    margin-top: 35px;
}

.local-notifications-header {
    text-align: center;
}

.local-notifications-header-h4 {
    margin-top: -10px !important;
}

.local-notifications-header h4 {
    text-transform: uppercase;
    display: block;
    color: #666;
    margin-bottom: 12px;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Load More container for local notifications */
.load-more-local-container {
    text-align: center;
    margin: 15px 0;
    padding-top: 10px;
}

/* Style differences for global vs local items */
.global-highlight-item {
    background: radial-gradient(circle at center,
            rgba(33, 150, 243, 0.13) 0%,
            /* Blue center */
            rgba(33, 150, 243, 0.07) 30%,
            /* Fading blue */
            rgba(255, 255, 255, 0.8) 70%,
            /* Becoming white */
            white 100%
            /* White outside */
        );
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.notification-item {
    background: radial-gradient(circle at center,
            rgba(244, 67, 54, 0.15) 0%,
            /* Red center */
            rgba(244, 67, 54, 0.08) 30%,
            /* Fading red */
            rgba(255, 255, 255, 0.8) 70%,
            /* Becoming white */
            white 100%
            /* White outside */
        );
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.margin-left {
    margin-left: 6px;
}

/* Like button for markers */
.echo-like-btn {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    padding-bottom: 5px;
    font-size: 11px;
    color: #838383;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    z-index: 100;
    width: max-content;
    height: max-content;
}

.echo-like-btn.liked .heart-icon {
    filter: invert(32%) sepia(93%) saturate(7482%) hue-rotate(355deg) brightness(104%) contrast(108%);
}

.heart-icon {
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.2s ease;
    vertical-align: baseline;
}

.face-marker .marker-plays {
    margin-bottom: 25px;
    /* Make space for like button */
}

@media only screen and (max-width: 1024px) {
    #echoList {
        width: 340px;
    }
}

@media only screen and (max-width: 768px) {
    #toggleListBtn {
        position: relative;
        margin: 20px auto;
        margin-top: 70px;
        left: 0;
        top: 0;
    }

    #echoList {
        position: relative;
        margin: 20px auto;
        left: 0;
        top: 0;
        width: 80%;
    }

    #helpBtn {
        top: 74px;
        left: auto;
        right: 30px;
    }

    #settingsBtn {
        top: 74px;
        left: auto;
        right: 80px;
    }

    #reloadBtn {
        top: 74px;
        left: 30px;
        right: auto;
    }

    #notificationBtn {
        top: 94px;
        left: 80px;
        right: auto;
    }

    .username-display {
        position: fixed;
        top: 15px;
        right: 30px;
        left: auto;
        font-size: 0.7rem;
    }
}