/* =============================================
   BASELINE.CSS - Modern Dark Theme + Responsive
   ============================================= */

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: #0f0f0f;
    color: #ddd;
    line-height: 1.6;
}

/* Layout */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #1a1a1a;
    padding: 1rem 2rem;
    border-bottom: 4px solid #ffcc00;
    text-align: center;
}

.main-flex {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar */
.sidebar {
    flex: 1 1 280px;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 1.5rem;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

#char-search {
    width: 100%;
    padding: 14px 16px;
    background: #333;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

#character-menu {
    list-style: none;
    padding: 0;
}

#character-menu li { margin-bottom: 6px; }

#character-menu a,
#character-menu > li > div {
    display: block;
    padding: 12px 16px;
    color: #ccc;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.2s;
}

#character-menu a:hover,
#character-menu > li > div:hover {
    background: #333;
    color: #ffcc00;
}

/* Content Area */
.content-area {
    flex: 3 1 700px;
    background: #222;
    border-radius: 12px;
    padding: 2rem;
}

/* Character Header */
.character-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    color: #ffcc00;
    text-decoration: none;
    font-weight: 500;
}

/* Tabs */
#char-tabs .ui-tabs-nav {
    background: #1a1a1a !important;
    border-bottom: 4px solid #ffcc00 !important;
}

#char-tabs .ui-tabs-nav li a {
    color: #ddd !important;
    background: #222 !important;
    border-radius: 6px 6px 0 0 !important;
}

#char-tabs .ui-tabs-nav li.ui-tabs-active a {
    background: #ffcc00 !important;
    color: #000 !important;
}

#char-tabs .tab-content {
    background: #1f1f1f;
    border: 1px solid #333;
    padding: 25px;
    min-height: 520px;
}

/* Global Dark Overrides */
.biobox, .medical, .FaceScroll, .StatFont, .progress, .special-container,
.skills-sheet, .power-grid, .medical-id-card, .forms-content {
    background: #1f1f1f !important;
    color: #ddd !important;
}

.medtitle, h3, h4 { color: #ffcc00 !important; }

/* RPG Elements */
.progress {
    background: #333 !important;
    height: 42px;
    border: 1px solid #555;
}

.progress-bar-success { background-color: #28a745 !important; }

/* Forms Layout */
.forms-layout { display: flex; gap: 25px; min-height: 520px; }
.forms-menu { width: 280px; flex-shrink: 0; background: #2a2a2a; border: 1px solid #444; border-radius: 8px; padding: 15px; overflow-y: auto; }
.forms-content { flex: 1; background: #1f1f1f; border: 1px solid #444; border-radius: 8px; padding: 25px; }

/* Mobile Responsive */
@media (max-width: 900px) {
    .main-flex { flex-direction: column; }
    .sidebar { position: static; max-height: none; order: 1; }
    .content-area { order: 2; }
    .forms-layout { flex-direction: column; }
    .forms-menu { width: 100%; }
}

/* Accordion */
#accordion h3 {
    background: #2a2a2a !important;
    color: #ffcc00 !important;
}

#accordion .ui-accordion-content {
    background: #1f1f1f !important;
    color: #ddd !important;
}

/* =============================================
   SPECIFIC TAB FIXES (was lost during merge)
   ============================================= */

/* Medical Card */
.medical-id-card {
    background: #f8f1d9 !important;
    color: #222 !important;
    border: 6px solid #c00 !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
    max-width: 620px;
    margin: 0 auto;
}

.id-header {
    background: #c00;
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 1.4em;
    font-weight: 700;
}

.id-body {
    display: flex;
    padding: 25px;
    gap: 30px;
    align-items: flex-start;
}

.id-portrait {
    width: 160px;
    border: 4px solid #333;
    border-radius: 8px;
}

.id-details {
    flex: 1;
    font-size: 1.15em;
    line-height: 2.1;
}

.id-row {
    display: flex;
    margin-bottom: 8px;
}

.id-label {
    width: 110px;
    font-weight: 600;
    color: #c00;
}

.id-value {
    color: #222;
    font-weight: 500;
}

/* S.P.E.C.I.A.L. */
.special-container {
    background: #1f1f1f;
    border: 2px solid #ffcc00;
    border-radius: 8px;
    padding: 20px;
}

.special-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.special-stat {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-label {
    min-width: 130px;
    font-weight: 600;
    color: #ffcc00;
}

.progress-bar-container {
    flex: 1;
    background: #333;
    height: 38px;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #5cb85c);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: #000;
    font-weight: 700;
}

/* === SKILLS CHARACTER SHEET === */
.skills-sheet {
    background: #1f1f1f;
    border: 2px solid #ffcc00;
    border-radius: 10px;
    padding: 20px;
}

.skills-sheet .medtitle {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.7em;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.skills-column h4 {
    color: #ffcc00;
    margin: 18px 0 12px 0;
    border-bottom: 2px solid #444;
    padding-bottom: 6px;
    font-size: 1.25em;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 8px;
}

.skill-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.skill-name {
    flex: 1;
    font-weight: 500;
}

.skill-value {
    font-family: monospace;
    color: #ddd;
    min-width: 110px;
    text-align: right;
}

/* Responsive: stack on smaller screens */
@media (max-width: 1100px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}


/* Power Grid / Statistics */
.power-grid {
    background: #1f1f1f;
    border: 2px solid #ffcc00;
    border-radius: 10px;
    padding: 20px;
    max-width: 100%;
    max-height: 360px;
    overflow: scroll;
}

.grid-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.grid-section {
    background: #2a2a2a;
    padding: 16px;
    border-radius: 8px;
    border-left: 5px solid #ffcc00;
}

/* Forms Menu */
#menu > li > div {
    background: #333;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #ffcc00;
}

#menu ul {
    display: none;
    padding-left: 22px;
}

#menu ul.active {
    display: block;
}

/* === statistics - Contained & Frame-Friendly === */
.statistics {
    background: #1f1f1f;
    border: none;
    border-radius: 10px;
    padding: 20px;
    max-width: 100%;
    overflow: hidden;
}

/* === FORMS MENU - Fix sub-link colors === */
.forms-menu #menu a {
    color: #ddd !important;
    background: transparent;
}

.forms-menu #menu a:hover {
    color: #ffcc00 !important;
    background: #3a3a3a !important;
}

/* Make sub-menus look cleaner */
.forms-menu #menu ul {
    background: #252525;
    border-left: 3px solid #ffcc00;
    padding: 8px 0;
    margin-left: 12px;
    border-radius: 0 6px 6px 0;
}

.forms-menu #menu li ul li {
    margin: 2px 0;
}

/* === FORMS MENU - Fix ALL nested links (including deep levels) === */
.forms-menu #menu a,
.forms-menu #menu li ul li a,
.forms-menu #menu li ul li ul li a {
    color: #ddd !important;
    background: transparent !important;
    padding: 8px 14px !important;
    display: block;
    border-radius: 4px;
}

.forms-menu #menu a:hover,
.forms-menu #menu li ul li a:hover,
.forms-menu #menu li ul li ul li a:hover {
    color: #ffcc00 !important;
    background: #3a3a3a !important;
}

/* Visual indicator for active/expanded levels */
.forms-menu #menu ul {
    border-left: 3px solid #ffcc00;
    padding-left: 18px;
    margin-left: 12px;
}

/* Make the top-level items stand out more */
.forms-menu #menu > li > div {
    background: #333 !important;
    padding: 12px 16px !important;
    font-weight: 600;
    color: #ffcc00 !important;
}

/* SPECIAL Progress Bars */
.special-container .progress-bar {
    height: 18px;
    background: linear-gradient(to right, #ffcc00, #ffaa00);
    border-radius: 4px;
    position: relative;
    margin: 6px 0;
}

.special-container .progress-bar span {
    position: absolute;
    right: 8px;
    top: 1px;
    color: #000;
    font-weight: bold;
    font-size: 0.9em;
}

.special-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

/* Dice Font for Skills */


@font-face {
  font-family: df-dice-font;
  src: url(fonts/DpolyTwentySider-62jq.ttf) format('truetype');
}

* {
   font-family: df-dice-font;
}

.skill-value i {
    font-family: "df-dice-font", sans-serif; /* or whatever your dice font is called */
    font-size: 1.1em;
    margin-right: 6px;
}