:root {
    --bg: #0f1115;
    --panel: #171a21;
    --panel-2: #181e25;
    --text: #e6e6e6;
    --muted: #a4a9b6;
    --accent: #2d6cdf;
    --accent-2: #3b7cff;
    --danger: #e85c5c;
    --border-radius: 12px;
    --ring: #254a86;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    height: 100%;
    margin: 0;
}

input,
button {
    background: var(--panel-2);
    border: 1px solid #2a3146;
    border-radius: var(--border-radius);
    color: var(--text);
    padding: .6rem .7rem;
    width: 100%;
}

button {
    background: var(--accent);
    border-color: var(--accent);
    cursor: pointer;
}

label {
    display: grid;
    gap: .35rem;
    margin-bottom: .8rem;
}

a {
    color: var(--accent);
    font-weight: 500;
    opacity: 0.85;
    text-decoration: none;
    transition: opacity 0.15s ease, color 0.15s ease;
}

a:hover {
    color: #5b8ef7;
    opacity: 1;
}

a:active {
    opacity: 0.9;
}

tr:hover {
    background: #1b2129;
}

tr a {
    display: block;
}

tr td {
    padding: 0;
}

td {
    text-align: center;
}

button:disabled {
    background: #2a3146;
    border-color: #2a3146;
    color: var(--muted);
    cursor: default;
    opacity: 0.7;
}

.container {
    display: flex;
    flex-direction: column;
    margin: 24px auto;
    max-width: 420px;
    max-width: 1200px;
    padding: 0 1rem;
    padding: 0 16px 48px;
}

.card {
    align-items: center;
    background: var(--panel);
    border: 1px solid #232839;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 72px;
    padding: 1rem;
}

.err {
    color: var(--danger);
    margin-top: .5rem;
}

.input {
    background: var(--panel-2);
    border: 1px solid #222a33;
    border-radius: 10px;
    color: var(--text);
    outline: none;
    padding: 10px 12px;
    width: 100%;
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(106, 162, 255, 0.15);
}

.results {
    margin-top: 18px;
}

.empty {
    background: var(--panel);
    border: 1px dashed #233042;
    border-radius: 12px;
    color: var(--muted);
    padding: 18px;
    text-align: center;
}

.product-table {
    background: var(--panel);
    border: 1px solid #1e242c;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.product-table th,
.product-table td {
    padding: 10px 14px;
}

.product-table thead {
    background: var(--panel-2);
}

.product-table th {
    border-bottom: 1px solid #2a323d;
    color: var(--muted);
    font-weight: 600;
}

.product-table tr:nth-child(even) {
    background: #14191f;
}

.product-table tr:hover {
    background: #1b2129;
}

.row-link-wrap {
    position: relative;
}

.row-link-wrap .overlay-cell {
    inset: 0;
    margin: 0;
    padding: 0;
    position: absolute;
}


.row-overlay {
    display: block;
    height: 100%;
    text-decoration: none;
    width: 100%;
    z-index: 2;
}

.row-overlay:hover {
    cursor: pointer;
}

.options-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

.options-row>div {
    box-sizing: border-box;
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
}

.full-width {
    width: 100%;
}

.danger {
    background: var(--danger);
    border-color: var(--danger);
}

.loading {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
}

.compact-col { display: none; }
.wide-col { display: table-cell; }

@media (max-width: 800px) {
    .compact-col { display: table-cell; }
    .wide-col { display: none; }
    .card { padding: 0; }
    .container { padding: 0.5rem; }
    .seek-row { flex-direction: column; }
    .seek-row > div { width: 100%; }
}

.input-box {
    display: flex;
    gap: 4px;
    justify-content: space-between;
    width: 100%;
}

.min-box, .max-box {
    width: 50%;
}

input[type="number"] {
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    width: 100%;
}

.range-slider {
    background: #8a8a8a;
    border-radius: 5px;
    height: 5px;
    margin: 30px 0;
    position: relative;
    width: 100%;
}

.slider-track {
    background: var(--accent);
    border-radius: 5px;
    height: 100%;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 100%;
}

/* stack two ranges; block track clicks but allow thumb drag */
.range-slider input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: none;
    height: 5px;
    margin: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: translateY(-50%);
    width: 100%;
}

/* WebKit thumb */
input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    background: var(--accent);
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    height: 25px;
    pointer-events: auto;
    position: relative;
    width: 25px;
    z-index: 2;
}

/* Firefox thumb */
input[type="range"]::-moz-range-thumb {
    background: var(--accent);
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    height: 25px;
    pointer-events: auto;
    position: relative;
    width: 25px;
    z-index: 2;
}

.range-slider * {
    border: none;
}
