/* Silksong Interactive Map Custom Styles */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Leaflet Map Customization */
.leaflet-container {
    background: #0f172a !important;
    font-family: inherit !important;
}

.leaflet-popup-content-wrapper {
    background: #1f2937 !important;
    color: #f9fafb !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

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

.leaflet-popup-tip {
    background: #1f2937 !important;
}

.leaflet-control-zoom a {
    background: #374151 !important;
    color: #f9fafb !important;
    border: 1px solid #4b5563 !important;
}

.leaflet-control-zoom a:hover {
    background: #4b5563 !important;
}

/* POI Markers */
.poi-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.poi-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.poi-marker.npc {
    background-color: #3b82f6;
}

.poi-marker.boss {
    background-color: #ef4444;
}

.poi-marker.quest {
    background-color: #f59e0b;
}

.poi-marker.item {
    background-color: #10b981;
}

/* Filter Panel */
.filter-panel {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #374151;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Search Box */
.search-input {
    background: rgba(55, 65, 81, 0.8);
    border: 1px solid #6b7280;
    color: #f9fafb;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Search Suggestions */
.search-suggestions {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #374151;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #374151;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
    color: white;
    text-decoration: none;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(55, 65, 81, 0.8);
    border: 1px solid #6b7280;
    color: #f9fafb;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(75, 85, 99, 0.9);
    border-color: #8b5cf6;
    color: #f9fafb;
    text-decoration: none;
}

.btn-secondary.active {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

/* Cards */
.dark-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.dark-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Hover Effects */
.hover-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Progress Bar */
.progress-bar {
    background: linear-gradient(90deg, #8b5cf6, #f59e0b);
    height: 8px;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Accordion */
.accordion-item {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid #374151;
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-header {
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.accordion-header:hover {
    background: rgba(55, 65, 81, 0.5);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-header.active i {
    transform: rotate(180deg);
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 50;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Pagination */
.pagination-btn {
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #6b7280;
    background: rgba(55, 65, 81, 0.8);
    color: #f9fafb;
}

.pagination-btn:hover {
    background: rgba(75, 85, 99, 0.9);
    border-color: #8b5cf6;
}

.pagination-btn.active {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Lazy Loading */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    z-index: 1000;
}

#back-to-top:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .filter-panel {
        width: calc(100vw - 32px);
        max-width: 320px;
    }
    
    .poi-marker {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .dark-card {
        padding: 16px;
    }
    
    #back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 769px) {
    .desktop-only {
        display: block !important;
    }
    
    .mobile-only {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .filter-panel,
    .mobile-menu,
    #back-to-top,
    .search-suggestions {
        display: none !important;
    }
    
    .dark-card {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .dark-card {
        border: 2px solid #fff;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-spin,
    .animate-pulse {
        animation: none !important;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #8b5cf6;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Custom Utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Map Container Specific */
.map-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(139, 92, 246, 0.1) 50%, transparent 51%);
    pointer-events: none;
    z-index: 1;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Error States */
.error-message {
    background: #ef4444;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.success-message {
    background: #10b981;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #1f2937;
    color: #f9fafb;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    border: 1px solid #374151;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
} 
} 