/* css/styles.css */

/* --- Font Face Declarations --- */
@font-face {
    font-family: 'Rajdhani';
    src: url('../fonts/Rajdhani-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rajdhani';
    src: url('../fonts/Rajdhani-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rajdhani';
    src: url('../fonts/Rajdhani-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- CSS Custom Property for Smooth Gradient Rotation --- */
@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a0f;
    color: #c8c8d0;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0.05em;
    user-select: none;
    -webkit-user-select: none;
}

/* --- Screens --- */
.screen {
    position: absolute;
    inset: 0;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.screen.active {
    display: flex;
    opacity: 1;
}

/* =============================================
   SCREEN 1: MAP SELECTION
   ============================================= */
#screen-select {
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(30, 30, 45, 0.8) 0%, transparent 70%),
        #0a0a0f;
    padding: 48px 20px 40px;
}

#screen-select header {
    text-align: center;
}
#screen-select header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    color: #e8e8f0;
    text-shadow: 0 0 40px rgba(100, 140, 255, 0.2);
}
#screen-select header .subtitle {
    font-size: 0.95rem;
    letter-spacing: 0.6em;
    color: #555;
    margin-top: 8px;
}
#screen-select header .disclaimer {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #3a3a44;
    margin-top: 14px;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    width: 100%;
}

.map-card {
    background: #131318;
    border: 2px solid #222230;
    border-radius: 8px;
    overflow: visible;
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.map-card:hover {
    border-color: #4a6fa5;
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(74, 111, 165, 0.3);
}
/* Swirly glow border on hover */
.map-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 12px;
    padding: 2px;
    --gradient-angle: 0deg;
    background: conic-gradient(
        from var(--gradient-angle) at 50% 50%,
        #1a1a20 0deg,
        #e879f9 70deg,
        #ffffff 150deg,
        #00d4ff 240deg,
        #1a1a20 310deg,
        #1a1a20 360deg
    ) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    filter: blur(1.5px);
    z-index: 1;
}
.map-card:hover::before {
    opacity: 0.85;
    animation: smoothRotate 3s linear infinite;
}
.map-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: #1a1a22;
    border-radius: 6px 6px 0 0;
}
.map-card-label {
    padding: 12px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #b8b8c8;
    text-transform: uppercase;
    border-top: 1px solid #1e1e28;
}

/* =============================================
   SCREEN 2: MAP VIEW
   ============================================= */
#screen-map {
    flex-direction: column;
}

/* --- Map Container (takes remaining space) --- */
#map-container {
    flex: 1;
    position: relative;
    min-width: 0;
}
#leaflet-map {
    width: 100%;
    height: 100%;
    background: #0a0a0f;
}

/* --- Top UI Overlay (back button + filters) --- */
#map-ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0.85) 0%, transparent 100%);
    pointer-events: none;
}
#map-ui-overlay > * {
    pointer-events: auto;
}

.btn-back {
    background: rgba(20, 20, 28, 0.8);
    border: 1px solid #333340;
    color: #999;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    transition: border-color 0.2s, color 0.2s;
}
.btn-back:hover {
    border-color: #4a6fa5;
    color: #fff;
}


/* --- Rarity Filter Pills --- */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-pill {
    background: rgba(20, 20, 28, 0.85);
    border: 1px solid #333340;
    color: #777;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    transition: all 0.2s;
}
.filter-pill:hover {
    border-color: var(--pill-color, #4a6fa5);
    color: var(--pill-color, #fff);
}
.filter-pill.active {
    border-color: var(--pill-color, #4a6fa5);
    color: var(--pill-color, #fff);
    background: rgba(20, 20, 28, 0.95);
    box-shadow: 0 0 10px color-mix(in srgb, var(--pill-color, #4a6fa5) 30%, transparent);
}

/* --- Inventory Bar (bottom) --- */
#inventory-bar {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 12px 20px 16px;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.85) 100%);
    border-top: 1px solid rgba(74, 111, 165, 0.2);
    pointer-events: none;
}

#inventory-slots {
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.inventory-slot {
    width: 56px;
    height: 56px;
    background:
        radial-gradient(circle at 85% 15%, transparent 20%, color-mix(in srgb, var(--slot-color) 60%, transparent) 100%),
        rgba(20, 20, 28, 0.9);
    border: 2px solid var(--slot-color, #2a2a35);
    border-radius: 6px;
    cursor: pointer;
    transition: border-width 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.inventory-slot:hover,
.inventory-slot.active,
.inventory-slot.hotbar-hovered {
    border-width: 3px 3px 10px 3px;
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--slot-color), 0 4px 12px rgba(0, 0, 0, 0.6);
}

.inventory-slot::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -14px;
    border-radius: 10px;
    padding: 2px;
    --gradient-angle: 0deg;
    background: conic-gradient(
        from var(--gradient-angle) at 50% 50%,
        #1a1a20 0deg,
        #e879f9 70deg,
        #ffffff 150deg,
        #00d4ff 240deg,
        #1a1a20 310deg,
        #1a1a20 360deg
    ) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    filter: blur(1.5px);
}
.inventory-slot:hover::before,
.inventory-slot.active::before,
.inventory-slot.hotbar-hovered::before {
    opacity: 0.9;
    animation: smoothRotate 3s linear infinite;
}
.inventory-slot::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at top right, transparent 16px, var(--slot-color) 16px);
    opacity: 0;
    transform: scale(0);
    transform-origin: bottom left;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.inventory-slot:hover::after,
.inventory-slot.active::after,
.inventory-slot.hotbar-hovered::after {
    opacity: 1;
    transform: scale(1);
}

.inventory-slot-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.inventory-slot-rarity {
    display: none;
}

/* --- Leaflet Overrides --- */
.leaflet-container {
    background: #0a0a0f;
}
.leaflet-marker-pane,
.leaflet-marker-icon {
    overflow: visible !important;
}
.leaflet-container.space-station {
    background: #000000;
}
.leaflet-image-layer {
    transition: opacity 0.3s ease-in-out;
}
.leaflet-container.space-station .leaflet-image-layer {
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    ),
    linear-gradient(
        to bottom,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    mask-composite: intersect;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    ),
    linear-gradient(
        to bottom,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-composite: source-in;
}
.leaflet-control-zoom {
    background: rgba(20, 20, 28, 0.85) !important;
    border-color: #2a2a35 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
    border-radius: 6px !important;
}
.leaflet-control-zoom a {
    color: #999 !important;
    border-bottom-color: #2a2a35 !important;
    line-height: 28px !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(74, 111, 165, 0.2) !important;
    color: #fff !important;
}

/* --- Markers --- */
.keycard-marker {
    position: relative;
    cursor: pointer;
    width: 45px;
    height: 68px;  /* Taller to accommodate icon above dot with gap */
    overflow: visible !important;
}
.keycard-marker.selected {
    display: flex !important;
    align-items: flex-end !important;
    overflow: visible !important;
    z-index: 10000 !important;
}
.marker-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
    box-shadow:
        0 0 8px currentColor,
        0 0 12px currentColor,
        inset 0 0 4px currentColor;
    animation: pulse 2s infinite;
    pointer-events: none;
    z-index: 2;
}
.marker-icon-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background:
        radial-gradient(circle at 85% 15%, transparent 20%, color-mix(in srgb, currentColor 60%, transparent) 100%),
        rgba(20, 20, 28, 0.9);
    border: 2px solid currentColor;
    border-radius: 5px;
    cursor: pointer;
    transition: border-width 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 1;
}
.keycard-marker:hover .marker-icon-container,
.keycard-marker.hotbar-hovered .marker-icon-container {
    border-width: 2.4px 2.4px 8px 2.4px;
    transform: translateX(-50%) translateY(-1.6px);
    box-shadow: 0 0 16px currentColor, 0 3.2px 9.6px rgba(0, 0, 0, 0.6);
}
.marker-icon-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -11px;
    border-radius: 8px;
    padding: 1.5px;
    --gradient-angle: 0deg;
    background: conic-gradient(
        from var(--gradient-angle) at 50% 50%,
        #1a1a20 0deg,
        #e879f9 70deg,
        #ffffff 150deg,
        #00d4ff 240deg,
        #1a1a20 310deg,
        #1a1a20 360deg
    ) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    filter: blur(1.2px);
}
.marker-icon-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at top right, transparent 12px, currentColor 12px);
    pointer-events: none;
    z-index: 1;
}
.keycard-marker:hover .marker-icon-container::before,
.keycard-marker.hotbar-hovered .marker-icon-container::before {
    top: -5.4px;
    left: -5.4px;
    right: -5.4px;
    bottom: -11px;
    opacity: 0.9;
    animation: smoothRotate 3s linear infinite;
}
.marker-icon-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 12.8px;
    height: 12.8px;
    background: radial-gradient(circle at top right, transparent 12.8px, currentColor 12.8px);
    opacity: 0;
    transform: scale(0);
    transform-origin: bottom left;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 2;
}
.keycard-marker:hover .marker-icon-container::after,
.keycard-marker.hotbar-hovered .marker-icon-container::after {
    opacity: 1;
    transform: scale(1);
}
.marker-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6.4px;
}
.marker-icon-rarity {
    display: none;
}
/* Selected marker: icon grows in-place, card anchored absolutely to the right */
.keycard-marker.selected .marker-icon-container.selected-icon-grow {
    width: 56px;
    height: 56px;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 3px 3px 10px 3px;
    box-shadow: 0 0 20px currentColor, 0 4px 12px rgba(0, 0, 0, 0.6);
    z-index: 10;
    animation: iconGrowIn 0.35s ease-out both;
}
.keycard-marker.selected .marker-icon-container.selected-icon-grow .marker-icon {
    padding: 8px;
}
.keycard-marker.selected .marker-icon-container.selected-icon-grow::before {
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -13px;
    opacity: 0.9;
    animation: glowFadeIn 0.4s ease-out both, smoothRotate 3s linear 0.2s infinite;
}
.keycard-marker.selected .marker-icon-container.selected-icon-grow::after {
    opacity: 1;
    transform: scale(1);
    animation: notchFadeIn 0.3s ease-out 0.15s both;
}
.marker-card-anchor {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    z-index: 5;
    pointer-events: none;
}
.marker-card {
    background: linear-gradient(180deg, #F5F0E8 0%, #EDE8DF 100%);
    border: none;
    border-radius: 12px;
    min-width: 340px;
    max-width: 384px;
    max-height: 560px;
    overflow: hidden;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.2);
    color: #1a1a1a;
    font-family: 'Rajdhani', 'Arial Narrow', 'Helvetica Neue Condensed', 'Roboto Condensed', sans-serif;
    display: flex;
    flex-direction: column;
    animation: cardSlideIn 0.4s ease-out 0.1s both;
}
.marker-card-tags {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 14px 14px 8px;
}
.marker-card-tag-box {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Rajdhani', 'Arial Narrow', sans-serif;
    letter-spacing: 0.04em;
    padding: 6px 12px 4px;
    border: none;
    border-radius: 3px;
    color: #011017;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    height: 30px;
    text-transform: uppercase;
}
.marker-card-tag-box .tag-key-icon {
    position: relative;
    top: -2px;
    left: -2px;
    width: 22px;
    height: 22px;
}
.marker-card-tags.rarity-epic .marker-card-tag-box {
    color: #ffffff;
}
.marker-card-title {
    font-family: 'Rajdhani', 'Arial Narrow', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 6px 14px 8px;
    line-height: 1.2;
    color: #000000;
    text-transform: uppercase;
    font-stretch: expanded;
}
.marker-card-door {
    width: calc(100% - 28px);
    height: 110px;
    object-fit: cover;
    display: block;
    margin: 4px 14px 8px;
    border-radius: 4px;
    border: 1px solid rgba(139, 115, 85, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.marker-card-body {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.marker-card-section {
    padding: 6px 14px;
}
.marker-card-section-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 3px;
    color: #8a7a68;
    text-transform: uppercase;
}
.marker-card-section-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #2a2420;
}
/* No line-clamp — card grows to fit all text */
.marker-card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
    background: #c9bba8;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: auto;
    flex-shrink: 0;
    min-height: 34px;
}
.marker-card-footer span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    padding: 8px 0;
}
.marker-card-footer .footer-divider {
    width: 1px;
    align-self: stretch;
    background: linear-gradient(180deg, #F5F0E8, #EDE8DF);
    flex-shrink: 0;
}
.marker-card-footer img {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    display: inline-block;
    opacity: 0.8;
}
.marker-label {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    pointer-events: none;
    opacity: 0.9;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.marker-label-name {
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow:
        0 0 4px rgba(0,0,0,0.8),
        0 0 8px rgba(0,0,0,0.6),
        1px 1px 2px rgba(0,0,0,1);
}

.marker-label-image {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border: 2px solid currentColor;
    border-radius: 4px;
    box-shadow:
        0 0 8px rgba(0,0,0,0.8),
        0 0 12px currentColor;
}

.keycard-marker.selected .marker-dot {
    border-color: rgba(255,255,255,0.5);
    animation: pulse-selected 1.5s infinite;
}
.keycard-marker.selected .marker-label {
    opacity: 1;
}
.keycard-marker.selected .marker-label-name {
    font-weight: 700;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}
@keyframes pulse-selected {
    0%, 100% { opacity: 1; box-shadow: 0 0 12px currentColor; }
    50%      { opacity: 0.8; box-shadow: 0 0 20px currentColor; }
}
@keyframes rotateBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes gradientSweep {
    0% { background-position: -100% -100%; }
    100% { background-position: 100% 100%; }
}
@keyframes smoothRotate {
    from {
        --gradient-angle: 0deg;
    }
    to {
        --gradient-angle: 360deg;
    }
}
@keyframes glowFadeIn {
    from { opacity: 0; }
    to { opacity: 0.9; }
}
@keyframes notchFadeIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes iconGrowIn {
    from {
        transform: translateX(-50%) scale(0.75);
        opacity: 0.4;
    }
    to {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Level Toggle --- */
.level-toggle {
    display: flex;
    gap: 6px;
}

/* --- Custom Zoom Control --- */
.custom-zoom {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(15, 15, 20, 0.35);
    border: 1px solid rgba(42, 42, 53, 0.3);
    border-radius: 6px;
    padding: 10px 8px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.custom-zoom:hover {
    background: rgba(20, 20, 28, 0.55);
    border-color: rgba(42, 42, 53, 0.5);
}

.zoom-btn {
    width: 32px;
    height: 32px;
    background: rgba(20, 20, 30, 0.4);
    border: 1px solid rgba(51, 51, 64, 0.4);
    border-radius: 4px;
    color: rgba(153, 153, 153, 0.7);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    user-select: none;
}

.zoom-btn:hover {
    background: rgba(30, 30, 40, 0.7);
    border-color: rgba(74, 111, 165, 0.6);
    color: rgba(255, 255, 255, 0.9);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-slider {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    width: 6px;
    height: 120px;
    background: rgba(30, 30, 40, 0.3);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: rgba(74, 111, 165, 0.4);
    border: 2px solid rgba(90, 127, 181, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 4px rgba(74, 111, 165, 0.2);
}

.zoom-slider::-webkit-slider-thumb:hover {
    background: rgba(90, 127, 181, 0.7);
    border-color: rgba(90, 127, 181, 0.5);
    box-shadow: 0 0 8px rgba(74, 111, 165, 0.4);
}

.zoom-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: rgba(74, 111, 165, 0.4);
    border: 2px solid rgba(90, 127, 181, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 4px rgba(74, 111, 165, 0.2);
}

.zoom-slider::-moz-range-thumb:hover {
    background: rgba(90, 127, 181, 0.7);
    border-color: rgba(90, 127, 181, 0.5);
    box-shadow: 0 0 8px rgba(74, 111, 165, 0.4);
}

/* --- Mobile --- */
@media (max-width: 700px) {
    .map-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #screen-select {
        padding: 32px 16px 24px;
    }

    #map-ui-overlay {
        padding: 8px 12px;
        flex-wrap: wrap;
    }

    #screen-select header h1 {
        font-size: 1.8rem;
    }

    .inventory-slot {
        width: 48px;
        height: 48px;
    }

    #inventory-bar {
        padding: 8px 12px 12px;
    }

    #inventory-slots {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100vw;
    }

    .custom-zoom {
        display: none;
    }
}
