:root {
            /* Classic 2000s vBulletin / phpBB Palette */
            --vbulletin-dark: #224466;
            --vbulletin-mid: #3b5998;
            --vbulletin-light: #5c7099;
            --vbulletin-bg: #d1d7dc;
            --vbulletin-card: #f4f6f8;
            --vbulletin-alt: #e9eef2;
            --vbulletin-border: #8fa0b5;
            --vbulletin-border-dark: #000000;
            --vbulletin-header-txt: #ffffff;
            --vbulletin-txt: #101010;
            --vbulletin-muted: #555555;
            --vbulletin-link: #003366;
            --vbulletin-highlight: #fffae1;

            /* Game Stat Colors */
            --clarity-color: #0066cc;
            --fatigue-color: #cc0000;
            --rep-color: #d48800;
            --heat-color: #8a2be2;

            --font-main: Verdana, Tahoma, Arial, sans-serif;
            --font-mono: "Courier New", Courier, monospace;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            background-color: var(--vbulletin-bg);
            color: var(--vbulletin-txt);
            font-family: var(--font-main);
            font-size: 11px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            padding: 12px;
        }

        .main-wrapper {
            width: 100%;
            max-width: 960px;
            background: #ffffff;
            border: 2px solid var(--vbulletin-dark);
            box-shadow: 3px 3px 10px rgba(0,0,0,0.3);
            display: flex;
            flex-direction: column;
        }

        /* ---------------- TOP HEADER & NAVIGATION ---------------- */
        .forum-banner {
            background: linear-gradient(180deg, var(--vbulletin-dark) 0%, #112233 100%);
            color: var(--vbulletin-header-txt);
            padding: 14px 18px;
            border-bottom: 2px solid #000000;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .forum-logo {
            font-family: 'Trebuchet MS', var(--font-main);
            font-size: 1.6rem;
            font-weight: bold;
            letter-spacing: -0.5px;
            color: #ffffff;
            text-shadow: 1px 1px 2px #000000;
        }

        .forum-logo span {
            color: #ff9900;
        }

        .forum-subtext {
            font-size: 0.75rem;
            color: #b0c4de;
            margin-top: 2px;
        }

        .nav-bar {
            background: linear-gradient(180deg, #5c7099 0%, #3b5998 100%);
            border-top: 1px solid #7d93b8;
            border-bottom: 2px solid var(--vbulletin-dark);
            padding: 0 10px;
            display: flex;
            gap: 4px;
        }

        .nav-btn {
            background: transparent;
            border: none;
            color: #ffffff;
            padding: 8px 14px;
            font-family: var(--font-main);
            font-size: 0.75rem;
            font-weight: bold;
            cursor: pointer;
            text-decoration: none;
            display: inline-block;
            border-left: 1px solid rgba(255,255,255,0.2);
            border-right: 1px solid rgba(0,0,0,0.2);
            transition: background 0.1s ease;
        }

        .nav-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            color: #fffae1;
        }

        .nav-btn.active {
            background: #ffffff;
            color: var(--vbulletin-dark);
            border-radius: 4px 4px 0 0;
            margin-top: 2px;
            border: 1px solid var(--vbulletin-dark);
            border-bottom: 1px solid #ffffff;
        }

        /* ---------------- LAYOUT CONTAINERS ---------------- */
        .content-body {
            padding: 12px;
            background: #ffffff;
            min-height: 520px;
        }

        .tab-page {
            display: none;
        }

        .tab-page.active {
            display: block;
        }

        /* Category Header Bars (Classic phpBB / vBulletin Category Box) */
        .cat-header {
            background: linear-gradient(180deg, var(--vbulletin-mid) 0%, var(--vbulletin-dark) 100%);
            color: #ffffff;
            font-weight: bold;
            padding: 6px 10px;
            font-size: 0.8rem;
            border: 1px solid #000000;
            border-radius: 3px 3px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .cat-box {
            border: 1px solid var(--vbulletin-border);
            border-top: none;
            background: var(--vbulletin-card);
            padding: 12px;
            margin-bottom: 14px;
            border-radius: 0 0 3px 3px;
        }

        /* ---------------- SELECTION SCREEN ---------------- */
        .selection-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 10px;
            margin-top: 8px;
        }

        .char-card {
            background: var(--vbulletin-alt);
            border: 1px solid var(--vbulletin-border);
            border-radius: 3px;
            padding: 10px;
            cursor: pointer;
            position: relative;
            transition: all 0.15s ease;
        }

        .char-card:hover {
            background: #ffffff;
            border-color: var(--vbulletin-mid);
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .char-card.selected-p1 {
            border: 2px solid var(--clarity-color);
            background: #eef6ff;
        }

        .char-card.selected-p2 {
            border: 2px solid var(--fatigue-color);
            background: #ffeef0;
        }

        .card-title-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--vbulletin-border);
            padding-bottom: 4px;
            margin-bottom: 6px;
        }

        .char-name {
            font-weight: bold;
            font-size: 0.85rem;
            color: var(--vbulletin-dark);
        }

        .char-avatar-icon {
            font-size: 1.2rem;
        }

        .char-perk-badge {
            font-size: 0.7rem;
            background: var(--vbulletin-highlight);
            border: 1px dashed #d48800;
            padding: 3px 5px;
            margin-bottom: 6px;
            display: inline-block;
            font-weight: bold;
            color: #664400;
        }

        .char-desc-text {
            font-size: 0.72rem;
            color: #333333;
            margin-bottom: 8px;
            line-height: 1.3;
        }

        .char-mini-stats {
            display: flex;
            justify-content: space-around;
            background: #ffffff;
            border: 1px solid #cccccc;
            padding: 4px;
            font-size: 0.68rem;
            text-align: center;
        }

        .selection-footer {
            margin-top: 12px;
            background: var(--vbulletin-highlight);
            border: 1px solid #e6dbb8;
            padding: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
        }

        /* ---------------- BATTLE ARENA ---------------- */
        .thread-info-bar {
            background: #f0f4f8;
            border: 1px solid var(--vbulletin-border);
            padding: 8px 12px;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
        }

        .heat-indicator {
            width: 100%;
            background: #e0d0f0;
            border: 1px solid var(--heat-color);
            padding: 6px 10px;
            margin-bottom: 12px;
        }

        .heat-text {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            font-weight: bold;
            color: var(--heat-color);
            margin-bottom: 3px;
        }

        /* Classic Forum Stat Cards */
        .arena-combatants {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 12px;
        }

        @media (max-width: 650px) {
            .arena-combatants { grid-template-columns: 1fr; }
        }

        .poster-profile {
            background: var(--vbulletin-card);
            border: 1px solid var(--vbulletin-border);
            padding: 10px;
            border-radius: 2px;
        }

        .poster-profile.active-turn {
            border: 2px solid var(--clarity-color);
            background: #f0f7ff;
        }

        .poster-profile.enemy-turn {
            border: 2px solid var(--fatigue-color);
            background: #fff0f2;
        }

        .profile-header {
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid var(--vbulletin-border);
            padding-bottom: 6px;
            margin-bottom: 8px;
        }

        .user-avatar-box {
            width: 42px;
            height: 42px;
            background: #ffffff;
            border: 1px solid var(--vbulletin-border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
        }

        .stat-bar-container {
            margin-bottom: 5px;
        }

        .stat-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.68rem;
            font-weight: bold;
            margin-bottom: 2px;
        }

        .bar-bg {
            height: 10px;
            background: #e0e0e0;
            border: 1px solid #999999;
            overflow: hidden;
        }

        .bar-fill {
            height: 100%;
            transition: width 0.3s ease;
        }

        /* THREAD STREAM / POST FEED */
        .forum-thread-box {
            background: #ffffff;
            border: 1px solid var(--vbulletin-border);
            height: 220px;
            overflow-y: auto;
            margin-bottom: 12px;
            display: flex;
            flex-direction: column;
        }

        .forum-post {
            border-bottom: 1px solid var(--vbulletin-border);
            display: flex;
            font-size: 0.75rem;
        }

        .post-author-sidebar {
            width: 140px;
            background: var(--vbulletin-alt);
            border-right: 1px solid var(--vbulletin-border);
            padding: 8px;
            flex-shrink: 0;
        }

        .post-author-name {
            font-weight: bold;
            color: var(--vbulletin-link);
            font-size: 0.78rem;
        }

        .post-author-title {
            font-size: 0.65rem;
            color: var(--vbulletin-muted);
            margin-top: 2px;
        }

        .post-body {
            padding: 8px 12px;
            flex-grow: 1;
            background: #ffffff;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .post-time {
            font-size: 0.65rem;
            color: #888888;
            border-bottom: 1px dashed #dddddd;
            padding-bottom: 3px;
            margin-bottom: 6px;
        }

        .post-content {
            line-height: 1.4;
            color: #111111;
        }

        .forum-post.system-post {
            background: var(--vbulletin-highlight);
        }

        .forum-post.system-post .post-author-sidebar {
            background: #f7eaa8;
        }

        /* ACTION BUTTONS (Classic Beveled Look) */
        .action-deck {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
        }

        @media (max-width: 550px) {
            .action-deck { grid-template-columns: 1fr; }
        }

        .btn-action {
            background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%);
            border: 1px solid #777777;
            border-top-color: #aaaaaa;
            border-left-color: #aaaaaa;
            border-radius: 2px;
            padding: 8px 10px;
            text-align: left;
            cursor: pointer;
            font-family: var(--font-main);
            box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
        }

        .btn-action:hover:not(:disabled) {
            background: linear-gradient(180deg, #fffae1 0%, #f0e6b8 100%);
            border-color: #333333;
        }

        .btn-action:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: #e0e0e0;
        }

        .btn-act-title {
            font-weight: bold;
            font-size: 0.78rem;
            color: var(--vbulletin-dark);
            display: block;
        }

        .btn-act-sub {
            font-size: 0.65rem;
            color: #444444;
            display: block;
            margin-top: 2px;
        }

        .btn-classic {
            background: linear-gradient(180deg, #5c7099 0%, #224466 100%);
            color: #ffffff;
            border: 1px solid #000000;
            padding: 6px 14px;
            font-weight: bold;
            font-size: 0.75rem;
            cursor: pointer;
            border-radius: 2px;
        }

        .btn-classic:hover:not(:disabled) {
            background: linear-gradient(180deg, #7a8eb8 0%, #3b5998 100%);
        }

        .btn-classic:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        /* GAME OVER / MODAL BOX */
        .lock-panel {
            background: var(--vbulletin-highlight);
            border: 2px solid #cc0000;
            padding: 16px;
            text-align: center;
            margin-top: 10px;
            display: none;
        }

        .lock-panel.active {
            display: block;
        }

        /* ---------------- CHARACTER ROSTER PAGE ---------------- */
        .roster-card-large {
            background: #ffffff;
            border: 1px solid var(--vbulletin-border);
            margin-bottom: 14px;
            border-radius: 2px;
            overflow: hidden;
        }

        .roster-card-head {
            background: var(--vbulletin-alt);
            padding: 8px 12px;
            border-bottom: 1px solid var(--vbulletin-border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .roster-card-body {
            padding: 12px;
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
        }

        .roster-side-info {
            width: 180px;
            background: var(--vbulletin-card);
            border: 1px solid var(--vbulletin-border);
            padding: 10px;
            font-size: 0.7rem;
            flex-shrink: 0;
        }

        .roster-main-info {
            flex-grow: 1;
            min-width: 250px;
        }

        .moves-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 8px;
            font-size: 0.7rem;
        }

        .moves-table th {
            background: var(--vbulletin-mid);
            color: #ffffff;
            padding: 4px 6px;
            text-align: left;
            border: 1px solid var(--vbulletin-dark);
        }

        .moves-table td {
            padding: 5px 6px;
            border: 1px solid #dddddd;
            background: #ffffff;
        }

        .moves-table tr:nth-child(even) td {
            background: #f9f9f9;
        }

        /* ---------------- STRATEGY GUIDE PAGE ---------------- */
        .guide-section {
            margin-bottom: 16px;
            line-height: 1.5;
            font-size: 0.78rem;
        }

        .guide-section h3 {
            color: var(--vbulletin-dark);
            border-bottom: 1px solid var(--vbulletin-border);
            padding-bottom: 4px;
            margin-bottom: 8px;
            font-size: 0.9rem;
        }

        .guide-box {
            background: #f8f9fa;
            border-left: 3px solid var(--vbulletin-mid);
            padding: 8px 12px;
            margin: 8px 0;
        }

        /* ---------------- FOOTER ---------------- */
        .forum-footer {
            background: var(--vbulletin-alt);
            border-top: 1px solid var(--vbulletin-border);
            padding: 10px;
            text-align: center;
            font-size: 0.65rem;
            color: var(--vbulletin-muted);
        }