@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

body {
    font-family: 'Noto Sans TC', sans-serif;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.drag-active {
    border-color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* Smooth fade in */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Thumbnail active state */
.thumb-active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Sticky Column (First column) */
.sticky-col {
    position: sticky;
    left: 0;
    background-color: #1e293b;
    z-index: 30;
}

/* Sticky Header (First row) */
.sticky-header th {
    position: sticky;
    top: 0;
    background-color: #1e293b;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sticky-header th.sticky-col {
    z-index: 40;
}

/* Lightbox Image */
.lightbox-img {
    position: absolute;
    /* Vital for correct transform positioning */
    /* Removed max-width/height to prevent aspect ratio distortion during zoom */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    cursor: grab;
    transform-origin: center center;
    will-change: transform, left, top, width, height;
    /* Prevent user selection */
    user-select: none;
    -webkit-user-select: none;
    max-width: none !important;
    max-height: none !important;
}

.lightbox-img:active {
    cursor: grabbing;
}

/* Minimap styles */
#lb-minimap-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 160px;
    height: 160px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 60;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
    /* Indicate clickable */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#lb-minimap-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.7;
    pointer-events: none;
    /* Let clicks pass to container */
}

#lb-minimap-viewport {
    position: absolute;
    border: 2px solid #3b82f6;
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    /* Let clicks pass to container */
}