/* Pulsar Generator - flat/blocky theme.
 * Palette: item boxes #16292F, general backgrounds #222f3e / black.
 * Font: Rajdhani (Google Fonts linked in index.html, falls back to system sans).
 * NOTE: keep this file plain ASCII so embedded pages without a UTF-8 meta tag
 * cannot mojibake it.
 */
/* Perchance forces [hidden] to win; plain FTP hosts do not - replicate that
 * or search/filter (which uses el.hidden) appears broken off-site:
 * .res-card { display:flex } would otherwise override the UA [hidden] rule. */
[hidden] {
    display: none !important;
}

body {
    zoom: 1;
    text-align: left;
    background: #000000;
    background-image: url("https://graviton.at/outpost/files/backgrounds/src.jpg");
    color: #dfe6f5;
    font-family: "Rajdhani";
    margin: 0;
	font-size: 16px;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    background: black;
    border: 1px solid #292D38;
}

.pulsar-title {
    padding-bottom: 15px;
    font-family: "Rajdhani", sans-serif;
    color: #97ffff;
   /*  text-shadow: 0 0 5px #97ffff, 0 0 10px #97ffff, 0 0 20px #97ffff, 0 0 0px #97ffff; */
    text-transform: capitalize;
    font-size: 2rem;
    margin: 8px 0 2px;
    letter-spacing: 1px;
}

.sub {
    color: #9fb4c8;
    font-size: 1rem;
    margin-bottom: 12px;
}

.sub code {
    color: #97ffff;
}

.toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #000;
    border: 1px solid #141414;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
}

.toolbar label {
    font-size: 0.95rem;
    color: #c3d4e0;
}

.toolbar input[type="number"], .toolbar input[type="text"], .toolbar select {
    background: #000;
    color: #e8eefc;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 22px;
    font-family: inherit;
}

.toolbar input[type="number"] {
    width: 110px;
}

#searchInput {
    width: 220px;
}

button {
    background: #1c487a;
    color: #fff;
    border: 0px solid #97ffff;
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
}

button:hover {
    background: #2b4f00;
}

button.secondary {
    background: #000000;
    border-color: #3a5a66;
    color: #ffffff;
}

button.secondary:hover {
    background: #1e3a44;
}

.stats {
    font-size: 0.9rem;
    color: #9fb4c8;
    margin: 10px 2px;
}

.stats b {
    color: #97ffff;
}

#gridCtn {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.res-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #060a0c;
    border: 0px solid #2c3e46;
    border-radius: 5px;
    padding: 6px 8px;
    flex-direction: column;
}

.res-card.has-value {
    border-color: #97ffff;
    background: #50300a;
}

.res-card .txt {
    flex: 1;
    min-width: 0;
}

.res-card .nm {
    display: block;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
	letter-spacing: 1px;
}

.res-card .df {
    display: block;
    font-family: Verdana;
    font-size: 0.68rem;
    color: #6fa8bd;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

.res-card input {
    width: 84px;
    background: #000;
    color: #e8eefc;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 5px 6px;
    font-size: 20px;
    font-family: inherit;
    text-align: center;
}

.outpanel {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: #000;
    border: 1px solid #3a5a66;
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
}

.outpanel .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    margin-bottom: 8px;
}

.outpanel label {
    font-size: 0.9rem;
    color: #c3d4e0;
}

.outpanel select {
    background: #000;
    color: #e8eefc;
    border: 1px solid #3a5a66;
    border-radius: 10px;
    padding: 6px 8px;
    font-family: inherit;
}

#jsonOutput {
    width: 100%;
    min-height: 180px;
    background: #000;
    color: #b8f5c8;
    border: 1px solid #3a5a66;
    border-radius: 10px;
    font-family: Verdana;
    font-size: 0.75rem;
    padding: 8px;
    box-sizing: border-box;
}

.catgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.cat-card {
    background: #16292f;
    border: 1px solid #2c3e46;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.cat-card b {
    font-family: Verdana;
    font-size: 0.8rem;
    color: #97ffff;
}

.cat-card code {
    color: #9fd8e6;
    font-size: 0.75rem;
}

.cat-card ul {
    max-height: 180px;
    overflow: auto;
    margin: 6px 0 0;
    padding-left: 18px;
    font-family: Verdana;
    font-size: 0.75rem;
}

h2 {
    font-size: 1.2rem;
    margin: 26px 0 4px;
    color: #97ffff;
}

.note {
    font-size: 0.9rem;
    color: #9fb4c8;
    display: none;
}

#loadStatus {
    color: #ffd97a;
    font-size: 0.95rem;
}

.tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 4px;
    flex-wrap: wrap;
}

.tab {
    background: #222;
}

.tab.active {
    background: #2b4f00;
    border-color: #97ffff;
}

#autogenCtn[hidden] {
    display: none;
}

.ag-topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    margin: 10px 0;
}

.ag-topbar input[type="number"],
.ag-topbar input[type="text"] {
    background: #000;
    color: #e8eefc;
    border: 1px solid #3a5a66;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 0.9rem;
    font-family: inherit;
}

.ag-item {
    background: #050919;
    border: 5px solid #000000;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0;
}

.ag-item-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 8px;
}

.ag-item-head b {
    font-size: 1rem;
}

.ag-item-head label {
    font-size: 0.85rem;
    color: #c3d4e0;
    display: flex;
    gap: 4px;
    align-items: center;
}

.ag-item-head input,
.ag-item-head select {
    background: #000;
    color: #e8eefc;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 5px 7px;
    font-size: 23px;
    font-family: inherit;
    font-weight: bold;
}

.ag-item-head input[type="number"] {
    width: 90px;
}

.ag-tmpl {
    font-size: 0.85rem;
    color: #9fb4c8;
    margin: 2px 0 8px;
}

.ag-tmpl code {
    color: #959795;
}

.ag-slot {
    background: #101621;
    border: 0px;
    border-radius: 10px;
    padding: 8px 10px;
    margin: 8px 0;
}

.ag-slot-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
    margin-bottom: 6px;
}

.ag-slot-top label {
    font-size: 0.85rem;
    color: #c3d4e0;
    display: flex;
    gap: 4px;
    align-items: center;
}

.ag-slot-top select {
    background: #000;
    color: #e8eefc;
    border: 1px solid #3a5a66;
    border-radius: 10px;
    padding: 5px 7px;
    font-size: 0.85rem;
    font-family: inherit;
    max-width: 260px;
}

.ag-roll {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 130px 76px minmax(140px, 1fr);
    gap: 8px;
    align-items: center;
    font-size: 12px;
    margin: 4px 0;
    color: white;
    background: black;
}

.ag-roll input[type="range"] {
    width: 100%;
    accent-color: #2b4f00;
}

.ag-roll input[type="number"] {
    background: #000;
    color: gold;
    border: 1px solid #3a5a66;
    border-radius: 10px;
    padding: 4px 6px;
    font-size: 20px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    font-weight: bold;
}

.ag-roll .rv {
    font-family: Verdana;
    color: #b8f5c8;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ag-roll .rl {
    font-family: Verdana;
    color: #a3bd6f;
    overflow: hidden;
    text-overflow: ellipsis;
	text-align: right;
}

.ag-rolldata {
    font-family: Verdana;
    font-size: 0.72rem;
    color: #6fa8bd;
    word-break: break-all;
    margin-top: 6px;
	display: none;
}

.ag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ag-actions button {
    font-size: 0.85rem;
    padding: 5px 10px;
}

@media (max-width: 760px) {
    .ag-roll {
        grid-template-columns: 1fr 110px;
    }

    .ag-roll .rv {
        grid-column: 1 / -1;
    }
}

.ag-bulk {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    background: #000f20;
    border: 1px solid #2c3e46;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0;
}

.ag-bulk label {
    font-size: 0.9rem;
    color: #c3d4e0;
    display: flex;
    gap: 5px;
    align-items: center;
}

.ag-bulk input[type="number"],
.ag-bulk select {
    background: #000;
    color: #e8eefc;
    border: 1px solid #3a5a66;
    border-radius: 10px;
    padding: 5px 7px;
    font-size: 0.9rem;
    font-family: inherit;
}

.ag-bulk input[type="number"] {
    width: 76px;
}

.ag-title {
    font-size: 26px;
    font-weight: 600;
    color: #bdbef9;
    margin: 2px 0 6px;
    background: black;

}

.ag-title small {
    font-weight: 400;
    color: #9fb4c8;
}

#agItemsEl.compact .ag-slot {
    display: none;
}

/* ---- beta UI: output drawer, table view, density (keep ASCII) ---- */
.beta-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #97ffff;
    border: 1px solid #343434;
    padding: 2px 8px 1px 11px;
    margin-left: 10px;
    vertical-align: middle;
    border-radius: 10px;
}

/* density: the Size slider drives --colw on #gridCtn, columns follow */
#gridCtn {
    grid-template-columns: repeat(auto-fill, minmax(var(--colw, 250px), 1fr));
}

/* segmented view toggle */
.seg {
    display: inline-flex;
}

.seg button {
    background: #000;
    color: #cfe3ec;
    padding: 6px 12px;
}

.seg button.on {
    background: #2b4f00;
    color: #fff;
}

#sizeRange {
    width: 110px;
    accent-color: orange;
}

/* table view: dense rows for the 300-1000 item lists */
#tableCtn {
    margin-bottom: 16px;
    overflow-x: auto;
    font-size: 15px;
}

.res-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
}

.res-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #000;
    color: #97ffff;
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #3a5a66;
}

.res-table td {
    padding: 3px 8px;
    border-bottom: 1px solid #141414;
}

.res-table tbody tr:nth-child(even) td {
    background: #050a0c;
}

.res-card.has-value {
    border-color: #97ffff;
    background: #243900;
}

.res-table .nm {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46vw;
}

.res-table .df {
    font-family: Verdana;
    font-size: 0.8em;
    color: #a6a6a6;
}

.res-table input {
    width: 90px;
    background: #000;
    color: #e8eefc;
    border: 1px solid #000;
    padding: 4px 6px;
    font-size: 0.95em;
    font-family: inherit;
    text-align: right;
}

/* output drawer: fixed bottom bar, devtools-like, retractable */
.outpanel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: #000;
    border: 0;
    border-top: 1px solid #3a5a66;
    border-radius: 10px;
    padding: 0;
    margin-top: 0;
}

.out-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 10px;
}

.out-grip {
    height: 12px;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.out-grip::after {
    content: "";
    width: 72px;
    height: 3px;
    background: #2c3e46;
}

.out-grip:hover::after {
    background: #97ffff;
}

.outpanel .row {
    margin-bottom: 8px;
}

.outpanel.collapsed .row {
    margin-bottom: 0;
}

.outpanel.collapsed #jsonOutput,
.outpanel.collapsed .out-grip {
    display: none;
}

#outToggleBtn {
    min-width: 96px;
}

.out-status {
    flex: 1 1 160px;
    min-width: 120px;
    font-size: 0.85rem;
    color: #9fb4c8;
    overflow: hidden;
    text-overflow: ellipsis;
}

#outInfoEl {
    display: none;
}

#jsonOutput {
    min-height: 80px;
}
