/**
 * BOSNIAN PHRASES PRO - MASTER STYLESHEET
 * Integrates sub-page component layout tracking vectors based on Tkinter layout variables.
 */

:root {
    --bg-fallback: #1a1a12;       /* Flat background window fallback */
    --container-bg: #2c3e50;      /* Core status and button base gray/blue */
    --wow-gold: #eff1c4;          /* Principal font and trim decorations */
    --wow-purple: #a335ee;        /* Standard Player experience bar fill */
    --wow-blue: #0070dd;          /* Global Mastery progress bar fill */
    --text-gray: #9d9d9d;         /* Soft muted labels */
    --wow-gray: #9d9d9d;          /* Base HUD status indicator gray */
    
    /* Mastery Rarity Border Colors (Mirrors src/constants.py) */
    --tier-unknown: #9d9d9d;
    --tier-novice: #1eff00;
    --tier-apprentice: #0070dd;
    --tier-adept: #a335ee;
    --tier-mastered: #ff8000;

    /* Database Equipment Rarity Color Mappings Alignment */
    --tier-gray: #9d9d9d;
    --tier-green: #1eff00;
    --tier-blue: #0070dd;
    --tier-purple: #a335ee;
    --tier-orange: #ff8000;
}

/* Core Document Geometry Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Consolas', 'Georgia', serif;
}

body {
    background-color: var(--bg-fallback);
    color: #ffffff;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

/* --- GLOBAL STATUS HEADER BAR --- */
#global-status-container {
    background-color: #2c3e50;
    height: 30px;
    width: 100%;
    position: relative;
    border-bottom: 2px solid #111111;
    flex-shrink: 0;
}

#global-xp-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    transition: opacity 0.15s ease-in-out, width 0.3s ease;
}

#xp-progress-bar { width: 0%; background-color: var(--wow-purple); opacity: 1; z-index: 1; }
#mastery-progress-bar { width: 0%; background-color: var(--wow-blue); opacity: 0; z-index: 2; }

#xp-display-text {
    position: relative;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px #000000, -1px -1px 2px #000000;
    z-index: 5;
    letter-spacing: 1px;
}

#global-xp-canvas:hover #xp-progress-bar { opacity: 0; }
#global-xp-canvas:hover #mastery-progress-bar { opacity: 1; }

/* --- MAIN INTERFACE VIEWPORT SHELL --- */
#app-container {
    flex-grow: 1;
    width: 100%;
    position: relative;
    background-color: var(--bg-fallback);
}

.game-view {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.game-view.active-view {
    display: block;
}

/* --- VIEW 1: IMMERSIVE RESPONSIVE HOME LOBBY SCREEN --- */
#view-home { 
    background-image: url('./assets/BiH_background.png'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
}

.home-lobby-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px 60px 20px;
    box-sizing: border-box;
}

.home-header-title-block {
    text-align: center;
    background-color: rgba(12, 15, 18, 0.85);
    border: 2px solid #2c3e50;
    padding: 15px 30px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.home-lobby-title {
    font-family: 'Georgia', serif;
    font-size: 32px;
    color: var(--wow-gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
    letter-spacing: 2px;
}

.home-lobby-subtitle {
    font-family: 'Consolas', monospace;
    font-size: 11px;
    color: var(--text-gray);
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* Structural matrix deck with visual frame outlines removed entirely */
.home-menu-deck {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 640px;
    background-color: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    align-items: center;
    justify-items: center;
}

/* Reduced maximum sizing limits by 35% (from 240px down to 156px) */
#view-home .composite-btn {
    position: static;
    transform: none;
    width: 100%;
    max-width: 156px;
    height: 52px;
    background-color: rgba(20, 26, 31, 0.95);
    border: 2px solid #2c3e50;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transition: all 0.15s ease;
}

#view-home .composite-btn:hover {
    border-color: var(--wow-gold);
    box-shadow: 0 0 12px rgba(239, 241, 196, 0.3);
    transform: translateY(-2px);
}

#view-home .composite-btn:active {
    background-color: var(--wow-gold);
    border-color: var(--wow-gold);
}
#view-home .composite-btn:active .btn-text,
#view-home .composite-btn:active .btn-icon {
    color: #0c0f12 !important;
}

/* Consolidated Towns trigger element matched to shrunken horizontal bounds */
#view-home .wip-town-btn {
    position: static;
    width: 100%;
    max-width: 156px;
    height: 52px;
    background-color: #57168c;
    color: var(--wow-gold);
    border: 2px solid #a335ee;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

#view-home .wip-town-btn:hover {
    border-color: #ffffff;
    box-shadow: 0 0 12px #a335ee;
    transform: translateY(-2px);
}

#view-home .wip-town-btn:active {
    background-color: #a335ee;
    color: #ffffff;
    transform: translateY(0);
}

/* --- ADAPTIVE MOBILE LOBBY MEDIA OVERRIDES --- */
@media (max-width: 768px) {
    .home-lobby-wrapper {
        padding: 30px 15px;
        justify-content: center;
        gap: 30px;
    }

    .home-lobby-title {
        font-size: 24px;
    }

    .home-menu-deck {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 360px;
    }

    #view-home .composite-btn,
    #view-home .wip-town-btn {
        max-width: 156px;
        height: 48px;
    }
}

@media (max-width: 440px) {
    .home-menu-deck {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- FLAT RETRO COMPOSITE BUTTON RECREATIONS --- */
.composite-btn {
    position: absolute;
    bottom: 15%;
    transform: translateX(-50%);
    background-color: var(--container-bg);
    border-top: 3px solid #4f6f8f;
    border-left: 3px solid #4f6f8f;
    border-right: 3px solid #151f29;
    border-bottom: 3px solid #151f29;
    width: 14vw;
    height: 4.5vw;
    max-height: 52px;
    min-height: 42px;
    min-width: 140px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    z-index: 20;
}

.btn-icon {
    font-size: 1.2rem;
    width: 28%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.15);
}

.btn-text {
    color: var(--wow-gold);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    width: 72%;
    text-align: center;
}

.composite-btn:hover { border: 3px solid var(--wow-gold); }
.composite-btn:active {
    background-color: #ffffff;
    border-top: 3px solid #151f29; border-left: 3px solid #151f29;
    border-right: 3px solid #4f6f8f; border-bottom: 3px solid #4f6f8f;
}
.composite-btn:active .btn-text, .composite-btn:active .btn-icon { color: #000000; }

/* --- GLOBAL PANEL STRUCTURAL COMMONS --- */
.panel-title {
    font-family: 'Georgia', serif;
    font-size: 28px;
    color: var(--wow-gold);
    margin-top: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    text-align: center;
}

.legacy-back-btn {
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--container-bg);
    color: var(--wow-gold);
    border: 2px solid var(--container-bg);
    padding: 8px 24px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}
.legacy-back-btn:hover { border-color: var(--wow-gold); }

/* --- VIEW 2: CHARACTER SHEET GRAPHIC SYSTEM UPDATE --- */
#view-character { background-image: url('./assets/BiH_background.png'); background-size: cover; background-position: center; }

.character-sheet-layout { width: 100%; height: 100%; position: relative; overflow: hidden; }

/* Interactive Menu Button Row matching tactical combat elements */
.character-action-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 12px;
    z-index: 100;
}

.char-control-btn {
    background-color: rgba(12, 15, 18, 0.95);
    border: 2px solid #2c3e50;
    color: var(--wow-gold);
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: bold;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.6);
    transition: all 0.1s ease;
}

.char-control-btn:hover {
    border-color: var(--wow-gold);
    box-shadow: 0 0 10px rgba(239, 241, 196, 0.3);
}

.char-control-btn:active {
    background-color: var(--wow-gold);
    color: #0c0f12;
}

/* Shipped center coordinate from 30% to 36% to double left screen margin buffer space */
.hero-float-workspace {
    position: absolute;
    left: 36%; top: 48%;
    transform: translate(-50%, -50%);
    width: 55%; height: 60%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
}

/* Hide Stats button by default on desktop monitors */
#btn-toggle-stats {
    display: none;
}

.gear-column.column-left {
    margin-left: -20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gear-column { display: flex; flex-direction: column; gap: 12px; }

.gear-slot {
    width: 64px; height: 64px;
    background-color: #1c1c1c;
    border: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #555555;
    cursor: pointer;
}
.gear-slot:hover { border-color: var(--wow-gold); }

.hero-model-space { 
    width: 140px; 
    text-align: center; 
    color: #555555; 
    font-style: italic; 
    font-size: 13px; 
}

.attributes-panel-box {
    background-color: #111111;
    border: 2px solid #333333;
    padding: 15px 20px;
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 15px;
}
.attributes-panel-box h2 { font-size: 14px; color: var(--wow-gold); margin-bottom: 6px; text-transform: uppercase; }
.stat-row { display: flex; justify-content: space-between; font-size: 12px; color: #dcdcdc; }
.stat-row strong { color: #ffffff; font-family: 'Consolas', monospace; }

.inventory-bags-pane {
    display: none;
    position: absolute;
    right: 5%; top: 48%;
    transform: translateY(-50%);
    background-color: #1c1c1c;
    border: 4px solid #333333;
    padding: 15px;
    width: 252px;
    z-index: 40;
}
.inventory-bags-pane.active-bag-pane { display: block !important; }
.inventory-bags-pane h3 { font-size: 13px; color: var(--wow-gold); text-align: center; margin-bottom: 12px; }

.inventory-slots-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 48px); 
    grid-template-rows: repeat(5, 48px); 
    gap: 6px; 
}

.inventory-item-slot {
    width: 48px; height: 48px;
    background-color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    font-weight: bold;
    box-sizing: border-box;
    border-radius: 4px;
}

/* --- MOBILE PLATFORM SPECIFIC CHARACTER SHEET OVERRIDES --- */
@media (max-width: 768px) {
    /* Expose Stats tracking toggle button exclusively on mobile viewports */
    #btn-toggle-stats {
        display: block;
    }

    .character-action-bar {
        position: fixed;
        top: auto;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 30px);
        max-width: 340px;
        justify-content: center;
        gap: 15px;
    }

    .char-control-btn {
        flex: 1;
        height: 44px;
        font-size: 12px;
    }

    .hero-float-workspace {
        position: static;
        transform: none;
        width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: 
            "left model right";
        gap: 20px;
        padding: 40px 15px;
        justify-content: center;
    }

    .gear-column.column-left { grid-area: left; margin-left: 0; }
    .hero-model-space { grid-area: model; justify-self: center; align-self: center; }
    .gear-column.column-right { grid-area: right; }
    
    /* Hide the panel by default on mobile, display via toggle trigger class rules */
    .attributes-panel-box { 
        display: none;
        position: fixed;
        left: 50%; top: 45%;
        transform: translate(-50%, -50%);
        width: 260px;
        margin-left: 0; 
        z-index: 450;
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.95);
    }

    .attributes-panel-box.active-stats-pane {
        display: flex !important;
    }

    .inventory-bags-pane.active-bag-pane {
        display: block;
        position: fixed;
        right: auto;
        left: 50%; top: 45%;
        transform: translate(-50%, -50%);
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.95);
        z-index: 500;
    }
}

/* --- TOOLTIP VIEWPORT ADAPTATION STYLING CARDS --- */
.custom-app-tooltip {
    position: absolute;
    display: none;
    flex-direction: row;
    gap: 8px;
    pointer-events: none;
    z-index: 1000;
}

.tooltip-card {
    background-color: rgba(12, 15, 18, 0.98);
    border: 2px solid #2c3e50;
    padding: 12px 16px;
    min-width: 210px;
    max-width: 250px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.85);
    border-radius: 4px;
    font-family: 'Consolas', monospace;
}

.tooltip-card .item-header-title { font-size: 13px; font-weight: bold; margin-bottom: 2px; }
.tooltip-card .item-slot-label { font-size: 11px; color: var(--text-gray); text-transform: uppercase; margin-bottom: 6px; border-bottom: 1px solid #2c3e50; padding-bottom: 2px; }
.tooltip-card .item-meta-line { font-size: 11px; color: #bdc3c7; margin-bottom: 6px; }
.tooltip-card .item-stat-row { font-size: 11px; color: #ffffff; margin-top: 3px; }
.tooltip-card .stat-delta-positive { color: #1eff00; font-weight: bold; }
.tooltip-card .stat-delta-negative { color: #ff3333; font-weight: bold; }
.tooltip-card .equipped-badge-marker { display: inline-block; font-size: 9px; background-color: #2c3e50; color: #ffffff; padding: 1px 4px; margin-bottom: 6px; font-weight: bold; border-radius: 2px; }

.tooltip-card {
    background-color: rgba(12, 15, 18, 0.96);
    border: 2px solid #2c3e50;
    padding: 12px 16px;
    min-width: 220px;
    max-width: 280px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.85);
    border-radius: 4px;
    font-family: 'Consolas', monospace;
}

.tooltip-card .item-header-title {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 2px;
}

.tooltip-card .item-slot-label {
    font-size: 11px;
    color: var(--text-gray);
    text-transform: uppercase;
    margin-bottom: 6px;
    border-bottom: 1px solid #2c3e50;
    padding-bottom: 2px;
}

.tooltip-card .item-meta-line {
    font-size: 11px;
    color: #bdc3c7;
    margin-bottom: 6px;
}

.tooltip-card .item-stat-row {
    font-size: 11px;
    color: #ffffff;
    margin-top: 3px;
}

.tooltip-card .stat-delta-positive { color: #1eff00; font-weight: bold; }
.tooltip-card .stat-delta-negative { color: #ff3333; font-weight: bold; }
.tooltip-card .equipped-badge-marker {
    display: inline-block;
    font-size: 9px;
    background-color: #2c3e50;
    color: #ffffff;
    padding: 1px 4px;
    margin-bottom: 6px;
    font-weight: bold;
    border-radius: 2px;
}
.bag-slot {
    width: 48px; height: 48px;
    background-color: #111111;
    border: 1px solid #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #444444;
    font-weight: bold;
    cursor: pointer;
}
.bag-toggle-hint { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); font-size: 12px; color: var(--wow-gold); font-weight: bold; }

/* --- VIEW 3: TRAINING GROUNDS --- */
#view-training { background-image: url('./assets/background_training.png'); background-size: cover; background-position: center; }
.training-grounds-layout { width: 100%; height: 100%; position: relative; }
.training-cards-grid { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.training-card-btn {
    background-color: #1a1a12; border: 4px solid var(--container-bg);
    width: 26vw; height: 15vw; max-width: 320px; max-height: 160px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 3px 3px 6px rgba(0,0,0,0.6); padding: 15px; text-align: center;
}
.training-card-btn:hover { border-color: var(--wow-gold); }
.card-icon { font-size: 24px; margin-bottom: 8px; }
.card-text { color: var(--wow-gold); font-size: 13px; font-weight: bold; line-height: 1.4; }
.card-text span { color: #ffffff; font-size: 11px; font-weight: normal; font-style: italic; }

/* --- VIEW 4: EXPLORE WORLD MAP --- */
#view-map { background-image: url('./assets/background_map.png'); background-size: cover; background-position: center; }
.explore-map-layout { width: 100%; height: 100%; position: relative; }
.tactical-hud-overlay { position: absolute; left: 3.5%; top: 30%; width: 27.5%; height: 65%; background-color: #1c1c1c; border: 2px solid var(--wow-gold); padding: 15px; text-align: left; overflow-y: auto; }
.tactical-hud-overlay h2 { font-size: 14px; color: var(--wow-gold); margin-bottom: 4px; }
#hud-level-range { font-size: 11px; color: #1eff00; font-weight: bold; margin-bottom: 8px; }
.hud-divider { height: 1px; background-color: #2a2a2a; margin-bottom: 10px; }
#hud-description { font-size: 12px; color: #dcdcdc; font-style: italic; line-height: 1.4; margin-bottom: 15px; }
.tactical-hud-overlay h3 { font-size: 11px; color: #a335ee; text-decoration: underline; margin-top: 10px; margin-bottom: 4px; }
.hud-subtext { font-size: 11px; color: #a0a0a0; line-height: 1.3; }
.map-overlay-title { font-family: 'Georgia', serif; font-size: 32px; color: var(--wow-gold); position: absolute; left: 50%; top: 6%; transform: translateX(-50%); }
.map-placeholder-msg { position: absolute; left: 62%; top: 50%; transform: translate(-50%, -50%); color: #444444; font-style: italic; font-size: 13px; }

/* --- VIEW 5: DICTIONARY RENDERING SYSTEM --- */
.dictionary-layout { 
    width: 100%; height: 100%; 
    background-color: #121212; /* Swapped to match dark retro aesthetics */
    color: #ffffff; 
    position: relative; padding: 20px; 
    display: flex; flex-direction: column;
}

.dict-controls-bar {
    background-color: #1c1c1c;
    height: 60px; width: 100%;
    display: flex; align-items: center; gap: 30px;
    border-bottom: 2px solid #2d2d2d;
    padding: 0 15px 0 15px; flex-shrink: 0;
}

.dict-search-field { background-color: #000000; color: #00ff00; border: 1px solid #333; padding: 6px 10px; font-size: 13px; width: 240px; font-family: 'Consolas', monospace; }
.control-subset { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.subset-label { margin-right: 4px; font-weight: bold; color: var(--wow-gold); }

.subset-btn { background-color: #2c3e50; color: #fff; border: 1px solid #444; padding: 4px 12px; font-size: 11px; font-weight: bold; cursor: pointer; }
.subset-btn.active-toggle { background-color: var(--wow-blue); border-color: var(--wow-gold); }

.subset-check { display: flex; align-items: center; gap: 4px; color: #dcdcdc; font-weight: bold; cursor: pointer; font-size: 11px; }

/* Dynamic Term Tracking Banner Line Styling */
.terms-counter-banner {
    width: 100%; background-color: #1c1c1c;
    color: var(--wow-gold); font-family: 'Consolas', monospace;
    font-size: 12px; font-weight: bold;
    padding: 6px 15px; border-bottom: 1px solid #2d2d2d;
    text-align: left; flex-shrink: 0;
}

.dictionary-cards-container { 
    margin-top: 15px; width: 100%; flex-grow: 1;
    overflow-y: auto; display: grid;
    grid-template-columns: repeat(4, 1fr); gap: 12px;
    align-content: start; padding-bottom: 60px;
}

.dict-empty-notice { grid-column: span 4; color: var(--text-gray); font-style: italic; font-size: 13px; text-align: center; margin-top: 40px; }

/* Dynamic Vocabulary Card Engine */
.vocab-card {
    background-color: #1a1a1a; padding: 12px; height: 100px;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5); position: relative;
}
.card-top-row { display: flex; justify-content: space-between; align-items: start; }
.card-lemma { font-family: 'Georgia', serif; font-size: 14px; font-weight: bold; color: #ffffff; }
.card-tier-label { font-family: 'Consolas', monospace; font-size: 10px; font-weight: bold; color: var(--text-gray); }
.card-translation { font-family: 'Georgia', serif; font-size: 11px; font-style: italic; color: #bdc3c7; margin-top: 4px; }
.card-bottom-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.card-badges { display: flex; gap: 4px; }

.origin-badge { width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: bold; color: #ffffff; }
.badge-system { background-color: #34495e; }
.badge-bonus { background-color: #a335ee; }
.badge-user { background-color: #0070dd; }

.card-mp-track { width: 110px; height: 12px; background-color: #111; border: 1px solid #333; position: relative; }
.card-mp-fill { height: 100%; background-color: #1eff00; width: 0%; }
.card-mp-text { position: absolute; width: 100%; height: 100%; top: 0; left: 0; font-size: 8px; font-weight: bold; color: #ffffff; text-align: center; line-height: 10px; text-shadow: 1px 1px 1px #000; }
.card-mastered-banner { width: 100%; text-align: center; font-size: 11px; font-weight: bold; color: #ff8000; font-family: 'Georgia', serif; }

/* --- VIEW 6: ORACLE MENU --- */
.oracle-layout { width: 100%; height: 100%; position: relative; }
.oracle-menu-column { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 15px; width: 280px; }
.oracle-row-btn { background-color: var(--container-bg); color: #ffffff; border: 1px solid #444444; padding: 12px; font-size: 13px; font-weight: bold; cursor: pointer; box-shadow: 2px 2px 4px rgba(0,0,0,0.4); text-align: center; }
.oracle-row-btn:hover { border-color: var(--wow-gold); color: var(--wow-gold); }
.oracle-menu-column .sub-tier-btn { background-color: #a335ee; }

/* --- VIEW 4 OVERWORLD MAP TACTICAL HUD EXPANSIONS --- */
.explore-map-layout {
    width: 100%;
    height: 100%;
    position: relative;
    background-image: url('./assets/background_map.png');
    background-size: cover;
    background-position: center;
}

.hud-scrollable-zone {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 4px;
}

.hud-list {
    list-style: none;
    margin-top: 5px;
    margin-bottom: 15px;
}

.hud-list li {
    font-size: 11px;
    color: #ffffff;
    padding: 3px 0 3px 12px;
    position: relative;
    font-family: 'Consolas', monospace;
}

.hud-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--wow-gold);
}

.hud-list .mob-normal { color: #ffffff; }
.hud-list .mob-miniboss { color: var(--wow-purple); font-weight: bold; }
.hud-list .mob-boss { color: var(--tier-mastered); font-weight: bold; }

.hud-list .vocab-lemma { color: var(--wow-gold); font-weight: bold; }
.hud-list .vocab-trans { color: #bdc3c7; font-style: italic; }

/* Interactive Retro Combat Action Launcher Button */
.hud-action-trigger {
    width: 100%;
    background-color: #a335ee;
    color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    padding: 10px;
    border-top: 2px solid #c87eff;
    border-left: 2px solid #c87eff;
    border-right: 2px solid #57168c;
    border-bottom: 2px solid #57168c;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4);
    font-family: 'Consolas', monospace;
    transition: all 0.1s ease;
}

.hud-action-trigger:hover {
    border-color: #ffffff;
    box-shadow: 0 0 8px #a335ee;
}

.hud-action-trigger:active {
    border-top: 2px solid #57168c;
    border-left: 2px solid #57168c;
    border-right: 2px solid #c87eff;
    border-bottom: 2px solid #c87eff;
    background-color: #57168c;
}

/* --- OVERWORLD MAP NODE SELECTION LAYER --- */
.map-nodes-canvas-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; /* Prevents container from blocking side panel clicks */
    z-index: 5;
}

.map-node-marker {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--container-bg);
    border: 3px solid #4f6f8f;
    color: var(--wow-gold);
    font-family: 'Consolas', monospace;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto; /* Restores click tracking capability onto button circles */
    box-shadow: 0 4px 8px rgba(0,0,0,0.6);
    transform: translate(-50%, -50%);
    z-index: 100; /* Forces nodes to float on top of backgrounds and sidebar menus */
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-node-marker:hover {
    border-color: #ffffff;
    color: #ffffff;
    transform: translate(-50%, -50%) scale(1.15);
}

/* Selected Focus Glow Highlights Ring */
.map-node-marker.active-node {
    border-color: var(--wow-gold);
    background-color: #1a252f;
    box-shadow: 0 0 15px var(--wow-gold), inset 0 0 6px var(--wow-gold);
    animation: pulseGlowNode 2s infinite alternate;
}

/* Locked Progression Node Shading */
.map-node-marker.locked-node {
    background-color: #1c1c1c;
    border-color: #444444;
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
}
.map-node-marker.locked-node:hover {
    transform: translate(-50%, -50%);
}

@keyframes pulseGlowNode {
    0% { box-shadow: 0 0 8px var(--wow-gold), inset 0 0 2px var(--wow-gold); }
    100% { box-shadow: 0 0 20px var(--wow-gold), inset 0 0 8px var(--wow-gold); }
}

/* --- VIEW 2 CORE GAMEPLAY LOBBY ARENA CONTAINER --- */
.arena-viewport-wrapper {
    width: 100%; height: 100%;
    position: relative;
    background-image: url('./assets/background_training.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Structural Configuration Layers for Combat Mode vs Training Variants */
.arena-viewport-wrapper.mode-training { background-image: url('./assets/background_training.png'); }
.arena-viewport-wrapper.mode-combat { background-image: url('./assets/background_boss.png'); }
.arena-viewport-wrapper.mode-training #enemy-vitals-block { display: none !important; }

/* Top Unified Vitality Tracking Matrix HUD Panels */
.arena-vitals-tray {
    position: absolute;
    top: 20px; left: 20px;
    width: calc(100% - 360px); /* Leaves space clear for logging channels console */
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.combatant-hud-block {
    background-color: rgba(0, 0, 0, 0.75);
    border: 2px solid #4f6f8f;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.hud-identity-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-family: 'Georgia', serif;
}
.hud-name-label { color: var(--wow-gold); font-weight: bold; font-size: 14px; }
.hud-tier-label { color: var(--wow-gray); font-weight: bold; font-size: 12px; }

.hud-gauge-bar {
    width: 100%; height: 18px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    position: relative;
    margin-bottom: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}
.hud-gauge-fill { height: 100%; transition: width 0.15s ease-out; }
.enemy-hp-track .hud-gauge-fill { background: linear-gradient(to bottom, #cc0000, #880000); }
.player-hp-track .hud-gauge-fill { background: linear-gradient(to bottom, #00c900, #007700); }


.hud-gauge-text {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #ffffff;
    font-weight: bold;
    font-family: 'Consolas', monospace;
    text-shadow: 1px 1px 2px #000;
}



.prompt-text-shield {
    background-color: rgba(0, 0, 0, 0.65);
    padding: 12px 30px;
    border-radius: 6px;
    text-align: center;
    font-family: 'Georgia', serif;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px #000, -2px -2px 4px #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.title-shield { font-size: 20px; color: var(--wow-purple); border: 2px solid var(--wow-purple); }
.target-shield { font-size: 28px; border: 2px solid #ffffff; letter-spacing: 1px; min-width: 250px;}



.arena-action-trigger { display: none; }
.arena-action-tray.active-tray { display: block !important; }


.tray-subtext-hint {
    font-size: 11px;
    font-family: 'Consolas', monospace;
    color: var(--wow-gray);
    text-align: center;
    margin-top: 6px;
}

/* Intercept Directional Parry Positioning Grid Elements */
#arena-parry-tray { display: none; position: relative; height: 140px; }
.parry-node-btn {
    position: absolute;
    background-color: #1c252f;
    color: #ffaa00;
    border: 2px solid #ffaa00;
    padding: 8px 16px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}
.parry-node-btn:hover { background-color: #ffaa00; color: #1c252f; }

.dir-up { top: 0%; left: 50%; transform: translateX(-50%); }
.dir-down { bottom: 0%; left: 50%; transform: translateX(-50%); }


/* Dispel Mechanics Layout Blocks */
#arena-dispel-tray { display: none; background: rgba(0,0,0,0.85); border: 2px solid #ff6600; padding: 15px; border-radius: 6px; }
#dispel-prompt-title { text-align: center; font-family: 'Georgia', serif; font-size: 15px; margin-bottom: 12px; }
.dispel-grid-matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 400px; margin: 0 auto; }
.dispel-grid-matrix .parry-node-btn { position: static; width: 100%; text-align: center; border-color: #ff6600; color: #ff6600; }
.dispel-grid-matrix .parry-node-btn:hover { background-color: #ff6600; color: #ffffff; }

/* Real-Time Right Console Split Streams */
.arena-sidebar-console {
    position: absolute;
    top: 20px; right: 20px;
    width: 300px; height: calc(100% - 150px);
    background-color: rgba(12, 15, 18, 0.9);
    border: 2px solid #2c3e50;
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: -4px 0 15px rgba(0,0,0,0.6);
}

.console-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a252f;
    border-bottom: 2px solid #2c3e50;
    padding: 6px 10px;
}
.console-tab-trigger {
    background: #34495e; color: #ffffff; border: 1px solid #555;
    padding: 4px 8px; font-size: 11px; cursor: pointer; font-family: 'Consolas', monospace;
}
.console-tab-trigger:hover { background: var(--wow-purple); }
.console-metric-label { font-size: 11px; font-family: 'Consolas', monospace; color: var(--wow-gold); font-weight: bold; }

.console-body-scroll { 
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 10px; 
    display: flex; 
    flex-direction: column; 
}

.terminal-stream { 
    display: none; 
    font-family: 'Consolas', monospace; 
    font-size: 11px; 
    line-height: 1.4; 
    white-space: pre-wrap; 
}

.terminal-stream.active-stream { 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    min-height: 100%; 
}

/* Core Logging Stream Color Token Modifiers */
.terminal-stream .color-red { color: #ff4444; }
.terminal-stream .color-green { color: #00ff00; }
.terminal-stream .color-gold { color: #ffcc00; }
.terminal-stream .color-purple { color: #d681ff; }
.terminal-stream .color-cyan { color: #00ffff; }
.terminal-stream .color-gray { color: #7f8c8d; }

/* Responsive Condensed Status Anomalies Debuffs Bar Dashboard Elements */
.arena-status-matrix-bar {
    position: absolute;
    bottom: 20px; left: 20px;
    width: fit-content; /* Dynamically shrinks to sit cleanly past the 9th tracking slot node */
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #334455;
    padding: 8px 12px;
    border-radius: 4px;
}

/* Force baseline hidden state on combat action trays until toggled active */
.arena-action-tray {
    display: none;
}
.arena-action-trigger { display: none; }
.arena-action-tray.active-tray { display: block !important; }

/* Reduce total width by 50% and perfectly center the prompt input field */
.arena-cmd-input {
    width: 50%;
    margin: 0 auto;
    display: block;
    background-color: #0c0f12;
    border: 2px solid #4f6f8f;
    color: #ffffff;
    font-size: 18px;
    padding: 12px;
    font-family: 'Consolas', monospace;
    text-align: center;
    outline: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6), inset 0 2px 4px rgba(0,0,0,0.8);
}
.arena-cmd-input:focus { border-color: var(--wow-gold); box-shadow: 0 0 10px var(--wow-gold); }

/* Vertically align the prompted word stage with the center axis of the control deck elements */
.arena-prompt-stage {
    position: absolute;
    top: 32%;
    left: calc(50% - 160px); /* Aligns perfectly with the horizontal center line of the input deck */
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 5;
    width: 60%;
}

/* Classic Fantasy RPG Thematic Design for the Arena Retreat Trigger */
#arena-retreat-trigger {
    bottom: 18px;
    background-color: #5c1414; /* Crimson Red dark tone base */
    color: var(--wow-gold);
    border: 2px solid #b8860b; /* Dark Goldenrod fantasy border frame */
    padding: 8px 28px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    text-shadow: 1px 1px 2px #000;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
#arena-retreat-trigger:hover {
    background-color: #801c1c; /* Brighter threat alert red highlight */
    border-color: var(--wow-gold);
    color: #ffffff;
}

.status-tray-title { font-size: 9px; font-family: 'Consolas', monospace; color: #8899aa; margin-bottom: 4px; }
.debuff-slots-grid { display: flex; gap: 8px; }

.debuff-slot-node {
    width: 32px; height: 32px;
    background-color: #111;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    position: relative;
    cursor: pointer;
    border-radius: 3px;
}
.debuff-slot-node.focus-targeted { border-color: var(--wow-gold); box-shadow: 0 0 6px var(--wow-gold); }
.debuff-slot-node .slot-hotkey-tag {
    position: absolute; bottom: 1px; right: 2px;
    font-size: 8px; color: #666; font-family: monospace; font-weight: bold;
}
.debuff-slot-node.active-debuff { border-color: #ff3333; }
.debuff-slot-node .debuff-duration-tag {
    position: absolute; top: 1px; left: 2px;
    font-size: 8px; color: #fff; background: rgba(0,0,0,0.7); padding: 0 1px; font-family: monospace;
}

/* Modal Popup Curtains Configuration Overlays */
.arena-modal-curtain {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.45); /* Softer tint allows underlying log text to remain visible */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none; /* Allows mouse wheels to scroll lists and panels directly underneath the tint curtain */
}
.arena-modal-curtain.active-modal { display: flex !important; }

.arena-modal-box {
    width: 480px; background-color: rgba(12, 15, 18, 0.95);
    border: 3px solid var(--wow-gold); padding: 30px;
    text-align: center; box-shadow: 0 0 25px rgba(255, 128, 0, 0.3);
    border-radius: 6px;
    pointer-events: auto; /* Restores interactive click captures to the modal card elements and launcher buttons */
}

/* Centered Parry Prompt Shield Overlay Vector Placement */
#arena-parry-tray #arena-word-backdrop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    font-size: 18px;
    padding: 6px 16px;
    background-color: rgba(12, 15, 18, 0.95);
    border: 2px solid #ffaa00;
    min-width: 180px;
}
#arena-modal-title { font-family: 'Georgia', serif; font-size: 36px; color: var(--wow-gold); margin-bottom: 10px; }
#arena-modal-subtitle { font-family: 'Georgia', serif; font-size: 18px; color: #ffffff; margin-bottom: 20px; font-style: italic; }
#arena-modal-prompt { font-family: 'Consolas', monospace; font-size: 12px; color: var(--wow-gray); }

/* Shaking Structural Layout Animation Tokens */
.arena-cmd-input.shake-incorrect { animation: shakeInputVector 0.25s ease-in-out; border-color: #ff3333; }
@keyframes shakeInputVector {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}



/* Adjusted Interface Deck Controller Positioning */
.arena-input-control-deck {
    position: absolute;
    bottom: 145px; /* Shifted up to avoid layout element occlusion */
    left: 20px;
    width: calc(100% - 360px);
    z-index: 10;
}

/* Relocated Player Vitals Container Styling */
.player-relocated-hud {
    position: absolute;
    bottom: 65px; /* Anchored cleanly directly above the lower debuff deck container */
    left: 20px;
    width: calc(100% - 360px);
    z-index: 10;
    background-color: rgba(12, 15, 18, 0.95);
    border: 2px solid #4f6f8f;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

/* Redefined Base Cast Speed Tracking Track Bar */
.enemy-cast-track {
    height: 15px;
    margin-bottom: 2px;
}

/* Nested Special Attack Charge Indicator Bar */
.enemy-special-track {
    height: 5px; /* Exactly 1/3 height of the primary swing bar */
    margin-bottom: 4px;
    background-color: #111111;
    border: 1px solid #2d2d2d;
    position: relative;
}
.enemy-special-track .hud-gauge-fill {
    background: linear-gradient(to bottom, #a335ee, #57168c); /* Distinct Purple theme token */
}

/* Widened Parry Direction Arrow Button Anchors */
.dir-left { top: 40%; left: 3%; }  /* Expanded spacing limits to prevent long word overlap */
.dir-right { top: 40%; right: 3%; } /* Expanded spacing limits to prevent long word overlap */

/* Absolute Spacing Override Container for Central Parry Display Words */
#arena-parry-tray #arena-word-backdrop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    font-size: 18px;
    padding: 8px 24px;
    background-color: rgba(12, 15, 18, 0.98);
    border: 2px solid #ffaa00;
    min-width: 220px;
    box-shadow: 0 0 12px rgba(0,0,0,0.8);
}

/* Defeat Curtain Sidebar Readability Isolation Highlights */
.arena-viewport-wrapper:has(.arena-modal-curtain.active-modal) .arena-sidebar-console:hover {
    z-index: 110 !important;
    background-color: rgba(12, 15, 18, 1) !important;
    border-color: var(--wow-gold) !important;
    box-shadow: 0 0 15px rgba(239, 241, 196, 0.4);
}
.arena-viewport-wrapper:has(.arena-modal-curtain.active-modal) .arena-sidebar-console:hover * {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Remove Adversary/Parry Title Backdrop Shields Completely from Game Viewports */
#arena-name-backdrop, .title-shield {
    display: none !important;
}

/* Contract Console Height to accommodate the New Action Instruction Label Block */
.arena-sidebar-console {
    height: calc(100% - 190px) !important;
}

/* Absolute Geometric Coordinates for New Core Instruction Label Card Container */
.arena-instruction-label {
    position: absolute;
    bottom: 112px;
    right: 20px;
    width: 300px;
    height: 38px;
    background-color: rgba(12, 15, 18, 0.95);
    border: 2px solid #2c3e50;
    color: var(--wow-gold);
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: -4px 4px 12px rgba(0,0,0,0.6);
    z-index: 10;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Handle Highlight Readability Extensions for instructions block during modal tints */
.arena-viewport-wrapper:has(.arena-modal-curtain.active-modal) .arena-instruction-label {
    opacity: 0.3;
}

/* Isolated Floating Layout Trigger Button for the Home Screen Canvas Selection */
.wip-town-btn {
    position: absolute;
    top: 50px;
    right: 20px;
    background-color: var(--container-bg);
    color: var(--wow-gold);
    border: 2px solid #4f6f8f;
    padding: 6px 18px;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    z-index: 100;
    transition: all 0.15s ease;
}
.wip-town-btn:hover {
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 0 10px var(--wow-gold);
    transform: translateY(-1px);
}

/* Core Full-Screen Geometry Settings for the Procedural 3/4 RPG Overworld Viewport Shell */
.town-viewport-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #2f3640; /* Clean daytime ambient base color */
    display: block;
    overflow: hidden;
}

#town-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #353b48;
}

/* Minimalist Isometric HUD Informational Dashboard Panels */
.town-hud-card {
    position: absolute;
    top: 25px;
    left: 25px;
    background-color: rgba(12, 15, 18, 0.9);
    border: 2px solid #4f6f8f;
    padding: 15px 20px;
    font-family: 'Consolas', monospace;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    z-index: 10;
    border-radius: 4px;
    pointer-events: auto;
}

/* Minimalist Isometric HUD Informational Dashboard Panels */
.town-hud-card {
    position: absolute;
    top: 25px;
    left: 25px;
    background-color: rgba(12, 15, 18, 0.95);
    border: 2px solid #2c3e50;
    padding: 15px 20px;
    font-family: 'Consolas', monospace;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    z-index: 10;
    border-radius: 4px;
    pointer-events: auto;
}
.town-hud-card h3 {
    color: var(--wow-gold);
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #2c3e50;
    padding-bottom: 4px;
}
.town-hud-card p {
    font-size: 11px;
    color: #bdc3c7;
    margin-bottom: 5px;
    line-height: 1.4;
}
.town-hud-trigger {
    margin-top: 12px;
    background-color: #5c1414;
    color: var(--wow-gold);
    border: 1px solid #b8860b;
    padding: 6px 12px;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    transition: background-color 0.1s ease;
}
.town-hud-trigger:hover {
    background-color: #801c1c;
    border-color: #ffffff;
    color: #ffffff;
}
