        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background-color: #121212;
            background-image: url('/images/background.jpg');
            background-attachment: fixed;
            background-size: cover;
            color: #e0e0e0;
            line-height: 1.6;
            margin: 0;
            padding: 20px;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: #1e1e1e;
            padding: 25px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        }
        h1, h2, h3 {
            color: #ffffff;
	
            padding-bottom: 0px;
        }
        h1 {
            text-align: center;
            margin-top: 0;
        }
        .upload-section {
            text-align: center;
            padding: 40px;
            border: 2px dashed #444;
            border-radius: 8px;
        }
        input[type="file"] {
            display: none;
        }
        .file-label {
            background-color: #bb86fc;
            color: #1e1e1e;
            padding: 12px 25px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            transition: background-color 0.3s;
        }
        .file-label:hover {
            background-color: #a764fc;
        }
        #file-name {
            margin-top: 15px;
            color: #a0a0a0;
        }
        .path-helper {
            margin-top: 25px;
            font-size: 0.9em;
            color: #a0a0a0;
        }
        .path-container {
            display: flex;
            margin-top: 10px;
        }
.save-path-input {
            flex-grow: 1;
            background-color: #333;
            border: 1px solid #444;
            color: #e0e0e0;
            padding: 8px;
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
            border-left: none;
height: 16px;
        }
        .copy-button {
            background-color: #333;
            border: 1px solid #444;
            color: #e0e0e0;
            height: 34px;
            padding: 0px 12px;
            cursor: pointer;
            border-left: none;
            border-radius: 0 4px 4px 0; /* Rounds the right corners */
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            font-weight: bold;
            transition: background-color 0.2s;
        }
        .copy-button:hover {
            background-color: #444;
        }
        .platform-path {
            display: flex;
            margin-top: 10px;
            align-items: center;
        }
        .platform-icon {
            background-color: #333;
            padding: 4px;
            border: 1px solid #444;
            border-right: none;
            border-radius: 4px 0 0 4px;
            height: 24px;
            width: 24px;
            box-sizing: content-box;
        }
        #error-message {
            color: #cf6679;
            text-align: center;
            margin-top: 10px;
        }
#percentage-breakdown {
background-image: url(/images/B_Bell_Beast.png);
    background-repeat: no-repeat;
    background-position: right -95px bottom 5px;
    background-size: 270px;
}
        .results-section, #percentage-breakdown {
            display: none;
            background-color: #2a2a2a;
            padding: 15px;
            border-radius: 6px;
            margin-top: 20px;
        }
        .missing-category {
            background-color: #2a2a2a;
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 15px;
        }
        .missing-category h3 {
            margin-top: 0;
            color: #e0e0e0;
            display: flex;
            align-items: center;
        }
        .category-icon {
            width: 28px;
            height: 28px;
            margin-right: 12px;
        }
        ul {
            list-style-type: none;
            padding: 0;
        }
        li {
            background-color: #333;
            margin-bottom: 8px;
            padding: 10px 15px;
            border-radius: 4px;
        }
        .completion-message {
            text-align: center;
            font-size: 1.2em;
            color: #03dac6;
            padding: 20px;
            background-color: #2a2a2a;
            border-radius: 6px;
        }
        .completion-percentage {
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            font-size: 1.5em;
            font-weight: bold;
            color: #ffffff;
            padding: 10px;
            background-color: #4b4a4a;
            border-radius: 6px;
            margin-top: 20px;
            margin-bottom: 20px;
        }
        #percentage-breakdown h2 {
            text-align: center;
            color: #ffffff;
        }
    .breakdown-grid {
        display: grid;
        grid-template-columns: auto 1fr; /* Two columns for side-by-side layout */
        gap: 5px 15px; /* Space between rows and columns */
        padding: 10px;
        align-items: center; /* Vertically center label and bar */
    }

    .breakdown-grid img {
        width: 22px;
        height: 22px;
    }

    .breakdown-label {
        display: flex;
        justify-content: flex-end; /* Align label to the right */
        align-items: center;
        gap: 8px;
        font-weight: bold;
        color: #c5c5c5;
        text-align: right;
    }

    .breakdown-bar {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .checkmark-icon {
            width: 20px;
            height: 20px;
        }
        .tool-card, .upgrade-card {
            display: flex;
            background-color: #333;
            border-radius: 4px;
            padding: 15px;
            margin-bottom: 10px;
            gap: 15px;
            align-items: flex-start;
        }
        .tool-info, .upgrade-info {
            flex-grow: 1;
        }
        .tool-info strong, .upgrade-info strong {
            font-size: 1.2em;
            color: #bb86fc;
            display: flex;
            align-items: center;
        }
        .tool-icon {
            width: 64px;
            height: 64px;
            margin-right: 10px;
        }
        .tool-description, .upgrade-description {
            font-size: 0.9em;
            color: #a0a0a0;
            margin: 5px 0;
        }
        .tool-location, .upgrade-location {
            font-size: 0.95em;
            margin: 10px 0 0 0;
        }
.tool-map img, .upgrade-map img {
    max-width: 150px;
    border-radius: 4px;
    border: 1px solid #444;
    cursor: pointer;
}

#image-overlay {
    position: fixed; /* Sit on top of the page */
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9); /* Black background with opacity */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

#overlay-content {
    display: block;
    max-width: 90%;
    max-height: 90vh;
border-color: white;
    border-style: solid;
}

#close-overlay {
    position: absolute;
    top: 20px;
    right: 45px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#close-overlay:hover {
    color: #bbb;
}
.button-icon {
            width: 55px;
            height: 55px;
            margin-right: 10px;
        }
/* Add these new styles for the tabbed interface */
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #444;
    margin-bottom: 20px;
}
.tab-button {
    background-color: transparent;
    border: none;
    padding: 6px 13px;
    cursor: pointer;
    color: #a0a0a0;
    font-size: 1em;
    font-weight: bold;
    transition: color 0.3s, background-color 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Align with the container's border */
    display: flex; /* Add this line */
    align-items: center; /* Add this line */
}
.tab-button:hover {
    color: #e0e0e0;
}
.tab-button.active {
    color: #bb86fc;
    border-bottom-color: #bb86fc;
}
.tab-progress {
    background-color: #333;
    color: #a0a0a0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-left: 8px;
}
.tab-button.active .tab-progress {
    background-color: #bb86fc;
    color: #121212;
}
.tab-content {
    display: none; /* Hide tab content by default */
}
.tab-content.active {
    display: block; /* Show active tab content */
}
.missing-category {
    border: none;
    background-color: transparent;
    padding: 0;
}
.tab-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    vertical-align: middle;
}
.button-extras-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 3px;
    vertical-align: middle;
}
.progress-bar-container {
background-color: #333;
    border-radius: 5px;
    /* border: 1px solid #444; */
    height: 22px;
    flex-grow: 1;
    display: flex;
    gap: 2px;
    /* padding: 2px; */
    /* position: relative; */
    /* overflow: hidden; */
    margin-right: -6px;
}
.progress-segment {
    flex-grow: 1; /* Each segment will take up equal space */
    height: 100%;
    background-color: #4f4f4f; /* Color for an "empty" segment */
    border-radius: 2px;
}

.progress-segment.filled {
background-color: #cdcdcd;
    background-image: url(/images/silk-long2.png);
/* filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5)); */
}
        .checkmark-container {
            width: 20px;  /* Exactly the width of the checkmark icon */
            height: 20px; /* Exactly the height of the checkmark icon */
            flex-shrink: 0; /* Prevents this container from ever shrinking */
        }
.map-link-text {
    color: #bb86fc; /* Use your theme's accent color */
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}
.map-link-text:hover {
    color: #a764fc; /* A slightly different hover color */
}
.inline-map-icon {
    width: 20px;
    height: 20px;
    margin-right: 1px; /* Adds a little space between the icon and the text */
    vertical-align: middle; /* Aligns the icon nicely with the text */
    margin-bottom: 0px; 
}

        /* Map Overlay Styling */
        #map-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9);
            z-index: 5000;
            display: none; /* Initially hidden */
            align-items: center;
            justify-content: center;
        }

        #map-container {
            width: 100%;
            height: 100%;
            background-color: #000000;
        }
        
        #close-map-overlay {
            position: absolute;
            top: 15px;
            right: 35px;
            color: #f1f1f1;
            font-size: 40px;
            font-weight: bold;
            cursor: pointer;
            z-index: 2100; /* Above controls */
            transition: 0.3s;
        }
        #close-map-overlay:hover { color: #bbb; }

        /* Map Controls Panel (inside overlay) */
        #map-controls {
            position: fixed;
            top: 20px;
            left: 20px;
            background-color: rgba(30, 30, 30, 0.95);
            padding: 15px 20px;
            border-radius: 8px;
            border: 1px solid #444;
            z-index: 2100; /* Above map */
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
            max-width: 250px;
        }
        #map-controls h3 { margin: 15px 0 10px 0; color: #bb86fc; text-align: center; border-bottom: 1px solid #444; padding-bottom: 10px; }
        /* .control-group { margin-bottom: 15px; }  */
        .control-group label { display: flex; align-items: center; margin-bottom: 3px; cursor: pointer; font-size: 1em; color: #e0e0e0; }
        .control-group input[type="radio"], .control-group input[type="checkbox"] { margin-right: 10px; accent-color: #bb86fc; }
        .item-label img { width: 22px; height: 22px; margin-right: 8px; }

        /* Custom Leaflet popup style */
        .leaflet-popup-content-wrapper, .leaflet-popup-tip {
            background: #1e1e1e;
            color: #e0e0e0;
            box-shadow: 0 3px 14px rgba(0,0,0,0.4);
        }
        .leaflet-popup-content strong { color: #bb86fc; }

        /* New Map Button Panel on main page */
        #map-button-panel {
            background-color: #2a2a2a;
            padding: 20px;
            border-radius: 6px;
            margin-top: 20px;
            text-align: center;
        }
#view-map-btn, #open-journal-btn, #open-quests-btn {
width: 100%;
font-weight: bold;
display: flex;
align-items: center;
flex-direction: column;
    border-radius: 5px;
background-color: #bb86fc;
    color: #121212;
    padding: 9px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
box-sizing: border-box;
justify-content: center;
}
        .leaflet-marker-icon {
            filter: drop-shadow(0 0 2px rgba(187, 134, 252, 0.6)) brightness(1.25); /* A soft, semi-transparent white glow */
            transition: filter 0.2s ease-in-out; /* Smooth transition for hover effect */
        }

        .leaflet-marker-icon:hover {
            filter: drop-shadow(0 0 4px rgba(255, 255, 255, 1)) brightness(1.25); /* A brighter, larger glow on hover */
            cursor: pointer;
        }
.game-marker-icon {
    filter: none !important; /* Removes the glow effect */
    opacity: 0.75;           /* Sets the transparency */
    transition: opacity 0.2s ease-in-out; /* Smooth hover effect */
}
.game-marker-icon:hover {
    opacity: 1;
}
        .text-button {
            background: none;
            border: none;
            color: #bb86fc; /* Accent color */
            font-family: inherit;
            font-size: inherit; /* Change this line */
            font-weight: bold;
            cursor: pointer;
            padding: 0;
            text-decoration: underline;
            transition: color 0.3s;
        }
.small-text-option {
            margin-top: 12px;
            font-size: 0.8em; /* Controls the size of both text and button */
            color: #a0a0a0;
        }
        .small-text-option > .text-button {
            margin-left: 4px; /* Adds a small space after "or" */
        }
.spool-icon {
height: 22px;
    width: auto !important;
    margin-right: -7px;
}
.upload-section.drag-over {
    border-color: #bb86fc;
    background-color: #2a2a2a;
}
.upload-section.drag-over * {
    pointer-events: none;
}
    #toggle-map-controls {
        display: none;
    }

.top-helper-header {
margin-top: -20px; margin-bottom: -3px;
}

    /* --- MOBILE RESPONSIVENESS --- */
    @media (max-width: 768px) {
.top-helper-header {
margin-top: -12px; margin-bottom: -8px;
}

        body {
            padding: 0px; /* Reduce body padding on mobile */
        }
        .container {
            padding: 15px; /* Reduce main container padding */
        }

        /* --- STYLES FOR MISSING ITEMS --- */
        .tool-card, .upgrade-card {
            flex-direction: column; /* Stack items vertically */
            align-items: center;    /* Center the map image nicely */
        }

        .tool-map img, .upgrade-map img {
            max-width: 100%; /* Allow map image to use the full width of the card */
            margin-top: 15px;  /* Add some space between text and map */
        }

        .tool-info, .upgrade-info {
            width: 100%; /* Ensure the text info section takes full width */
        }
        
        /* --- STYLES FOR MAP OVERLAY & TOGGLE --- */
        /* Show and style the toggle button on mobile */
        #toggle-map-controls {
            display: block;
            position: fixed;
            top: 15px;
            left: 15px;
            z-index: 2101; /* Place it above the controls panel */
            background-color: rgba(30, 30, 30, 0.95);
            border: 1px solid #444;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            cursor: pointer;
            padding: 10px; /* Helps center the SVG icon */
            box-shadow: 0 2px 8px rgba(0,0,0,0.5);
        }

        /* Redefine the map controls panel for mobile */
        #map-controls {
            max-width: 250px;
            height: 100%;
            left: 0;
            top: 0;
            border-radius: 0;
            border-right: 1px solid #444;
            border-left: none;
            border-top: none;
            border-bottom: none;
            /* Hide the panel off-screen by default */
            transform: translateX(-100%); 
            transition: transform 0.3s ease-in-out;
        }

        /* This class will be toggled by JS to show the panel */
        #map-controls.controls-visible {
            transform: translateX(0);
        }
        
        /* --- STYLES FOR PERCENTAGE BREAKDOWN --- */
        .breakdown-grid {
            grid-template-columns: 1fr; /* Switch to a single column layout */
            gap: 10px; /* Adjust the gap for a stacked layout */
        }

        .breakdown-label {
            justify-content: flex-start; /* Align text to the left on mobile */
            text-align: left;
        }

        /* Add some extra space after each progress bar to separate the categories */
        .breakdown-bar {
            margin-bottom: 15px;
        }
    }

/* --- Journal Overlay and Modal --- */
.journal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.journal-modal {
    background-color: #1e1e1e;
    /* background-image: url('/images/background.jpg'); */
    background-size: cover;
    border: 2px solid #555;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.close-journal-btn {
    position: absolute;
top: 0px;
    right: 20px;
    color: #a0a0a0;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close-journal-btn:hover {
    color: #ffffff;
}

/* --- Journal Header & Controls --- */
.journal-header {
    padding: 15px 70px 15px 25px; /* Increased right padding from 25px to 70px */
    border-bottom: 2px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.journal-header h1 {
    margin: 0;
    color: #bb86fc;
    font-size: 1.8em;
}

.journal-controls {
    display: flex;
    gap: 20px;
    align-items: center; /* This ensures all control groups are vertically centered with each other */
    flex-wrap: wrap;     /* Allows controls to wrap to a new line if space is tight */
    justify-content: flex-end; /* Keeps the controls group to the right */
}

.journal-controls .control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.journal-controls label {
    font-weight: bold;
    color: #c5c5c5;
}

.journal-controls select {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px 8px;
    font-family: inherit;
    cursor: pointer;
}

/* --- Journal Body Layout --- */
.journal-body {
    display: flex;
    flex-grow: 1;
    overflow: hidden; /* Prevent scrolling on the body itself */
}

/* --- Enemy Grid --- */
.journal-grid {
    width: 320px; /* CHANGE: Use a fixed width instead of a percentage */
    flex-shrink: 0; /* ADD: Prevent this panel from shrinking */
    padding: 15px;
    overflow-y: scroll;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 15px;
    align-content: start;
    border-right: 2px solid #444;
}

.journal-grid::-webkit-scrollbar { width: 8px; }
.journal-grid::-webkit-scrollbar-track { background: #2a2a2a; }
.journal-grid::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
.journal-grid::-webkit-scrollbar-thumb:hover { background: #777; }

.enemy-icon-container {
    aspect-ratio: 1 / 1;
    background-color: #2a2a2a;
    border: 2px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enemy-icon-container:hover {
    background-color: #3e3e3e;
    border-color: #bb86fc;
    transform: scale(1.05);
}
.enemy-icon-container.active {
    background-color: #4a2d6a;
    border-color: #bb86fc;
}

.enemy-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated; /* For sharp pixel art */
}
.enemy-icon.unseen {
    filter: brightness(0.2) grayscale(1);
}

.kill-count-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background-color: #bb86fc;
    color: #121212;
    font-size: 0.7em;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 5px;
    border: 1px solid #1e1e1e;
}

/* --- Detail View --- */
.journal-detail {
    flex-grow: 1;
    padding: 25px;
    overflow-y: auto;
    position: relative; /* For placeholder centering */
}
.journal-detail-content.hidden {
    display: none;
}
.journal-placeholder.hidden {
    display: none;
}
.journal-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #a0a0a0;
    font-size: 1.5em;
}
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* This is the key change */
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.detail-header h2 {
    color: #fff;
    font-size: 2em;
    margin: 0;
}
.detail-kills {
    background-color: #333;
    padding: 5px 12px;
    border-radius: 5px;
    color: #c5c5c5;
}
#detail-kills-count {
    color: #bb86fc;
    font-weight: bold;
}

.detail-body {
    display: flex;
    gap: 25px;
}
.detail-image-container {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    background-color: #121212;
    border: 1px solid #444;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}
#detail-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.detail-image-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle 125px, #ffffff33 15%, transparent 100%);
    background-position: center;
    background-repeat: no-repeat;
}
.detail-text {
    font-size: 1.1em;
    color: #e0e0e0;
}
.detail-text h3 {
    color: #bb86fc;
    margin-top: 20px;
}
.detail-text hr {
    border: none;
    border-top: 1px solid #444;
    margin: 20px 0;
}
.detail-text p {
    margin: 0;
    line-height: 1.6;
}

/* --- Journal Mobile Responsiveness --- */
@media (max-width: 900px) {

.detail-image-gradient {
    background: radial-gradient(circle 100px, #ffffff33 15%, transparent 100%);
}
    .journal-body {
        flex-direction: column;
    }

    .journal-grid {
        width: 100%;
        max-width: none;
        height: 70px;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 2px solid #444;
	padding: 5px;
        display: flex;
        flex-wrap: nowrap; /* Ensure all items stay in one line */
        overflow-x: scroll; /* Enable horizontal scrolling */
        overflow-y: hidden; /* Disable vertical scrolling */
        grid-template-columns: none;
        align-content: center; /* Vertically center the icons in the container */
    }
    .enemy-icon-container {
        flex-shrink: 0; /* Prevent icons from shrinking */
        width: 55px; /* Give each icon a fixed width */
        height: 55px;
    }
.close-journal-btn { top: -5px; }
    .journal-header {
        flex-wrap: wrap; /* Allow header content to wrap */
padding: 5px 70px 5px 25px;
    }
    .toggle-filters-btn {
        display: none; /* Show the button on mobile */
    }
    .journal-controls {
        display: none; /* Hide filters by default on mobile */
        flex-basis: 100%; /* Make the container take full width when visible */
        flex-direction: column;
        align-items: stretch; /* Make controls fill the width */
        margin-top: 15px;
    }

    .journal-controls.filters-visible {
        display: flex;
    }

    .detail-body {
        flex-direction: column;
        align-items: center;
    }
    .detail-image-container {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .journal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
padding-right: 60px;
    }
    .journal-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .journal-modal {
        height: 100%;
        width: 100%;
        border-radius: 0;
        border: none;
    }
}

/* ADD THIS NEW CSS RULE */
#journal-search {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px 8px;
    font-family: inherit;
}

.detail-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.stat-item {
    background-color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    width: fit-content; /* Make the HP box only as wide as its content */
}
.stat-item strong {
    color: #c5c5c5;
}

/* A container to arrange the damage panels horizontally */
.damage-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Sets the space between each panel */
    margin-top: 5px; /* Adds a little space below the "Needle Damage" header */
}

/* Styling for each individual damage number panel */
.damage-panel {
    background-color: #333;
    border-radius: 4px;
    padding: 8px 12px;
    min-width: 30px; /* Ensures panels have a consistent minimum size */
    text-align: center; /* Centers the number inside the panel */
    font-weight: bold;
    color: #e0e0e0;
}


.toggle-filters-btn {
    display: none; /* Hidden on desktop */
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toggle-filters-btn svg {
    margin-bottom: 2px;
}
.detail-left-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Creates nice spacing between the image and the button */
    flex-shrink: 0; /* Prevents this panel from shrinking */
}
/* --- Quest Log --- */
.quests-list {
    width: 350px;
    flex-shrink: 0;
    padding: 15px;
    overflow-y: auto;
    border-right: 2px solid #444;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quest-list-item {
    padding: 10px 15px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 12px;
}
.quest-list-item:hover {
    background-color: #3e3e3e;
    border-color: #bb86fc;
}
.quest-list-item.active {
    background-color: #4a2d6a;
    border-color: #bb86fc;
}
.quest-list-item.completed {
    color: #a0a0a0;
}
.quest-list-item.completed .quest-list-name {
    text-decoration: line-through;
}
.quest-status-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.quest-list-name {
    font-weight: bold;
}

/* Quest Detail specific styles */
#quest-detail-status {
    font-weight: bold;
    padding: 5px 12px;
}
#quest-detail-status.status-completed {
    background-color: #03dac6;
    color: #121212;
}
#quest-detail-status.status-active {
    background-color: #bb86fc;
    color: #121212;
}

#quest-detail-objectives ul, #quest-detail-reward ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}
#quest-detail-objectives li, #quest-detail-reward li {
    background-color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 6px;
}
#quest-detail-reward p {
    background-color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

@media (max-width: 900px) {
    .quests-list {
        width: 100%;
        height: 120px;
        border-right: none;
        border-bottom: 2px solid #444;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .quest-list-item {
        flex-shrink: 0;
        width: 250px;
    }
}
/* --- Quest Log Detail View --- */
.quest-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 5px 20px;
    background-color: #333;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.quest-details-grid code {
    background-color: #121212;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

.quest-section {
    margin-bottom: 20px;
}
.quest-section h3 {
    color: #bb86fc;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 10px;
}

.quest-description-block {
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #bb86fc;
    padding: 10px 15px;
    margin: 0;
    font-style: italic;
    color: #c5c5c5;
}

.quest-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.quest-section li {
    background-color: #333;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 6px;
}

.requirement-group {
    border: 1px solid #555;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    background-color: #2a2a2a;
}
.requirement-group h4 {
    margin-top: 0;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
    font-size: 1.1em;
}
.requirement-group h5 {
    margin-top: 15px;
    margin-bottom: 5px;
    color: #c5c5c5;
}
.req-badge {
    font-size: 0.75em;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
    margin-left: 10px;
    white-space: nowrap;
    float: right;
}
.req-badge.required { background-color: #cf6679; }
.req-badge.optional { background-color: #6c757d; }
.quest-value { font-size: 0.9em; color: #a0a0a0; margin-left: 10px; }

.quest-section h5 {
    color: #c5c5c5;
    margin-top: 15px;
    margin-bottom: 5px;
}
.quest-objective {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.quest-objective.completed-objective .objective-text {
    color: #a0a0a0;
    text-decoration: line-through;
}
.objective-condition {
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
}
.objective-condition code {
    background-color: #1e1e1e;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.quest-requirement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.quest-requirement.completed-requirement span {
    color: #a0a0a0;
    text-decoration: line-through;
}
.status-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 5px;
}
#quest-header-badges {
    display: flex;
    gap: 10px; /* Adds space between the bubbles */
    align-items: center;
}

/* Base style for the new quest type bubble */
.quest-type-badge {
    font-size: 0.9em;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 5px;
    color: #121212; /* Dark text for light backgrounds */
    text-shadow: none;
    display: flex;
    align-items: center;
    gap: 8px; /* Adds space between the icon and text */
}
.quest-type-badge img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
/* Specific colors for each quest type */
.quest-type-badge { background-color: #939393; }
.quest-type-badge[data-type="Wayfarer"] { background-color: #ECCA7A; }
.quest-type-badge[data-type="Hunt"] { background-color: #EC837A; }
.quest-type-badge[data-type="Gather"] { background-color: #8EECB8; }
.quest-type-badge[data-type="Steel Sentinel"] { background-color: #BFBFBF; }
.quest-type-badge[data-type="Grand Hunt"] { background-color: #EC837A; }
.quest-type-badge[data-type="Donate"] { background-color: #E9A885; }
.quest-type-badge[data-type="Journal"] { background-color: #F597C1; }
.quest-type-badge[data-type="Courier"] { background-color: #C77851; }
.quest-type-badge[data-type="Herald"] { background-color: #FF9846; }
.quest-type-badge[data-type="Sprint"] { background-color: #5B96C7; }

.quest-list-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
    /* Fine-tunes spacing between icon and text */
    margin-right: -2px; 
}

.quest-list-item.unavailable {
    color: #888;
}
.quest-list-item.unavailable .quest-list-name {
    text-decoration: line-through;
}
.quest-link-button {
    background: none;
    border: none;
    color: #bb86fc; /* Your theme's accent color */
    font-family: inherit;
    font-size: inherit;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.3s;
    text-align: left; /* Ensures it aligns correctly within the list */
}
.quest-link-button:hover {
    color: #a764fc; /* A slightly different hover color */
}
.quest-interaction-item {
    display: inline-flex; /* Allows the icon and text to sit side-by-side */
    align-items: center;  /* Vertically aligns the icon with the text */
    gap: 4px;             /* Creates space between the icon and the text */
    vertical-align: middle; /* Aligns the entire group with surrounding text */
}
.quest-interaction-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0; /* Prevents the icon from shrinking */
}
.requirement-group-or {
    border: 1px solid #555;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    background-color: rgba(0,0,0,0.15);
}

.requirement-group-or h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #c5c5c5;
    font-size: 1.1em;
}

.or-separator {
    text-align: center;
    font-weight: bold;
    color: #a0a0a0;
    margin: 20px 0;
    display: flex;
    align-items: center;
}

.or-separator::before,
.or-separator::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: #444;
    margin: 0 15px;
}
.quest-list-item.is-sub-quest {
    margin-left: 25px; /* This creates the indentation */
    position: relative; /* Needed for the pseudo-element */
}

/* Adds a '└─' symbol before the sub-quest for a classic tree view */
.quest-list-item.is-sub-quest::before {
    content: '└─';
    position: absolute;
    left: -20px; /* Positions the symbol in the new margin space */
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: bold;
    font-size: 1.2em;
}
/* A new container to hold the name and location, allowing them to stack vertically */
.quest-list-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows this container to fill the remaining space */
}

/* The new style for the location text itself */
.quest-list-location {
    font-size: 0.8em;
    font-weight: normal;
    color: #a0a0a0; /* A slightly dimmer color */
    margin-top: 2px;
}
.detail-location-text {
    font-size: 0.9em;
    font-style: italic;
    color: #a0a0a0;
    font-weight: normal;
    /* This creates a small, natural space below the title */
    margin: 2px 0 0 2px;
}
#quest-map-container {
    background-color: #000000;
}