body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

#mainContent {
    width: 100%;
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playground-view, .voyager-view, .table-view {
    height: 100%;
    width: 100%;
    flex-grow: 1;
    position: relative;
    overflow: auto;
    padding: 0;
}

.content-wrapper.voyager-active .playground-view,
.content-wrapper.voyager-active .table-view {
    display: none;
}

.content-wrapper.voyager-active .voyager-view {
    display: block;
    height: 100%;
}

.content-wrapper.table-active .playground-view,
.content-wrapper.table-active .voyager-view {
    display: none;
}

.content-wrapper.table-active .table-view {
    display: block;
    height: 100%;
    padding: 15px;
}

/* Voyager Controls Styling - Focus on making them work */
.voyager-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 20; /* High z-index */
    display: flex;
    flex-direction: column;
    gap: 5px;
    visibility: visible;
    opacity: 1;
    pointer-events: all; /* Ensure mouse events are captured */
}

/* --- ULTRA-AGGRESSIVE INPUT RESET AND STYLING --- */
/* Target all input types directly within voyager-controls */
.voyager-controls input {
    /* Hard reset common problematic properties */
    all: unset; /* This resets ALL properties to their initial value */
    box-sizing: border-box !important; /* Re-apply box-sizing */

    /* Force visibility and interaction */
    display: inline-block !important; /* Use inline-block for better label alignment */
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;

    /* Basic common styling */
    margin: 0 !important;
    padding: 0 !important;
    font-family: inherit; /* Inherit font from body */
    font-size: 0.9em;
}

/* Specific styling for range input */
.voyager-controls input[type="range"] {
    width: 100px !important;
    height: 15px !important;
    background: #eee !important;
    border-radius: 8px !important;
    border: none !important; /* No border for the track */
    /* Re-enable appearance for track/thumb styling */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.voyager-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    cursor: grab;
    margin-top: -3px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.voyager-controls input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.voyager-controls input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.voyager-controls input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    cursor: pointer;
}

/* Specific styling for checkbox input */
.voyager-controls input[type="checkbox"] {
    width: 18px !important; /* Explicit width */
    height: 18px !important; /* Explicit height */
    border: 2px solid #555 !important; /* Visible border */
    border-radius: 4px !important;
    background-color: #fff !important;
    vertical-align: middle;
    flex-shrink: 0;
    /* Re-enable appearance if needed by specific browser for default checkbox rendering */
    /* appearance: checkbox !important; */ /* Try this if nothing else works, but it might interfere with custom checkmark */
}

/* Custom checkmark for checkbox */
.voyager-controls input[type="checkbox"]:checked {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.voyager-controls input[type="checkbox"]:checked::before {
    content: '✔';
    display: block;
    color: #fff;
    text-align: center;
    line-height: 16px;
    font-size: 14px;
    font-weight: bold;
}


/* Basic table styling for readability */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9em;
}

.data-table th, .data-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.data-table th {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tr:hover {
    background-color: #e9e9e9;
}