:root {
    --sr-bg: #0a0d10;
    --sr-bg2: #0f1419;
    --sr-panel: #131a21;
    --sr-panel2: #18222b;
    --sr-panel3: #10171d;
    --sr-border: #27404d;
    --sr-border-bright: #38b6c9;
    --sr-accent: #46e0ff;
    --sr-accent-soft: #2aa8bd;
    --sr-green: #7CFC00;
    --sr-green-soft: #4e9a1f;
    --sr-warning: #ff7a3d;
    --sr-danger: #ff4d4d;
    --sr-text: #d7e2ea;
    --sr-text-soft: #93a8b5;
    --sr-heading: #eafcff;
    --sr-shadow: 0 0 12px rgba(70, 224, 255, 0.12);
    --sr-shadow-strong: 0 0 20px rgba(70, 224, 255, 0.22);
    --sr-radius: 8px;
    --sr-font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --sr-mono: Consolas, "Courier New", monospace;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(70, 224, 255, 0.03), transparent 180px),
        radial-gradient(circle at top right, rgba(124, 252, 0, 0.05), transparent 20%),
        var(--sr-bg);
    color: var(--sr-text);
    font-family: var(--sr-font);
}

* {
    box-sizing: border-box;
}

/* Firefox shows the number-input spin buttons at all times by default,
   unlike Chromium-based browsers (Chrome/Brave) which only reveal them
   on hover. Firefox has a long-standing bug (Mozilla bugzilla #1787543)
   where toggling -moz-appearance on :hover/:focus no longer re-shows the
   spinner, so that CSS-only trick doesn't work. Instead we permanently
   hide Firefox's native spinner here and replace it with custom overlay
   buttons (see js/numberSpinner.js) that appear on hover, matching the
   Chromium look. */
@supports (-moz-appearance: none) {
    input[type="number"] {
        -moz-appearance: textfield;
    }
}

.sr-num-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 4000;
    opacity: 0;
    transition: opacity 0.08s ease;
}

.sr-num-overlay.sr-num-visible {
    opacity: 1;
    pointer-events: auto;
}

.sr-num-btn {
    position: absolute;
    right: 1px;
    width: 16px;
    height: 50%;
    padding: 0;
    margin: 0;
    border: none;
    background: rgba(70, 224, 255, 0.14);
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-num-btn:hover {
    background: rgba(70, 224, 255, 0.28);
}

.sr-num-btn:active {
    background: rgba(70, 224, 255, 0.4);
}

.sr-num-up {
    top: 0;
    border-top-right-radius: 2px;
}

.sr-num-down {
    bottom: 0;
    border-bottom-right-radius: 2px;
}

.sr-num-up::before,
.sr-num-down::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.sr-num-up::before {
    border-bottom: 4px solid var(--sr-text-soft);
}

.sr-num-down::before {
    border-top: 4px solid var(--sr-text-soft);
}

a {
    color: var(--sr-accent);
    text-decoration: none;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

a:hover {
    color: #9ef0ff;
    text-shadow: 0 0 8px rgba(70, 224, 255, 0.45);
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    color: var(--sr-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(70, 224, 255, 0.2);
    padding-bottom: 0.45rem;
    margin-bottom: 1rem;
}

p {
    color: var(--sr-text);
    line-height: 1.45;
}

small,
.text-muted {
    color: var(--sr-text-soft);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.btn {
    background: linear-gradient(180deg, #182833, #101820);
    color: var(--sr-text);
    border: 1px solid var(--sr-border-bright);
    border-radius: 6px;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.08s ease;
    box-shadow: var(--sr-shadow);
}

button:hover,
.btn:hover {
    background: linear-gradient(180deg, #1c3440, #12202a);
    border-color: #7cefff;
    box-shadow: var(--sr-shadow-strong);
}

button:active,
.btn:active {
    transform: translateY(1px);
}

input,
select,
textarea {
    width: 100%;
    background-color: #0d1318;
    color: var(--sr-text);
    border: 1px solid var(--sr-border);
    border-radius: 6px;
    padding: 0.55rem 0.7rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--sr-accent);
    box-shadow: 0 0 0 2px rgba(70, 224, 255, 0.15);
}

label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--sr-text-soft);
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

hr {
    border: none;
    border-top: 1px solid rgba(70, 224, 255, 0.15);
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: transparent;
}

th,
td {
    padding: 0.6rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid rgba(70, 224, 255, 0.08);
}

th {
    color: var(--sr-heading);
    background-color: rgba(70, 224, 255, 0.05);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

code,
pre,
.mono {
    font-family: var(--sr-mono);
    color: var(--sr-green);
}

/* Shared modal styling used by every dialog in Components/Shared/Dialogs.
   Kept global (rather than per-component scoped CSS) since it's reused
   across AddPcDialog, AddNpcDialog, DiceRollerDialog and RandomNameDialog. */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-window {
    width: 360px;
    background: var(--sr-panel);
    border: 1px solid var(--sr-border-bright);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--sr-shadow-strong);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.30rem;
    padding: 0.2rem 0;
    margin-bottom: 1rem;
    color: #c8d3dd;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.checkbox-row input[type="checkbox"] {
    margin: 0;
}

.checkbox-row label {
    margin: 0;
    cursor: pointer;
}

/* Highlights whichever PC/NPC name input is currently hovered in the output
   panel. Global (not per-component scoped CSS) because it targets an
   <input> rendered inside the NameInput child component, which sits across
   a component boundary from both PcPanel and NpcPanel. */
.combatant-name-highlight {
    color: #7CFC00 !important;
    text-shadow:
        0 0 8px rgba(124, 252, 0, 0.9),
        0 0 18px rgba(124, 252, 0, 0.55);
    border-color: rgba(124, 252, 0, 0.85);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0d1216;
}

::-webkit-scrollbar-thumb {
    background: #203542;
    border-radius: 6px;
    border: 1px solid #294856;
}

::-webkit-scrollbar-thumb:hover {
    background: #2e5363;
}

