Redesign character window to match TreeStats layout and style

Replace the AC stone-themed single-scroll character window with a TreeStats-
style tabbed interface. Two side-by-side tab containers: left (Attributes,
Skills, Titles) and right (Augmentations, Ratings, Other), plus an Allegiance
section below. Exact TreeStats color palette (#000022 bg, #af7a30 gold
borders, purple specialized, teal trained). Backend accepts new properties
and titles fields in character_stats message for JSONB storage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
erik 2026-02-27 14:39:20 +00:00
parent 45cedd0ec9
commit 176fb020ec
3 changed files with 797 additions and 279 deletions

View file

@ -1593,202 +1593,258 @@ body.noselect, body.noselect * {
/* ============================================
Character Window - AC Game UI Replica
============================================ */
/* === TreeStats-themed Character Window === */
.character-window {
width: 450px !important;
height: 650px !important;
width: 740px !important;
height: auto !important;
min-height: 300px;
max-height: 90vh;
}
.character-window .window-content {
background-color: #000022;
color: #fff;
font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
overflow-y: auto;
padding: 10px 15px 15px;
}
.ac-panel {
/* -- Character header (name, level, title, server, XP/Lum) -- */
.ts-character-header {
margin-bottom: 10px;
}
.ts-character-header h1 {
margin: 0 0 2px;
font-size: 28px;
color: #fff;
font-weight: bold;
}
.ts-character-header h1 span.ts-level {
font-size: 200%;
color: #fff27f;
float: right;
}
.ts-character-header .ts-subtitle {
font-size: 85%;
color: gold;
}
.ts-xplum {
font-size: 85%;
margin: 6px 0 10px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0 20px;
}
.ts-xplum .ts-left { text-align: left; }
.ts-xplum .ts-right { text-align: right; }
/* -- Tab containers (two side-by-side) -- */
.ts-tabrow {
display: flex;
flex-direction: column;
height: 100%;
background: linear-gradient(135deg, #1a1410 0%, #2a2218 50%, #1a1410 100%);
color: #c8b89a;
font-size: 13px;
gap: 20px;
flex-wrap: wrap;
}
.ts-tabcontainer {
width: 320px;
margin-bottom: 15px;
}
.ts-tabbar {
height: 30px;
display: flex;
}
.ts-tab {
float: left;
display: block;
padding: 5px 5px;
height: 18px;
font-size: 12px;
font-weight: bold;
color: #fff;
text-align: center;
cursor: pointer;
user-select: none;
}
.ts-tab.active {
border-top: 2px solid #af7a30;
border-right: 2px solid #af7a30;
border-left: 2px solid #af7a30;
border-bottom: none;
background-color: rgba(0, 100, 0, 0.4);
}
.ts-tab.inactive {
border-top: 2px solid #000022;
border-right: 2px solid #000022;
border-left: 2px solid #000022;
border-bottom: none;
}
.ts-box {
background-color: black;
color: #fff;
border: 2px solid #af7a30;
max-height: 400px;
overflow-x: hidden;
overflow-y: auto;
}
.ts-box.active { display: block; }
.ts-box.inactive { display: none; }
.ac-header {
padding: 12px 15px;
border-bottom: 1px solid #8b7355;
text-align: center;
/* -- Tables inside boxes -- */
table.ts-char {
width: 100%;
font-size: 13px;
border-collapse: collapse;
border-spacing: 0;
}
.ac-name {
font-size: 18px;
table.ts-char td {
padding: 2px 6px;
white-space: nowrap;
}
table.ts-char tr.ts-colnames td {
background-color: #222;
font-weight: bold;
color: #d4a843;
letter-spacing: 1px;
}
.ac-subtitle {
font-size: 12px;
color: #7a6e5e;
margin-top: 4px;
}
.ac-section {
padding: 8px 15px;
border-bottom: 1px solid #3a3228;
/* Attribute cells */
table.ts-char td.ts-headerleft {
background-color: rgba(0, 100, 0, 0.4);
}
.ac-section-title {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 2px;
color: #8b7355;
margin-bottom: 6px;
padding-bottom: 3px;
border-bottom: 1px solid #3a3228;
table.ts-char td.ts-headerright {
background-color: rgba(0, 0, 100, 0.4);
}
table.ts-char td.ts-creation {
color: #ccc;
}
.ac-attributes {
display: flex;
flex-direction: column;
gap: 2px;
/* Skill rows */
table.ts-char td.ts-specialized {
background: linear-gradient(to right, #392067, #392067, black);
}
.ac-attr-row {
display: flex;
gap: 10px;
table.ts-char td.ts-trained {
background: linear-gradient(to right, #0f3c3e, #0f3c3e, black);
}
.ac-attr {
flex: 1;
display: flex;
justify-content: space-between;
padding: 3px 8px;
background: rgba(42, 34, 24, 0.6);
border: 1px solid #3a3228;
border-radius: 2px;
/* Section headers inside boxes */
.ts-box .ts-section-title {
background-color: #222;
padding: 4px 8px;
font-weight: bold;
font-size: 13px;
border-bottom: 1px solid #af7a30;
}
.ac-attr-label {
color: #7a6e5e;
/* Titles list */
.ts-titles-list {
padding: 6px 10px;
font-size: 13px;
}
.ac-attr-value {
color: #d4a843;
.ts-titles-list div {
padding: 1px 0;
}
/* Properties (augmentations, ratings, other) */
table.ts-props {
width: 100%;
font-size: 13px;
border-collapse: collapse;
}
table.ts-props td {
padding: 2px 6px;
}
table.ts-props tr.ts-colnames td {
background-color: #222;
font-weight: bold;
}
.ac-vitals {
/* -- Live vitals bars (inside Attributes tab) -- */
.ts-vitals {
padding: 6px 8px;
display: flex;
flex-direction: column;
gap: 6px;
gap: 4px;
border-bottom: 2px solid #af7a30;
}
.ac-vital {
.ts-vital {
display: flex;
align-items: center;
gap: 8px;
gap: 6px;
}
.ac-vital-label {
.ts-vital-label {
width: 55px;
font-size: 12px;
color: #7a6e5e;
color: #ccc;
}
.ac-vital-bar {
.ts-vital-bar {
flex: 1;
height: 16px;
border-radius: 2px;
height: 14px;
overflow: hidden;
position: relative;
border: 1px solid #af7a30;
}
.ac-vital-fill {
.ts-vital-fill {
height: 100%;
transition: width 0.5s ease;
border-radius: 2px;
}
.ac-health-bar { background: #4a1a1a; }
.ac-health-bar .ac-vital-fill { background: #cc3333; width: 0%; }
.ac-stamina-bar { background: #4a3a1a; }
.ac-stamina-bar .ac-vital-fill { background: #ccaa33; width: 0%; }
.ac-mana-bar { background: #1a2a4a; }
.ac-mana-bar .ac-vital-fill { background: #3366cc; width: 0%; }
.ac-vital-text {
.ts-health-bar .ts-vital-fill { background: #cc3333; width: 0%; }
.ts-stamina-bar .ts-vital-fill { background: #ccaa33; width: 0%; }
.ts-mana-bar .ts-vital-fill { background: #3366cc; width: 0%; }
.ts-vital-text {
width: 80px;
text-align: right;
font-size: 12px;
color: #c8b89a;
color: #ccc;
}
.ac-skills-section {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
/* -- Allegiance section (below tabs) -- */
.ts-allegiance-section {
margin-top: 5px;
border: 2px solid #af7a30;
background-color: black;
padding: 0;
}
.ac-skills {
overflow-y: auto;
max-height: 200px;
flex: 1;
}
.ac-skill-group {
margin-bottom: 4px;
}
.ac-skill-group-title {
font-size: 11px;
.ts-allegiance-section .ts-section-title {
background-color: #222;
padding: 4px 8px;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
padding: 3px 8px;
margin-bottom: 1px;
font-size: 13px;
border-bottom: 1px solid #af7a30;
}
table.ts-allegiance {
width: 100%;
font-size: 13px;
border-collapse: collapse;
}
table.ts-allegiance td {
padding: 2px 6px;
}
table.ts-allegiance td:first-child {
color: #ccc;
width: 100px;
}
.ac-skill-group-title.ac-specialized { color: #d4a843; }
.ac-skill-group-title.ac-trained { color: #c8b89a; }
.ac-skill-group-title.ac-untrained { color: #5a5248; }
.ac-skill-row {
display: flex;
justify-content: space-between;
padding: 2px 12px;
border-bottom: 1px solid rgba(58, 50, 40, 0.4);
/* Awaiting data placeholder */
.ts-placeholder {
color: #666;
font-style: italic;
padding: 10px;
text-align: center;
}
.ac-skill-row:hover {
background: rgba(139, 115, 85, 0.1);
}
.ac-skill-row.ac-specialized .ac-skill-name { color: #d4a843; }
.ac-skill-row.ac-specialized .ac-skill-value { color: #d4a843; font-weight: bold; }
.ac-skill-row.ac-trained .ac-skill-name { color: #c8b89a; }
.ac-skill-row.ac-trained .ac-skill-value { color: #c8b89a; }
.ac-skill-row.ac-untrained .ac-skill-name { color: #5a5248; }
.ac-skill-row.ac-untrained .ac-skill-value { color: #5a5248; }
.ac-skill-name { font-size: 12px; }
.ac-skill-value { font-size: 12px; font-family: monospace; }
.ac-skill-placeholder { color: #5a5248; font-style: italic; padding: 8px; }
.ac-allegiance {
display: flex;
flex-direction: column;
gap: 2px;
}
.ac-alleg-row {
display: flex;
justify-content: space-between;
padding: 2px 8px;
}
.ac-alleg-row span:first-child { color: #7a6e5e; }
.ac-alleg-row span:last-child { color: #c8b89a; }
.ac-footer {
padding: 8px 15px;
border-top: 1px solid #8b7355;
background: rgba(26, 20, 16, 0.8);
}
.ac-footer-row {
display: flex;
justify-content: space-between;
padding: 2px 0;
font-size: 12px;
}
.ac-footer-row span:first-child { color: #7a6e5e; }
.ac-footer-row span:last-child { color: #d4a843; }
/* Scrollbar styling for ts-box */
.ts-box::-webkit-scrollbar { width: 8px; }
.ts-box::-webkit-scrollbar-track { background: #000; }
.ts-box::-webkit-scrollbar-thumb { background: #af7a30; }
.char-btn {
background: #2a2218;
color: #d4a843;
border: 1px solid #8b7355;
background: #000022;
color: #af7a30;
border: 1px solid #af7a30;
padding: 2px 6px;
border-radius: 3px;
cursor: pointer;
font-size: 11px;
}
.char-btn:hover {
background: #3a3228;
border-color: #d4a843;
background: rgba(0, 100, 0, 0.4);
border-color: #af7a30;
}