/* Research Detail Panel */
.research-detail-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    background: rgba(26, 26, 26, 0.98);
    border: 2px solid #e94560;
    border-radius: 8px;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(233, 69, 96, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.research-detail-panel.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.research-detail-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.research-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(233, 69, 96, 0.3);
}

.research-detail-header h2 {
    margin: 0;
    color: #e94560;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
}

.research-detail-header .close-button {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.research-detail-header .close-button:hover {
    color: #e94560;
}

/* Body */
.research-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Research Info */
.research-info {
    margin-bottom: 24px;
}

.research-subtitle {
    color: #888;
    font-style: italic;
    margin: 0 0 12px 0;
}

.research-description {
    color: #ccc;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.research-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid rgba(233, 69, 96, 0.4);
    border-radius: 12px;
    font-size: 0.85rem;
    color: #e94560;
}

.research-expected {
    color: #aaa;
    font-size: 0.9rem;
    font-style: italic;
}

.research-expected strong {
    color: #ccc;
}

/* Researchers Section */
.researchers-section {
    margin-bottom: 24px;
}

.researchers-section h3 {
    color: #e94560;
    font-size: 1.1rem;
    margin: 0 0 12px 0;
    font-family: 'Courier New', monospace;
}

.researchers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.researcher-card {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.researcher-card:hover {
    background: rgba(233, 69, 96, 0.2);
    border-color: rgba(233, 69, 96, 0.6);
    transform: translateY(-2px);
}

.researcher-card.assigned {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.4);
}

.researcher-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.researcher-card.disabled:hover {
    transform: none;
    background: rgba(233, 69, 96, 0.1);
}

.researcher-name {
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.researcher-title {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

.researcher-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.skill-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    font-size: 0.75rem;
    color: #4caf50;
}

.researcher-traits {
    font-size: 0.8rem;
    color: #aaa;
    font-style: italic;
    margin-bottom: 6px;
}

.researcher-status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.researcher-status.living {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.researcher-status.working,
.researcher-status.researching {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.no-researchers {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Modifiers Section */
.modifiers-section {
    margin-bottom: 24px;
}

.modifiers-section h3 {
    color: #e94560;
    font-size: 1.1rem;
    margin: 0 0 12px 0;
    font-family: 'Courier New', monospace;
}

.modifier-buttons {
    display: flex;
    gap: 8px;
}

.btn-modifier {
    flex: 1;
    padding: 10px;
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 4px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.btn-modifier:hover {
    background: rgba(233, 69, 96, 0.2);
    border-color: rgba(233, 69, 96, 0.5);
}

.btn-modifier.active {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
    color: #fff;
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.4);
}

/* Time Section */
.time-section {
    margin-bottom: 16px;
}

.time-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.time-label {
    color: #888;
}

.time-value {
    color: #e94560;
    font-weight: bold;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
}

/* Footer */
.research-detail-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(233, 69, 96, 0.3);
}

.research-detail-footer button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #e94560;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #ff5577;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.btn-primary:disabled {
    background: rgba(233, 69, 96, 0.3);
    color: #666;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    color: #ccc;
}

.btn-secondary:hover {
    background: rgba(233, 69, 96, 0.2);
    border-color: rgba(233, 69, 96, 0.5);
}

/* Scrollbar Styling */
.research-detail-body::-webkit-scrollbar {
    width: 8px;
}

.research-detail-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.research-detail-body::-webkit-scrollbar-thumb {
    background: rgba(233, 69, 96, 0.5);
    border-radius: 4px;
}

.research-detail-body::-webkit-scrollbar-thumb:hover {
    background: rgba(233, 69, 96, 0.7);
}

/* Icon-Buttons für Forscher (vereinfachtes UI) */
.researchers-icons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.researcher-icon-btn {
    width: 70px;
    height: 70px;
    border: 2px solid rgba(233, 69, 96, 0.4);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.8);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.researcher-icon-btn:hover {
    background: rgba(233, 69, 96, 0.1);
    border-color: rgba(233, 69, 96, 0.6);
    transform: translateY(-2px);
}

.researcher-icon-btn.assigned {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.2);
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.4);
}

.researcher-icon-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.researcher-icon-btn.disabled:hover {
    transform: none;
    background: rgba(26, 26, 26, 0.8);
    border-color: rgba(233, 69, 96, 0.4);
}

.researcher-icon {
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 2px;
    left: 2px;
    z-index: 1;
}

.researcher-icon img {
    width: 66px;
    height: 66px;
    object-fit: contain;
}

.researcher-label {
    font-size: 10px;
    color: #ccc;
    text-align: center;
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    z-index: 2;
}
