/* Main Layout */
#player-layout {
    display: grid; /* Keep layout */
    grid-template-columns: 300px 1fr; /* Adjusted column size */
    gap: 1.5rem; /* Keep spacing */
    height: calc(100vh - 8rem); /* Keep height */
    color: var(--clay-text-primary); /* Use theme variable */
}

#player-info-column,
#player-details-column {
    background: var(--gradient-surface); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.75rem; /* Adjusted rounding */
    padding: 1.5rem; /* Keep padding */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 1.5rem; /* Keep spacing */
    box-shadow: var(--clay-shadow); /* Use theme variable */
    overflow: hidden; /* Keep layout */
}

/* Left Column: Player Info */
#player-image-container {
    border-radius: 0.5rem; /* Adjusted rounding */
    aspect-ratio: 1 / 1; /* Keep layout */
    background-size: cover; /* Keep layout */
    background-position: center; /* Keep layout */
    overflow: hidden; /* Keep layout */
    border: 1px solid var(--clay-border); /* Add border */
    background-color: var(--clay-dark); /* Add background */
}

#player-image {
    width: 100%; /* Keep layout */
    height: 100%; /* Keep layout */
    object-fit: cover; /* Keep layout */
}

#player-vitals {
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 1rem; /* Adjusted gap */
    margin-top: auto; /* Push vitals down */
}

/* Right Column: Details */
#player-tabs {
    display: flex; /* Keep layout */
    border-bottom: 1px solid var(--clay-border); /* Use theme variable */
    flex-shrink: 0; /* Keep layout */
    margin-bottom: 1.5rem; /* Add margin */
}

.player-tab-btn {
    /* Styles handled by clay-theme.css */
    padding: 0.75rem 1.25rem; /* Keep padding */
    font-size: 0.9rem; /* Adjusted size */
}

.player-tab-btn.active {
    color: var(--clay-secondary); /* Use theme variable */
    border-bottom-color: var(--clay-secondary); /* Use theme variable */
}

#player-tab-content {
    flex-grow: 1; /* Keep layout */
    overflow-y: auto; /* Keep layout */
    padding-right: 0.5rem; /* Keep padding */
}

.player-tab-panel {
    animation: fadeIn 0.3s ease-in-out; /* Keep animation */
}
/* Removed redundant keyframes */
.player-tab-panel.hidden { display: none; } /* Keep utility */

/* Stats Tab */
.stats-panel-grid {
    display: grid; /* Keep layout */
    grid-template-columns: 1fr 1fr; /* Keep layout */
    gap: 1.5rem; /* Keep spacing */
}
.stat-category-title {
    /* Styles handled by clay-theme.css */
    font-size: 1rem; /* Adjusted size */
}
/* Style for the new Class Attributes title */
.class-attributes-title {
    margin-top: 1.5rem; /* Add some space above */
}

.stats-grid {
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 0.5rem; /* Adjusted gap */
}
.stat-block {
    display: flex; /* Keep layout */
    justify-content: space-between; /* Keep layout */
    align-items: center; /* Keep layout */
    padding: 0.6rem 0.8rem; /* Adjusted padding */
    border-radius: 0.375rem; /* Keep rounding */
    /* Backgrounds handled by theme */
}
.stat-label { /* Styles handled by theme */ }
.stat-value { /* Styles handled by theme */ }

/* Equipment Tab */
#equipment-content {
    display: grid; /* Keep layout */
    grid-template-columns: 180px 1fr; /* Adjusted column sizes */
    gap: 1.5rem; /* Keep spacing */
    height: 100%; /* Keep layout */
}
#equipment-grid-container {
    display: grid; /* Keep layout */
    grid-template-columns: repeat(2, 1fr); /* Keep layout */
    gap: 0.75rem; /* Adjusted gap */
    align-content: start; /* Keep layout */
}
.equipment-slot {
    aspect-ratio: 1 / 1; /* Keep layout */
    background-color: var(--clay-dark); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.5rem; /* Adjusted rounding */
    cursor: pointer; /* Keep interaction */
    transition: all 0.2s; /* Keep transition */
    display: flex; /* Keep layout */
    align-items: center; /* Keep layout */
    justify-content: center; /* Keep layout */
}
.equipment-slot img { width: 70%; height: 70%; object-fit: contain; } /* Keep layout */
.equipment-slot.selected { border-color: var(--clay-focus); background-color: var(--clay-medium); } /* Use theme variables */
/* REMOVED HOVER EFFECT FOR EQUIPMENT SLOT
.equipment-slot:hover { border-color: var(--clay-focus); background-color: var(--clay-medium); } */

#equipment-details-container {
    background-color: var(--clay-dark); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.5rem; /* Adjusted rounding */
    padding: 1rem; /* Adjusted padding */
    color: var(--clay-text-secondary); /* Use theme variable */
    text-align: center; /* Keep layout */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
}
#equipment-details-container h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--clay-text-primary); } /* Adjusted styles */
#equipment-details-container .details-image { /* Style placeholder or item image */
    width: 80px; height: 80px; margin: 0 auto 0.75rem; background-color: var(--clay-darker); border-radius: 0.375rem; padding: 0.5rem; border: 1px solid var(--clay-border); object-fit: contain;
}
.details-body { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; flex-grow: 1; overflow-y: auto; padding-right: 0.3rem;} /* Adjusted layout */
.details-stats-grid { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; } /* Adjusted layout */
.details-stat { display: flex; justify-content: space-between; padding: 0.4rem 0.6rem; border-radius: 0.25rem; text-transform: capitalize; font-size: 0.8rem; /* Background handled by theme */ }
.details-stat .label { color: var(--clay-text-secondary) !important; }
.details-stat .value { color: var(--clay-text-primary) !important; font-weight: 600; }
.details-btn { /* Styles handled by theme */ width: 100%; padding: 0.6rem; margin-top: auto; font-size: 0.85rem; }

.details-subsection { display: flex; flex-direction: column; gap: 0.4rem; text-align: left; }
.details-subsection .stat-category-title { margin-bottom: 0.1rem; }
.weapon-skill-list { display: flex; flex-direction: column; gap: 0.5rem; }
.weapon-skill-card {
    background: rgba(248, 187, 208, 0.08);
    border: 1px solid rgba(248, 187, 208, 0.3);
    border-radius: 0.35rem;
    padding: 0.6rem 0.75rem;
    color: #f8bbd0;
    font-size: 0.8rem;
}
.weapon-skill-header { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.weapon-skill-total { font-weight: 700; }
.weapon-skill-meta { display: flex; flex-wrap: wrap; gap: 0.65rem; font-size: 0.7rem; opacity: 0.85; }
.weapon-skill-description { margin-top: 0.4rem; font-size: 0.75rem; color: rgba(248, 187, 208, 0.9); }

#equipment-details-container .armor-card-skill-list { gap: 0.4rem; }
.armor-card-skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.55rem;
    background: rgba(248, 187, 208, 0.08);
    border: 1px solid rgba(248, 187, 208, 0.4);
    border-radius: 0.25rem;
    color: #f8bbd0;
    font-size: 0.75rem;
}
.armor-card-skill .skill-label { font-weight: 600; }
.armor-card-skill .skill-value { font-weight: 700; }

.armor-type { /* Kept original styles */
    font-size: 1rem;
    font-weight: 600;
    color: #cbd5e0; /* Consider using theme variable */
}


/* Weapon Info Tab */
.weapon-info-section { margin-bottom: 1.5rem; } /* Keep spacing */
.weapon-info-section h4 { /* Styles handled by theme */ font-size: 1rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; } /* Adjusted gap */
.info-item { /* Styles handled by theme */ padding: 0.5rem 0.75rem; font-size: 0.8rem; }
.info-item .label { /* Styles handled by theme */ }
.info-item .value { /* Styles handled by theme */ }
.info-item.positive .value { color: var(--clay-success); } /* Keep status colors */
.info-item.negative .value { color: var(--clay-error); } /* Keep status colors */


/* Re-using Bar Styles */
.bar-container { margin-bottom: 0; } /* Remove bottom margin */
.bar-labels { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 0.25rem; font-size: 0.8rem; color: var(--clay-text-secondary); } /* Adjusted size/color */
.bar-label { font-weight: 500; color: var(--clay-text-primary); } /* Adjusted weight/color */
.bar-value { /* Styles handled in clay-theme.css */ }
.bar-track { /* Styles handled in clay-theme.css */ height: 1rem; } /* Adjusted height */
.bar-fill { /* Styles handled in clay-theme.css */ }

/* Stat Background Colors - Handled by clay-theme.css */

/* Modal styles inherit */

/* Ensure text in stat blocks has correct color */
#player-view .stat-block .stat-label,
#player-view .stat-block .stat-value {
    color: var(--clay-text-primary) !important; /* Override theme if needed */
}
/* Adjust nested stat block label/value color */
#player-view .details-stat .stat-label { color: var(--clay-text-secondary) !important; }
#player-view .details-stat .stat-value { color: var(--clay-text-primary) !important; }

.chance-skill-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-radius: 0.35rem;
    background: rgba(248, 187, 208, 0.08);
    border: 1px solid rgba(248, 187, 208, 0.4);
    color: #f8bbd0;
    font-size: 0.85rem;
}
.chance-skill-entry .chance-skill-name { font-weight: 600; }
.chance-skill-entry .chance-skill-meta { font-size: 0.75rem; opacity: 0.8; margin-left: auto; }
