body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 900px;
}

.controls {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.control-group {
    margin-bottom: 1rem;
    border-left: 3px solid;
    padding-left: 1rem;
}

.control-group h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.control-group-1 {
    border-color: #dc3545;
}

.control-group-2 {
    border-color: #007bff;
}

.control-row {
    display: grid;
    grid-template-columns: 100px 1fr 70px;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

input[type="range"] {
    width: 100%;
}

/* Custom Slider Styles */
.custom-slider-container {
    width: 100%;
    position: relative;
    height: 50px;  /* Increased height to accommodate labels */
    display: flex;
    align-items: center;
    padding: 0 10px;
    margin: 8px 0;
}

.custom-slider-track {
    position: absolute;
    height: 3px;
    width: calc(100% - 20px);
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    top: 15px;  /* Position the track to leave room for labels below */
}

.control-group-1 .custom-slider-track {
    background-color: rgba(220, 53, 69, 0.1);
}

.control-group-2 .custom-slider-track {
    background-color: rgba(0, 123, 255, 0.1);
}

.custom-slider-bullet {
    position: absolute;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background-color: #ccc;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transform: translateX(-50%);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.15s ease;
    top: 15px;  /* Align with track */
}

.custom-slider-bullet:hover {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.custom-slider-bullet.active {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
}

.custom-slider-label {
    position: absolute;
    font-size: 9px;
    color: #666;
    transform: translateX(-50%);
    text-align: center;
    top: 30px;  /* Position below the bullet */
    white-space: nowrap;
    font-weight: 500;
}

.custom-slider-bullet.active + .custom-slider-label {
    font-weight: 600;
    color: #333;
}

.control-group-1 .custom-slider-bullet {
    background-color: rgba(220, 53, 69, 0.3);
}

.control-group-1 .custom-slider-bullet.active {
    background-color: #dc3545;
}

.control-group-2 .custom-slider-bullet {
    background-color: rgba(0, 123, 255, 0.3);
}

.control-group-2 .custom-slider-bullet.active {
    background-color: #007bff;
}

/* Add special styling for dragging state */
.custom-slider-bullet.dragging {
    z-index: 20;
    cursor: grabbing;
    transform: translateX(-50%) scale(1.5);
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chart {
    margin-bottom: 2.5rem;
}

.zoom-rect-1, .zoom-rect-2 {
    cursor: move;
    pointer-events: all;
    transition: fill 0.1s, stroke-width 0.1s;
}

.zoom-rect-1 {
    fill: rgba(220, 53, 69, 0.2);
    stroke: #dc3545;
    stroke-width: 1.5px;
    stroke-dasharray: 4, 2;
}

.zoom-rect-1:hover {
    fill: rgba(220, 53, 69, 0.25);
}

.zoom-rect-1.dragging {
    fill: rgba(220, 53, 69, 0.35);
    stroke-width: 2px;
    stroke-dasharray: none;
}

.zoom-rect-2 {
    fill: rgba(0, 123, 255, 0.2);
    stroke: #007bff;
    stroke-width: 1.5px;
    stroke-dasharray: 4, 2;
}

.zoom-rect-2:hover {
    fill: rgba(0, 123, 255, 0.25);
}

.zoom-rect-2.dragging {
    fill: rgba(0, 123, 255, 0.35);
    stroke-width: 2px;
    stroke-dasharray: none;
}

.loading-text {
    font-size: 1rem;
    font-style: italic;
    fill: #888;
    text-anchor: middle;
}

#input-container, #selection-container {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin-bottom: 1rem;
}

#zarr-input {
    font-size: 1rem;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 0.5rem;
    width: 350px;
}

#load-button, #plot-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#load-button:hover, #plot-button:hover {
    background-color: #0056b3;
}

.selection-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

select {
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.header {
    background: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #666;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.github-link:hover {
    color: #333;
}

.github-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.plot-another-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: none;
}

.plot-another-btn:hover {
    background-color: #218838;
}

.copy-link-container {
    background: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: none;
    position: relative;
}

.copy-link-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.copy-link-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #656d76;
    margin: 0;
    white-space: nowrap;
}

.copy-link-button {
    background: #f6f8fa;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    color: #656d76;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.copy-link-button:hover {
    background: #eaeef2;
    border-color: #afb8c1;
}

.copy-link-button.copied {
    background: #dafbe1;
    border-color: #2da44e;
    color: #2da44e;
}

.copy-link-content {
    background: white;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    padding: 0.75rem;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 0.6rem;
    color: #1f2328;
    overflow-x: auto;
    white-space: nowrap;
    flex: 1;
}

.copy-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.check-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: none;
}