/* ======================================================
   WANDERLORE - Stylesheet & Cartographic Dark Aesthetics
   ====================================================== */

body {
    background:
        linear-gradient(180deg, rgba(5, 7, 12, 0.82) 0%, rgba(5, 7, 12, 0.9) 28%, rgba(5, 7, 12, 0.96) 100%),
        url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80') center center / cover no-repeat fixed;
    filter: saturate(1.08) contrast(1.08);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.28), transparent 20%),
        radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.18), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(8, 15, 23, 0.7), transparent 46%);
    pointer-events: none;
    z-index: 0;
}

main,
header,
#personalized-banner,
#view-explore,
#view-commons,
#view-journey,
#view-passport {
    position: relative;
    z-index: 1;
}

/* Custom Scrollbars */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-track {
    background: #0b0f17;
    border-radius: 4px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Nav Button Active State */
.nav-btn {
    color: #94a3b8;
    background: transparent;
}
.nav-btn:hover {
    color: #f8fafc;
    background: #111726;
}
.nav-btn.active {
    color: #fbbf24;
    background: rgba(23, 32, 51, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.12), inset 0 0 12px rgba(245, 158, 11, 0.08);
}

.platform-hero {
    background:
        linear-gradient(135deg, rgba(7, 10, 16, 0.72), rgba(20, 27, 38, 0.6)),
        url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1200&q=80') center center / cover no-repeat;
    border-color: rgba(245, 158, 11, 0.22);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.95), inset 0 0 30px rgba(245, 158, 11, 0.06);
}

#personalized-banner {
    background:
        linear-gradient(135deg, rgba(8, 11, 18, 0.78), rgba(15, 23, 42, 0.72)),
        url('https://images.unsplash.com/photo-1470770841072-f978cf4d019e?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85), inset 0 0 24px rgba(245, 158, 11, 0.1);
}

/* Category Filter Pills */
.cat-pill {
    background: #0b0f17;
    color: #94a3b8;
    border: 1px solid #1e293b;
    white-space: nowrap;
}
.cat-pill:hover {
    border-color: #334155;
    color: #e2e8f0;
}
.cat-pill.active {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.1);
}

/* Leaflet Customization for Dark Cartography */
.leaflet-container {
    background: #070a10 !important;
    font-family: 'Space Mono', monospace !important;
}

.leaflet-control-zoom a {
    background-color: #0b0f17 !important;
    color: #cbd5e1 !important;
    border-color: #1e293b !important;
}
.leaflet-control-zoom a:hover {
    background-color: #172033 !important;
    color: #fbbf24 !important;
}

.leaflet-popup-content-wrapper {
    background: #0b0f17 !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 12px 14px !important;
    line-height: 1.4 !important;
}

.leaflet-popup-tip {
    background: #0b0f17 !important;
    border: 1px solid #334155 !important;
}

/* Custom Pulsing Leaflet Markers */
.custom-sanctuary-pin {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-beacon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.pin-beacon:hover {
    transform: scale(1.25);
}

.pin-beacon .pin-core {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f59e0b;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px #f59e0b;
    z-index: 2;
}

.pin-beacon .pin-pulse {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.4);
    animation: pin-pulse-anim 2s infinite ease-out;
    z-index: 1;
}

.pin-beacon.protected .pin-core {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}
.pin-beacon.protected .pin-pulse {
    background: rgba(16, 185, 129, 0.4);
}

@keyframes pin-pulse-anim {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Card hover glow */
.spot-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.spot-card:hover {
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.6);
}

/* Match Percentage Glowing Tag */
.match-tag {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(16, 185, 129, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

/* Toast animations */
.toast-visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* Bookmark Active Color */
.bookmark-active {
    color: #f59e0b !important;
    fill: #f59e0b !important;
}

/* Lorekeeper chat */
.lorekeeper-chat {
    animation: lorekeeper-rise 0.45s ease-out both;
}
.chat-bubble {
    max-width: 90%;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.72rem;
    line-height: 1.55;
}
.chat-bubble-assistant {
    margin-right: auto;
    color: #cbd5e1;
    background: #111726;
    border: 1px solid rgba(51, 65, 85, 0.8);
}
.chat-bubble-user {
    margin-left: auto;
    color: #06090e;
    background: #fbbf24;
}
@keyframes lorekeeper-rise {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
    .lorekeeper-chat { bottom: 1rem; left: 1rem; }
}
