.hp-trackers input, .stress-trackers input {
    margin: 0 2px;
}

.adversary-card .form-check-input {
    min-width: 1.2em;
    min-height: 1.2em;
}

details > summary {
    cursor: pointer;
    font-weight: bold;
}

.adversary-image {
    width: 100%;
    height: auto;
    max-height: 180px;
    min-height: 120px;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.adversary-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

/* Adversary collapse/expand styling */
.adversary-header {
    user-select: none;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.375rem 0.375rem 0 0 !important;
}

.adversary-card.collapsed .adversary-header {
    border-radius: 0.375rem !important;
    border-bottom: none;
}

.collapse-toggle-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.collapse-toggle-btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: scale(1.05);
}

.collapse-arrow {
    transition: transform 0.2s ease;
    font-size: 0.875rem;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
}

.adversary-header .adversary-name-input {
    background: transparent;
    border: none;
    font-weight: 500;
}

.adversary-header .adversary-name-input:focus {
    background: white;
    border: 1px solid #007bff;
}

.adversary-content {
    border-top: none;
}

/* Ensure the image container takes available space */
.adversary-card .col-md-4 {
    display: flex;
    flex-direction: column;
}

.adversary-card .col-md-4 .adversary-image {
    flex-grow: 1;
    max-height: 200px;
}

/* Mobile responsiveness for adversary images */
@media (max-width: 768px) {
    .adversary-image {
        max-height: 150px;
        min-height: 100px;
    }
    
    .adversary-card .row {
        flex-direction: column;
    }
    
    .adversary-card .col-md-4,
    .adversary-card .col-md-8 {
        max-width: 100%;
        flex: 0 0 100%;
    }
}

.maxed-out {
    background-color: #ffdddd;
    border: 1px solid red;
    padding: 5px;
    border-radius: 5px;
}

/* Mobile optimizations for help modal */
@media (max-width: 768px) {
    #help-modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    #help-modal .modal-body {
        padding: 1rem 0.5rem;
    }
    
    #help-modal .accordion-body {
        padding: 0.75rem;
    }
    
    #help-modal .accordion-body ul {
        padding-left: 1rem;
    }
    
    #help-modal .accordion-body li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Image preview modal styling */
#image-preview-modal .modal-body {
    padding: 0.5rem;
    background-color: #f8f9fa;
}

#image-preview-modal .modal-body img {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    #image-preview-modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    #image-preview-modal .modal-body img {
        max-height: 70vh;
    }
}