/* === COMBAT MODAL === */
.combat-modal-content {
    max-width: 500px;
    width: 92%;
    padding: 1.4rem 1.8rem 1.6rem;
    text-align: left;
    margin: auto;
}

.combat-enemy-area {
    text-align: center;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    margin-bottom: 0.7rem;
}

.combat-enemy-icon {
    font-size: 2.5rem;
    margin-bottom: 0.2rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(100, 120, 200, 0.4));
}

.combat-enemy-area h3 {
    font-family: 'MedievalSharp', cursive;
    color: #e08080;
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.combat-enemy-flavor {
    font-size: 0.82rem;
    font-style: italic;
    color: rgba(244, 228, 193, 0.4);
    margin: 0.1rem 0 0.5rem;
}

.combat-enemy-ac-info {
    display: block;
    font-size: 0.8rem;
    color: rgba(244, 228, 193, 0.5);
    margin-top: 0.3rem;
}

.combat-enemy-hp-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    justify-content: center;
}

.combat-hp-bar-wrap {
    flex: 1;
    max-width: 200px;
    height: 9px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.combat-enemy-hp-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b1a1a, #c0392b);
    border-radius: 5px;
    transition: width 0.4s ease;
}

@keyframes enemy-hit-flash {
    0%   { filter: brightness(1); }
    25%  { filter: brightness(2.5) saturate(0.2); }
    60%  { filter: brightness(1.6); }
    100% { filter: brightness(1); }
}

.combat-hp-bar-wrap.hit-flash {
    animation: enemy-hit-flash 0.45s ease-out;
}

@keyframes player-hit-flash {
    0%   { background: rgba(255,255,255,0.02); }
    30%  { background: rgba(220, 60, 60, 0.18); }
    100% { background: rgba(255,255,255,0.02); }
}

.combat-player-status.hit-flash {
    animation: player-hit-flash 0.55s ease-out;
}

.combat-hp-text {
    font-size: 0.82rem;
    color: rgba(244, 228, 193, 0.6);
    white-space: nowrap;
}

.combat-player-status {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.88rem;
    color: rgba(244, 228, 193, 0.65);
    margin-bottom: 0.6rem;
    padding: 0.4rem 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.combat-player-hp-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.combat-player-hp-label {
    font-size: 0.75rem;
    color: rgba(244, 228, 193, 0.45);
    text-transform: uppercase;
    font-family: 'MedievalSharp', cursive;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.combat-player-hp-bar-wrap {
    flex: 1;
    height: 7px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.combat-player-hp-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.35s ease, background-color 0.35s ease;
    background: linear-gradient(90deg, #1a6b2f, #2ecc71);
}

.combat-player-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.combat-ac-info {
    color: rgba(150, 200, 255, 0.7);
}

.combat-log {
    min-height: 100px;
    max-height: 160px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(201, 168, 76, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.8rem;
    font-family: 'Crimson Text', serif;
    font-size: 0.92rem;
}

.combat-log-entry { padding: 1px 0; line-height: 1.45; }
.combat-log-entry.hit           { color: #2ecc71; }
.combat-log-entry.miss          { color: rgba(244,228,193,0.35); font-style: italic; }
.combat-log-entry.critical      { color: #ffd700; font-weight: bold; }
.combat-log-entry.critical-fail { color: #c0392b; }
.combat-log-entry.enemy-hit     { color: #e74c3c; }
.combat-log-entry.enemy-miss    { color: rgba(244,228,193,0.35); font-style: italic; }
.combat-log-entry.enemy-crit    { color: #ff6b6b; font-weight: bold; }
.combat-log-entry.heal          { color: #27ae60; font-style: italic; }
.combat-log-entry.flee          { color: #5dade2; }
.combat-log-entry.flee-fail     { color: #e67e22; }
.combat-log-entry.loot          { color: var(--gold); font-style: italic; }
.combat-log-entry.defeat        { color: #c0392b; font-weight: bold; }
.combat-log-entry.ability       { color: #c09fda; font-style: italic; }
.combat-log-entry.rescue        { color: #9b59b6; font-weight: bold; }
.combat-log-entry.save-pass  { color: #5dade2; }
.combat-log-entry.save-fail  { color: #e67e22; }
.combat-log-entry.info          { color: rgba(244,228,193,0.5); }

.combat-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.combat-row-label {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.65rem;
    color: rgba(201, 168, 76, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: -0.15rem;
}

.combat-row-label.bonus-label {
    color: rgba(160, 120, 200, 0.55);
}

.combat-action-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.combat-bonus-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(160, 120, 200, 0.12);
    min-height: 2rem;
    flex-wrap: wrap;
}

.btn-bonus-action {
    border-color: rgba(160, 120, 200, 0.5) !important;
    color: #c09fda !important;
}

.btn-bonus-action:disabled,
.btn-bonus-action.bonus-used {
    opacity: 0.35;
    cursor: not-allowed;
}

.combat-round-badge {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.72rem;
    color: rgba(201, 168, 76, 0.55);
    letter-spacing: 0.05em;
    margin-left: auto;
}

.combat-slots-display {
    display: flex;
    gap: 4px;
    align-items: center;
}

.slot-pip {
    font-size: 0.6rem;
    color: rgba(201, 168, 76, 0.25);
    transition: color 0.2s;
}

.slot-pip.full {
    color: rgba(201, 168, 76, 0.8);
    filter: drop-shadow(0 0 3px rgba(201, 168, 76, 0.5));
}

.combat-action-tracker {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    padding: 0 0.1rem;
}

.action-pip {
    font-size: 0.63rem;
    font-family: 'MedievalSharp', cursive;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 2px 8px;
    border-radius: 3px;
    transition: all 0.25s ease;
    cursor: default;
    user-select: none;
}

.action-pip.action-available {
    color: rgba(78, 205, 128, 0.85);
    background: rgba(78, 205, 128, 0.07);
    border: 1px solid rgba(78, 205, 128, 0.22);
}

.action-pip.action-used {
    color: rgba(244, 228, 193, 0.18);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: line-through;
}

.action-pip.bonus-available {
    color: rgba(192, 159, 218, 0.85);
    background: rgba(160, 120, 200, 0.07);
    border: 1px solid rgba(160, 120, 200, 0.22);
}

.action-pip.bonus-used {
    color: rgba(244, 228, 193, 0.18);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: line-through;
}

.combat-conditions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
    min-height: 0;
}

.combat-conditions-row:empty {
    display: none;
}

.cond-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.cond-who {
    font-size: 0.72rem;
    color: rgba(244, 228, 193, 0.4);
    font-style: italic;
}

.condition-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 12px;
    border: 1px solid;
    white-space: nowrap;
    font-style: normal;
}

.combat-item-select { text-align: center; }

.combat-item-title {
    font-size: 0.88rem;
    color: rgba(244, 228, 193, 0.65);
    margin-bottom: 0.5rem;
}

.combat-item-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 0.6rem;
}

