
.prisoner-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.5rem;
    color: black;
    margin-bottom: 0.5rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.header-content img {
    width: 40vw; /* 40% of viewport width */
    height: auto;
    border-radius: 8px;
}

.header-text p {
    color: black;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.dynamic-message {
    text-align: center;
    font-style: italic;
    font-weight: bold;
    font-size: 1.5rem; /* Increased font size */
    color: #d9534f; /* A provocative red color */
    margin-top: 1.5rem;
    min-height: 40px; /* Prevent layout shift during text changes */
    transition: opacity 0.5s ease-in-out, color 0.5s ease-in-out; /* Added color transition */
}

.simulation-ui {
    display: grid;
    grid-template-columns: 600px 1fr;
    gap: 2rem;
}

.strategies-panel, .main-panel {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 1.5rem;
    border: 1px solid #ddd;
}

.strategies-panel h2, .controls-panel h2, .results-container h2 {
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.strategy-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.strategy-controls button {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 0.5rem 0;
    width: 48%;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.strategy-controls button:hover {
    background-color: #f0f0f0;
}

.strategy-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.strategy-item {
    display: block;
    margin-bottom: 0;
    background-color: #fff;
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: border-color 0.2s;
}

.strategy-item:hover {
    border-color: #bbb;
}

.strategy-item input {
    margin-right: 10px;
}

.strategy-item label {
    font-weight: bold;
    color: #333;
}

.strategy-item p {
    font-size: 0.85rem;
    color: #666;
    margin: 0.3rem 0 0 24px;
    line-height: 1.4;
}

.main-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: none;
    border: none;
    padding: 0;
}

.controls-panel, .results-container {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 1.5rem;
    border: 1px solid #ddd;
}

.control-group {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-group label {
    font-weight: normal;
}

.control-group input {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    width: 80px;
}

#run-tournament {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#run-tournament:hover {
    background-color: #0056b3;
}

.results-container {
    flex-grow: 1;
}

#results-output p {
    text-align: center;
    font-size: 1.1rem;
    color: #888;
}

table.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.results-table th, .results-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.results-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

.results-table tr:nth-child(even) {
    background-color: #fafafa;
}

.results-table tr:hover {
    background-color: #f0f0f0;
}

.results-table td:nth-child(1) { font-weight: bold; } 
.results-table td:nth-child(2) { font-weight: bold; color: #0056b3; position: relative; } /* Added position: relative */

.strategy-name-cell {
    position: relative;
}

.strategy-name {
    cursor: help; /* Indicate it's hoverable */
}

.strategy-name::after {
    content: attr(data-description);
    position: absolute;
    left: 30%; /* Center horizontally */
    top: 100%; /* Position below the text */
    background-color: #333;
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    white-space: pre-wrap; /* Preserve line breaks */
    max-width: 500px;
    z-index: 100;
    display: none; /* Hidden by default */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-weight: normal;
    font-size: 0.9rem;
    text-align: left;
}

.strategy-name-cell:hover .strategy-name::after {
    display: block; /* Show on hover */
} 

