#combat-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 5rem); /* Adjusted height */
    padding: 1rem; /* Added padding */
    background-color: var(--clay-darkest); /* Use theme variable */
    background-size: cover; /* Keep layout */
    background-position: center; /* Keep layout */
    box-sizing: border-box; /* Keep layout */
    color: var(--clay-text-primary); /* Use theme variable */
    overflow: hidden; /* Keep layout */
    font-family: 'Inter', sans-serif;
}

#combat-main-content {
    display: grid; /* Keep layout */
    grid-template-columns: 1fr 1fr 1fr; /* Keep layout */
    grid-template-rows: 1fr; /* Keep layout */
    gap: 1rem; /* Keep spacing */
    height: 100%; /* Keep layout */
    overflow: hidden; /* Keep layout */
    align-items: stretch; /* Keep layout */
}

.combat-col {
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 1rem; /* Keep spacing */
    min-height: 0; /* Keep layout */
    overflow: hidden; /* Keep layout */
}

.combat-box {
    background: var(--gradient-surface); /* Use theme variable */
    padding: 0.75rem; /* Adjusted padding */
    border-radius: 0.5rem; /* Adjusted rounding */
    border: 1px solid var(--clay-border); /* Use theme variable */
    box-shadow: var(--clay-shadow); /* Use theme variable */
    /* backdrop-filter: blur(10px); Removed blur for performance and consistency */
}

.image-box {
    height: 300px; /* Adjusted height */
    flex-shrink: 0; /* Keep layout */
    position: relative; /* Keep layout */
    overflow: hidden; /* Keep layout */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    justify-content: flex-end; /* Keep layout */
    align-items: center; /* Keep layout */
    padding: 0; /* Remove padding */
    background-color: var(--clay-dark); /* Add dark background */
}

#combat-player-icon,
#combat-monster-icon {
    max-width: 85%; /* Adjusted size */
    max-height: 85%; /* Adjusted size */
    object-fit: contain; /* Keep layout */
}

.combatant-header {
    width: 100%; /* Keep layout */
    display: flex; /* Keep layout */
    justify-content: space-between; /* Keep layout */
    align-items: center; /* Keep layout */
    padding: 0.75rem; /* Adjusted padding */
    position: absolute; /* Keep layout */
    top: 0; /* Keep layout */
    left: 0; /* Keep layout */
    background: linear-gradient(to bottom, var(--clay-overlay), transparent); /* Use theme variable */
    z-index: 1; /* Ensure header is above image */
}

.combatant-name {
    font-size: 1.1rem; /* Adjusted size */
    font-weight: 600; /* Adjusted weight */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); /* Keep shadow */
    color: var(--clay-text-primary); /* Use theme variable */
}

.combatant-level {
    font-size: 0.8rem; /* Adjusted size */
    font-weight: 500; /* Adjusted weight */
    padding: 0.2rem 0.5rem; /* Adjusted padding */
    background-color: var(--clay-dark); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.375rem; /* Keep rounding */
    color: var(--clay-text-secondary); /* Use theme variable */
}

.monster-type {
    /* Removed type display, kept styles minimal */
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background-color: var(--clay-dark);
    border: 1px solid var(--clay-border);
    border-radius: 0.375rem;
    color: var(--clay-text-secondary);
}

.combat-bar-container {
    width: 100%; /* Keep layout */
    margin-bottom: 0.5rem; /* Add margin */
}
/* Ensure bars stack correctly if needed */
.combat-box > .combat-bar-container:last-child {
    margin-bottom: 0;
}


.bar-labels {
    display: flex; /* Keep layout */
    justify-content: space-between; /* Keep layout */
    align-items: flex-end; /* Keep layout */
    margin-bottom: 0.25rem; /* Keep spacing */
    font-size: 0.8rem; /* Adjusted size */
}

.bar-label {
    font-weight: 500; /* Adjusted weight */
    color: var(--clay-text-secondary); /* Use theme variable */
}

.bar-value-text {
    font-family: monospace; /* Keep font */
    font-size: 0.8rem; /* Adjusted size */
    color: var(--clay-text-primary); /* Use theme variable */
}

.bar-track {
    width: 100%; /* Keep layout */
    border-radius: 9999px; /* Keep rounding */
    height: 0.75rem; /* Keep height */
    overflow: hidden; /* Keep layout */
    background-color: var(--clay-darker); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
}

.bar-fill {
    height: 100%; /* Keep layout */
    border-radius: 9999px; /* Keep rounding */
    transition: width 0.3s ease-in-out; /* Adjusted transition */
}

/* HP fill color defined in clay-theme.css */
.hp-fill { background: linear-gradient(90deg, #4CAF50, #81C784) !important; }

#combat-battlelog-container {
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    width: 100%; /* Keep layout */
    height: 100%; /* Keep layout */
    min-height: 0; /* Keep layout */
}

.battlelog-header {
    display: flex; /* Keep layout */
    justify-content: space-between; /* Keep layout */
    align-items: center; /* Keep layout */
    padding-bottom: 0.5rem; /* Adjusted padding */
    margin-bottom: 0.5rem; /* Adjusted margin */
    border-bottom: 1px solid var(--clay-border); /* Use theme variable */
    flex-shrink: 0; /* Prevent header shrinking */
}
.battlelog-header h4 {
    font-size: 1rem; /* Adjusted size */
    font-weight: 600; /* Adjusted weight */
    margin: 0;
    color: var(--clay-text-primary); /* Use theme variable */
}

.battle-status {
    font-size: 0.75rem; /* Adjusted size */
    font-weight: 500; /* Adjusted weight */
    padding: 0.2rem 0.5rem; /* Adjusted padding */
    background-color: var(--clay-dark); /* Use theme variable */
    border-radius: 0.375rem; /* Keep rounding */
    color: var(--clay-text-secondary); /* Use theme variable */
    transition: all 0.3s ease; /* Keep transition */
    text-transform: uppercase; /* Keep layout */
    letter-spacing: 0.05em; /* Keep layout */
    border: 1px solid var(--clay-border); /* Add border */
}

#combat-battlelog {
    flex: 1; /* Keep layout */
    overflow-y: auto; /* Keep layout */
    overflow-x: hidden; /* Keep layout */
    padding-right: 0.5rem; /* Keep padding */
    padding-left: 0.125rem; /* Keep padding */
}

/* Scrollbar styles inherit from clay-theme.css */

#combat-battlelog p {
    margin: 0.25rem 0; /* Keep spacing */
    padding: 0.4rem 0.6rem; /* Adjusted padding */
    border-radius: 0.25rem; /* Keep rounding */
    background-color: var(--clay-dark); /* Use theme variable */
    border-left: 3px solid var(--clay-border-light); /* Use theme variable */
    font-size: 0.8rem; /* Adjusted size */
    line-height: 1.4; /* Adjusted line height */
    animation: fadeIn 0.3s ease-in-out; /* Keep animation */
    transition: all 0.2s ease; /* Keep transition */
    color: var(--clay-text-secondary); /* Use theme variable */
}

/* REMOVED HOVER EFFECT FOR BATTLE LOG P
#combat-battlelog p:hover {
    background-color: var(--clay-medium);
    transform: translateX(2px);
} */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.combat-btn {
    /* Styles handled by clay-theme.css */
    padding: 0.5rem 1rem; /* Adjusted padding */
    font-size: 0.8rem; /* Adjusted size */
    text-transform: uppercase; /* Keep layout */
    letter-spacing: 0.05em; /* Keep layout */
}

#combat-footer {
    display: flex; /* Keep layout */
    justify-content: center; /* Keep layout */
    align-items: center; /* Keep layout */
    padding: 1rem 0 0 0; /* Adjusted padding */
    flex-shrink: 0; /* Prevent footer shrinking */
    border-top: 1px solid var(--clay-border); /* Add separator */
    margin-top: 1rem; /* Add spacing */
}

#stop-exploration-btn {
    /* Styles handled by clay-theme.css (danger button) */
    padding: 0.6rem 1.5rem; /* Adjusted padding */
    font-size: 0.9rem; /* Adjusted size */
}

.status-effects-container {
    display: flex; /* Keep layout */
    flex-wrap: wrap; /* Keep layout */
    gap: 0.5rem; /* Keep spacing */
    margin-top: 0.75rem; /* Add margin */
    min-height: 24px; /* Ensure space even when empty */
}
/* Style for individual status effect icons/badges would go here if added back */

/* Battle Log Type Colors */
#combat-battlelog p.log-player { color: var(--clay-info); border-left-color: var(--clay-info); background: linear-gradient(90deg, rgba(33, 150, 243, 0.05) 0%, var(--clay-dark) 100%); }
#combat-battlelog p.log-monster { color: var(--clay-error); border-left-color: var(--clay-error); background: linear-gradient(90deg, rgba(244, 67, 54, 0.05) 0%, var(--clay-dark) 100%); }
#combat-battlelog p.log-special { color: var(--clay-success); border-left-color: var(--clay-success); background: linear-gradient(90deg, rgba(76, 175, 80, 0.05) 0%, var(--clay-dark) 100%); }
#combat-battlelog p.log-skill { color: #f8bbd0; border-left-color: #f8bbd0; background: linear-gradient(90deg, rgba(248, 187, 208, 0.08) 0%, var(--clay-dark) 100%); }
