/* Ensure modal and backdrop are above the navbar */
.modal-backdrop {
    z-index: 1050 !important; /* Backdrop above navbar */
}

body {
    padding-top: 56px;
}

.modal {
    z-index: 1055; /* Ensure modal is above the navbar */
}

.navbar {
    z-index: 1040; /* Ensure navbar is below the modal */
}

/* Add padding to modal to account for fixed navbar */
.modal-dialog {
    margin-top: 60px; /* Adjust this value based on your navbar height */
}

/* Existing styles for character sheet */
.character-sheet {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.attribute {
    background: var(--bs-body-bg); /* Use Bootstrap's body background color */
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid var(--bs-primary); /* Use Bootstrap's primary color */
}

.attribute h3 {
    margin-top: 0;
    color: var(--bs-primary); /* Use Bootstrap's primary color */
}

.character-form {
    display: flex;
    flex-direction: row;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

/* General layout for the character record */
.character-record {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: var(--bs-body-color); /* Use Bootstrap's body text color */
}

.character-record .detail-row {
    display: flex;
    flex-direction: row;
    justify-content: start;
    gap: 1rem;
}

.character-record .section {
    grid-column: span 4; /* Full width by default */
    border: 1px solid var(--bs-border-color); /* Use Bootstrap's border color */
    padding: 1rem;
    background-color: var(--bs-body-bg); /* Use Bootstrap's body background color */
}

.character-record .section h3 {
    margin: 0 0 1rem;
    font-size: 16px;
    text-align: center;
    text-transform: uppercase;
    color: var(--bs-heading-color); /* Use Bootstrap's heading color */
}

.character-record .attribute {
    grid-column: span 1; /* Default to one column */
    border: 1px solid var(--bs-border-color); /* Use Bootstrap's border color */
    padding: 0.5rem;
    text-align: center;
    background-color: var(--bs-body-bg); /* Use Bootstrap's body background color */
}

.character-record .attribute span {
    display: block;
    font-weight: bold;
    margin-top: 0.5rem;
    color: var(--bs-primary); /* Use Bootstrap's primary color */
}

.character-record .attribute p {
    margin: 0;
    font-size: 12px;
    color: var(--bs-secondary-color); /* Use Bootstrap's secondary text color */
}

/* Specific sections */
.character-record .personal-info {
    gap: 2rem;
}

.character-record .attributes {
    grid-column: span 4; /* Full width */
    /*display: grid;
    grid-template-columns: repeat(4, 1fr); our columns for attributes */
    gap: 1rem;
}

.character-record .weapons {
    grid-column: span 4; /* Full width */
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Four columns for weapons */
    gap: 1rem;
}

/* Edit mode styles */
.character-record .edit-mode .detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.character-record .edit-mode .form-group {
    flex: 1;
    min-width: 200px;
}

.character-record .edit-mode label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--bs-primary);
}

.character-record .edit-mode .form-control {
    width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out;
}

.character-record .edit-mode .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Attribute grid in edit mode */
.character-record .edit-mode .attributes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.character-record .edit-mode .attribute {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group input[name="height_feet"],
.input-group input[name="height_inches"] {
    width: 70px;
}

.input-group-text {
    background-color: var(--bs-secondary-bg);
}

/* Label styling */
.field-header label {
    font-weight: 1000;
    font-size: 1.2rem;
    /* color: var(--bs-gray-800); */
}

/* Adjust spacing for the edit button to align with larger label */
.field-header .edit-toggle {
    margin-top: 2px;
}

/* Field value styling to maintain visual hierarchy */
.field-value {
    font-size: 1rem;
}

/* Align field values to the right within their flex containers */
.editable-field {
    display: flex;
    /* justify-content: flex-end; */
    align-items: center;
}

/* Personal Info section layout */
.character-record .section.personal-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Full-width fields within personal info */
.character-record .section.personal-info .field-group.full-width {
    grid-column: 1 / -1;
}

/* Adjust spacing for field groups */
.character-record .section.personal-info .field-group {
    margin-bottom: 1rem;
}

/* Modal header name field styles */
.modal-header .editable-field {
    display: flex;
    align-items: center;
}

.modal-header .field-edit {
    width: 100%;
}

.modal-header .field-edit input {
    font-size: 1.25rem;
    height: calc(1.5em + 0.75rem + 2px);
}

.modal-header .field-value {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.modified-indicator {
    color: var(--bs-warning);
    font-weight: bold;
    font-size: 1.2em;
    vertical-align: top;
}

/* Wound display styles */
.wound-display {
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: var(--bs-light);
    border: 1px solid var(--bs-border-color);
}
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}
.sortable i {
    transition: transform 0.2s ease;
}

.sortable:hover {
    background-color: rgba(255, 255, 255, 0.8);
}
.sortable.sort-asc i {
    transform: rotate(180deg);
}
.sortable.sort-desc i {
    transform: rotate(0deg);
}
.wound-display .badge {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.body-part-card {
    transition: all 0.2s ease-in-out;
}

.body-part-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.healthy-status {
    color: var(--bs-success);
    font-size: 1.5rem;
}

.wound-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--bs-primary);
}

.movement-penalties {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid var(--bs-warning);
}

.wound-table tbody tr:hover {
    background-color: var(--bs-light);
}

.wound-actions .btn {
    margin: 0 1px;
}

/* Healed wounds styling */
.table-secondary {
    background-color: var(--bs-light);
}

.table-secondary tbody tr {
    opacity: 0.8;
}

.table-secondary tbody tr:hover {
    opacity: 1;
    background-color: var(--bs-light);
}

.healed-wound-badge {
    opacity: 0.7;
}

.healed-wounds-section {
    border-top: 2px solid var(--bs-success);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Wound summary badges in header */
.wound-summary-badges .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.wound-summary-badges .badge i {
    margin-right: 0.25rem;
}

/* Responsive badge layout */
@media (max-width: 768px) {
    .wound-summary-badges {
        flex-wrap: wrap;
    }
    
    .wound-summary-badges .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
        margin-right: 0.25rem;
        margin-bottom: 0.25rem;
    }
}

/* Wild West Style Interface */
.pip-boy-interface {
    background: linear-gradient(135deg, #2c1810 0%, #1a0f08 100%);
    border: 3px solid #8B4513;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    box-shadow: 
        0 0 20px rgba(139, 69, 19, 0.4),
        inset 0 0 20px rgba(139, 69, 19, 0.1);
    font-family: 'Times New Roman', serif;
    color: #D2B48C;
    min-height: 500px;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 82, 45, 0.1) 0%, transparent 50%);
}

.character-health-layout {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.character-display {
    flex: 0 0 auto;
    min-width: 200px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.body-parts-sidebar {
    flex: 1;
    min-width: 0;
}

/* Character figure container for overlays */
.character-figure-container {
    position: relative;
    display: inline-block;
}

/* Smaller, better positioned cowboy figure */
.character-figure {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    z-index: 1;
    position: relative;
}

/* Body Part Overlays */
.body-part-overlay {
    position: absolute;
    z-index: 2;
    pointer-events: auto;
    transition: all 0.3s ease;
    border-radius: 4px;
    opacity: 0.7;
}

.body-part-overlay:hover {
    opacity: 1;
    transform: scale(1.05);
    z-index: 3;
}

/* Body part label */
.body-part-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 15, 8, 0.9);
    color: #D2B48C;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border: 1px solid #8B4513;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.body-part-overlay:hover .body-part-label {
    opacity: 1;
}

/* Body part overlay states */
.body-part-overlay.healthy {
    background: rgba(34, 139, 34, 0.3);
    border: 2px solid #228B22;
    box-shadow: 0 0 10px rgba(34, 139, 34, 0.3);
}

.body-part-overlay.wound-light {
    background: rgba(218, 165, 32, 0.4);
    border: 2px solid #DAA520;
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.4);
    animation: pulse-light 2s infinite;
}

.body-part-overlay.wound-serious {
    background: rgba(178, 34, 34, 0.5);
    border: 2px solid #B22222;
    box-shadow: 0 0 20px rgba(178, 34, 34, 0.5);
    animation: pulse-serious 1.5s infinite;
}

.body-part-overlay.wound-mortal {
    background: rgba(139, 0, 0, 0.6);
    border: 2px solid #8B0000;
    box-shadow: 0 0 25px rgba(139, 0, 0, 0.6);
    animation: pulse-mortal 1s infinite;
}

@keyframes pulse-light {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.9; }
}

@keyframes pulse-serious {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes pulse-mortal {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Specific body part positioning based on cowboy image - corrected placement */
.body-part-head {
    top: 12%;
    left: 40%;
    width: 20%;
    height: 11%;
}

/* Swapped left/right positioning and adjusted shoulders */
.body-part-left_shoulder {
    top: 22%;
    right: 15%;
    width: 18%;
    height: 10%;
}

.body-part-right_shoulder {
    top: 22%;
    left: 15%;
    width: 18%;
    height: 10%;
}

/* Swapped left/right positioning and moved arms lower */
.body-part-left_arm {
    top: 32%;
    right: 15%;
    width: 15%;
    height: 22%;
}

.body-part-right_arm {
    top: 32%;
    left: 15%;
    width: 15%;
    height: 22%;
}

/* Chest and abdomen remain the same */
.body-part-chest {
    top: 25%;
    left: 35%;
    width: 30%;
    height: 18%;
}

.body-part-abdomen {
    top: 43%;
    left: 35%;
    width: 30%;
    height: 12%;
}

/* Swapped left/right positioning, made legs wider and further from center */
.body-part-left_leg {
    top: 55%;
    right: 20%;
    width: 20%;
    height: 35%;
}

.body-part-right_leg {
    top: 55%;
    left: 20%;
    width: 20%;
    height: 35%;
}

/* Moved wound summary badges to below the image */
.character-status-overlay {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    z-index: 2;
}

.status-badge {
    background: rgba(26, 15, 8, 0.9);
    border: 2px solid #D2B48C;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    color: #D2B48C;
    text-align: center;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    font-weight: bold;
    white-space: nowrap;
}

.status-badge.wound-count {
    border-color: #CD853F;
    color: #CD853F;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Body Parts Sidebar - Vertical List Layout */
.body-parts-sidebar {
    background: rgba(26, 15, 8, 0.4);
    border: 2px solid #8B4513;
    border-radius: 6px;
    padding: 1rem;
}

.sidebar-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #8B4513;
}

.sidebar-header h6 {
    color: #D2B48C;
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

/* Changed from grid to vertical list */
.body-parts-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.body-part-card {
    background: rgba(26, 15, 8, 0.6);
    border: 2px solid #8B4513;
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.body-part-card:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

/* Body part card states */
.body-part-card.healthy {
    border-color: #D2B48C;
    background: rgba(210, 180, 140, 0.05);
}

.body-part-card.wound-light {
    border-color: #DAA520;
    background: rgba(218, 165, 32, 0.1);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.2);
}

.body-part-card.wound-serious {
    border-color: #B22222;
    background: rgba(178, 34, 34, 0.1);
    animation: pulse-serious 2s infinite;
    box-shadow: 0 0 15px rgba(178, 34, 34, 0.3);
}

.body-part-card.wound-mortal {
    border-color: #8B0000;
    background: rgba(139, 0, 0, 0.1);
    animation: pulse-mortal 1.5s infinite;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.4);
}

@keyframes pulse-serious {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes pulse-mortal {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.body-part-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.body-part-name {
    font-weight: bold;
    color: #D2B48C;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 120px;
}

.body-part-code {
    font-size: 0.7rem;
    color: #8B4513;
    background: rgba(139, 69, 19, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.body-part-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wound-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wound-severity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Wild West themed wound severity badges */
.severity-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
    background: rgba(26, 15, 8, 0.8);
}

/* Light wound styling */
.severity-badge.bg-warning {
    background: rgba(218, 165, 32, 0.9) !important;
    color: #1a0f08 !important;
    border-color: #DAA520;
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.3);
}

/* Serious wound styling */
.severity-badge.bg-danger {
    background: rgba(178, 34, 34, 0.9) !important;
    color: #F5DEB3 !important;
    border-color: #B22222;
    box-shadow: 0 0 8px rgba(178, 34, 34, 0.3);
}

/* Mortal wound styling */
.severity-badge.bg-dark {
    background: rgba(139, 0, 0, 0.9) !important;
    color: #F5DEB3 !important;
    border-color: #8B0000;
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.4);
}

.wound-date {
    color: #8B4513;
    font-size: 0.6rem;
    font-style: italic;
}

.wound-actions {
    display: flex;
    gap: 0.25rem;
}

.wound-actions .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.6rem;
    border-color: #D2B48C;
    color: #D2B48C;
    background: rgba(26, 15, 8, 0.8);
}

.wound-actions .btn:hover {
    background: #D2B48C;
    color: #1a0f08;
    box-shadow: 0 0 8px rgba(210, 180, 140, 0.4);
}

.healthy-status {
    color: #D2B48C;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.healthy-status i {
    font-size: 1rem;
    color: #D2B48C;
}

/* Status Panel */
.status-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.status-section h6 {
    color: #D2B48C;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.status-label {
    color: #D2B48C;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-value {
    color: #F5DEB3;
    font-weight: normal;
}

/* Responsive Design */
@media (max-width: 992px) {
    .character-health-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .character-display {
        min-width: auto;
        align-self: center;
        padding: 0.5rem;
    }
    
    .body-parts-sidebar {
        flex: none;
    }
    
    .character-status-overlay {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .pip-boy-interface {
        padding: 1rem;
    }
    
    .character-figure {
        max-width: 150px;
    }
    
    .character-status-overlay {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Adjust body part overlays for smaller screens */
    .body-part-overlay {
        opacity: 0.8;
    }
    
    .body-part-label {
        font-size: 0.5rem;
        padding: 0.1rem 0.3rem;
        bottom: -20px;
    }
    
    .body-part-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        min-height: auto;
    }
    
    .body-part-header {
        width: 100%;
        justify-content: space-between;
    }
    
    .body-part-content {
        width: 100%;
        justify-content: space-between;
    }
    
    .status-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .body-part-name {
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .body-part-code {
        font-size: 0.6rem;
    }
    
    .wound-actions .btn {
        padding: 0.15rem 0.3rem;
        font-size: 0.5rem;
    }
}

/* Campaign Location Tree Styles */
/* Nested location dropdown styles */
.dropdown-menu li {
    position: relative;
}

.dropdown-menu .dropdown-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -7px;
}

.dropdown-menu .dropdown-submenu-left {
    right: 100%;
    left: auto;
}

.dropdown-menu > li:hover > .dropdown-submenu {
    display: block;
}

.location-item {
    cursor: pointer;
}

/* Location tree container */
.location-tree-container {
    padding: 0;
}

.location-tree-node {
    margin-bottom: 0.5rem;
    position: relative;
}

.location-header {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background-color: var(--bs-secondary-bg);
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.location-header:hover {
    background-color: var(--bs-tertiary-bg);
}

.location-header .toggle-icon {
    width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.location-header .toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.location-header .location-icon {
    margin-left: 0.25rem;
    margin-right: 0.5rem;
}

.location-header .location-name {
    font-weight: 500;
    flex-grow: 1;
    color: var(--bs-body-color);
}

.location-children {
    margin-left: 1.5rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--bs-border-color);
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
}

.location-children.collapsed {
    max-height: 0 !important;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
}

.characters-list {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.character-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    transition: box-shadow 0.2s;
}

.character-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.character-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.character-icon {
    margin-right: 0.5rem;
    color: var(--bs-secondary-color);
}

.character-name {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--bs-body-color);
}

.character-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.child-locations {
    margin-top: 0.5rem;
}

.location-leaf-icon {
    font-size: 0.5em;
    opacity: 0.3;
}

/* Drag and drop styles for location tree */
.character-item[draggable="true"] {
    cursor: grab;
    position: relative;
}

.character-item[draggable="true"]:active {
    cursor: grabbing;
}

.character-item.dragging {
    opacity: 0.5;
    border: 2px dashed var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.location-header.drop-zone-active {
    background-color: var(--bs-primary-bg-subtle);
    border: 2px solid var(--bs-primary);
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.3);
    transform: scale(1.02);
    transition: all 0.2s ease-in-out;
}

.character-item[draggable="true"]:not(.dragging):hover {
    border-color: var(--bs-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Drag handle indicator */
.character-item[draggable="true"]::before {
    content: '⋮⋮';
    position: absolute;
    left: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
    opacity: 0;
    transition: opacity 0.2s;
    font-weight: bold;
    font-size: 0.9rem;
    line-height: 1;
}

.character-item[draggable="true"]:hover::before {
    opacity: 0.5;
}

.character-item[draggable="true"] .character-info {
    margin-left: 0.75rem;
}

/* Responsive adjustments for location tree */
@media (max-width: 768px) {
    .location-children {
        margin-left: 1rem;
        padding-left: 0.5rem;
    }
    
    .character-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .character-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .character-item[draggable="true"]::before {
        display: none;
    }
    
    .character-item[draggable="true"] .character-info {
        margin-left: 0;
    }
}