* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><circle cx="6" cy="6" r="6" fill="%233b82f6"/></svg>'), auto;
}
* {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><circle cx="6" cy="6" r="6" fill="%233b82f6"/></svg>'), auto !important;
}
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out;
}
.loading-content {
    text-align: center;
    color: #f1f5f9;
}
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 8px;
}
.spinner-ring {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    animation: spin 1.2s ease-in-out infinite;
}
.spinner-ring:nth-child(2) {
    animation-delay: 0.2s;
}
.spinner-ring:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes spin {
    0%, 40%, 100% {
        transform: scale(0.4);
        opacity: 0.5;
    }
    20% {
        transform: scale(1);
        opacity: 1;
    }
}
.loading-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #f1f5f9;
}
.loading-subtitle {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
    opacity: 0.8;
}
.map-container {
    height: 100vh;
    width: 100vw;
    position: relative;
    display: flex;
    flex-direction: column;
}
.map-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}
.map-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.map-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}
.story-map {
    flex: 1;
    width: 100%;
    height: calc(100vh - 120px);
    z-index: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}
.map-container {
    transition: opacity 0.2s ease-in-out;
}
.section-indicator {
    transition: opacity 0.2s ease-in-out;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.leaflet-container {
    animation: fadeInScale 0.6s ease-out;
}
.hotspot {
    transition: all 0.3s ease-in-out;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="none"><circle cx="4" cy="4" r="4" fill="%233b82f6"/></svg>'), pointer !important;
}
.hotspot:hover {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" viewBox="0 0 6 6" fill="none"><circle cx="3" cy="3" r="3" fill="%233b82f6"/></svg>'), pointer !important;
    transition: cursor 0.3s ease-in-out;
}
.hotspot .step {
    transition: all 0.3s ease-in-out;
}
.indicator-item {
    transition: all 0.3s ease-in-out;
}
.indicator-item.active {
    animation: fadeInScale 0.4s ease-out;
}
.hotspot .step {
    position: absolute;
    top: 60px; 
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 700;
    color: #000000;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.95);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.2);
    white-space: nowrap;
}
.section-indicator {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    padding: 16px 12px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    min-width: 180px;
}
.indicator-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="none"><circle cx="4" cy="4" r="4" fill="%233b82f6"/></svg>'), pointer !important;
}
.indicator-item:hover {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" viewBox="0 0 6 6" fill="none"><circle cx="3" cy="3" r="3" fill="%233b82f6"/></svg>'), pointer !important;
    transition: cursor 0.3s ease-in-out;
}
.indicator-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #64748b;
    opacity: 0.6;
    transition: all 0.2s ease;
}
.indicator-item.active {
    color: #f1f5f9;
    background: rgba(71, 85, 105, 0.3);
}
.indicator-item.active .dot {
    background: #3b82f6;
    opacity: 1;
}
.indicator-item:hover {
    background: rgba(71, 85, 105, 0.2);
    color: #f1f5f9;
    transform: translateX(2px);
}
.indicator-item:not(.active):hover {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}
.modal-content {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 80vh;
    overflow-y: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    opacity: 0;
    transition: transform 300ms ease, opacity 300ms ease;
    display: flex;
    flex-direction: column;
}
.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 2001;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="none"><circle cx="4" cy="4" r="4" fill="%233b82f6"/></svg>'), pointer !important;
    background: rgba(0, 0, 0, 0.5);
    transition: cursor 0.3s ease-in-out;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.close:hover {
    background: rgba(220, 38, 38, 0.8);
    transform: scale(1.1);
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" viewBox="0 0 6 6" fill="none"><circle cx="3" cy="3" r="3" fill="%233b82f6"/></svg>'), pointer !important;
}
#modal-body {
    padding: 40px;
    color: white;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
}
#modal-body::-webkit-scrollbar {
    display: none;
}
.modal.show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.modal h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: #f8fafc;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    border-bottom: 2px solid #334155;
    padding-bottom: 15px;
}
.modal h3 {
    font-size: 1.6rem;
    margin: 30px 0 18px 0;
    color: #e2e8f0;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.modal p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.modal ul {
    margin: 15px 0;
    padding-left: 20px;
}
.modal li {
    margin-bottom: 8px;
    line-height: 1.5;
}
.modal img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.modal .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.modal .image-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}
.leaflet-popup.formal-popup {
    animation: popupAppear 0.4s ease-out;
}
.leaflet-popup.formal-popup .leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    transform: scale(0.8);
    animation: popupScale 0.4s ease-out forwards;
}
.leaflet-popup.formal-popup .leaflet-popup-content {
    margin: 0;
}
.popup-content { padding: 18px 20px; }
.popup-header {
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 10px;
}
.leaflet-popup-tip {
    background: #1e293b;
}
@keyframes popupAppear {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes popupScale {
    0% { transform: scale(0.8); }
    100% { transform: scale(1); }
}
.hotspot {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.9) 0%, rgba(185, 28, 28, 0.85) 100%);
    box-shadow: 0 3px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.hotspot::before {
    content: "";
    position: absolute;
    width: 76px;
    height: 76px;
    border-radius: 12px;
    border: 1px solid currentColor;
    opacity: 0.2;
    animation: pulse 3s infinite;
}
.hotspot::after {
    content: "";
    position: absolute;
    width: 96px;
    height: 96px;
    border-radius: 16px;
    border: 1px solid currentColor;
    opacity: 0.1;
    animation: pulse 3s infinite 1.5s;
}
.hotspot:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
    border-color: rgba(255, 255, 255, 1);
}
.hotspot.dugong { 
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.9) 0%, rgba(185, 28, 28, 0.85) 100%);
}
.hotspot.turtle { 
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.9) 0%, rgba(185, 28, 28, 0.85) 100%);
}
.hotspot.dolphin { 
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.9) 0%, rgba(185, 28, 28, 0.85) 100%);
}
.hotspot.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9) 0%, rgba(22, 163, 74, 0.85) 100%);
    border-color: rgba(34, 197, 94, 0.8);
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.1); opacity: 0.05; }
    100% { transform: scale(1); opacity: 0.2; }
}
.marker-cluster-small {
    background: rgba(30, 58, 138, 0.8);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 50%;
}
.marker-cluster-small div {
    background: transparent;
}
.marker-cluster-medium {
    background: rgba(2, 132, 199, 0.8);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 50%;
}
.marker-cluster-medium div {
    background: transparent;
}
.marker-cluster-large {
    background: rgba(29, 78, 216, 0.85);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 50%;
}
.marker-cluster-large div {
    background: transparent;
}
@media (max-width: 768px) {
    .map-header h1 {
        font-size: 2rem;
    }
    .map-header p {
        font-size: 1rem;
    }
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    #modal-body {
        padding: 20px;
    }
    .modal h2 {
        font-size: 1.5rem;
    }
}