/* Stats Bar CSS - Horizontal stats bar at the top */

.stats-bar {
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-bottom: 2px solid #4ecdc4;
    flex-shrink: 0;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    min-width: 70px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    flex: 0 1 auto;
    max-width: 200px;
}

.stat-block-label {
    color: #4ecdc4;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    font-weight: bold;
}

.stat-block-value {
    color: #ffd700;
    font-size: 0.9em;
    font-weight: bold;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

.stat-block-sub {
    color: #aaa;
    font-size: 0.7em;
    margin-top: 2px;
}

/* Dantian block specific styling */
.stat-block.dantian-block {
    flex-direction: row;
    gap: 8px;
    padding: 5px 10px;
}

.stat-block.dantian-block .dantian-orb {
    width: 40px;
    height: 40px;
}

/* Broken/shattered dantian for Fist Cultivator */
.stat-block.dantian-block .dantian-orb.state-broken {
    background: radial-gradient(circle, #1a1a1a 30%, #0a0a0a 70%, #000 100%);
    border: 2px solid #333;
    border-radius: 50%;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8), 0 0 5px rgba(50, 50, 50, 0.3);
    animation: none;
}

.stat-block.dantian-block .dantian-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Combat stats block specific styling */
.stat-block.combat-stats-block {
    min-width: 240px;
    max-width: 320px;
    flex: 0 1 auto;
}

.stat-block.combat-stats-block .combat-stats-row {
    display: flex;
    gap: 12px;
    font-size: 0.72em;
    margin-top: 2px;
    white-space: nowrap;
}

/* HP bar inside combat stats block */
.combat-hp-bar-container {
    position: relative;
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
}

.combat-hp-bar-fill {
    height: 100%;
    width: 100%;
    background: #e74c3c;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.combat-hp-bar-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6em;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Elemental damage colors */
.dmg-fire { color: #e74c3c; }
.dmg-water { color: #3498db; }
.dmg-wood { color: #27ae60; }
.dmg-metal { color: #95a5a6; }
.dmg-earth { color: #d4a574; }

/* Elemental resistance colors */
.resist-fire { color: #e74c3c; }
.resist-water { color: #3498db; }
.resist-wood { color: #27ae60; }
.resist-metal { color: #95a5a6; }
.resist-earth { color: #d4a574; }

/* QI Progress within stats bar */
.stat-block .qi-progress-container {
    width: 100%;
    max-width: 100px;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
    border: 1px solid #4ecdc4;
}

.stat-block .qi-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #45b7aa 100%);
    transition: width 0.3s;
    border-radius: 2px;
}

/* Tiny progress bar for Body Realm display */
.progress-bar-tiny {
    width: 100%;
    max-width: 100px;
    height: 4px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid #d97706;
}

.progress-bar-fill-tiny {
    height: 100%;
    transition: width 0.3s;
    border-radius: 1px;
}

/* Spacer to push right section elements */
.stats-spacer {
    flex: 1;
    min-width: 20px;
}

/* Hidden stat blocks */
.stat-block.hidden {
    display: none !important;
}
