/* Trust Evolution Simulation CSS */
/* Local styles to avoid collision with global CSS */

#content_sim {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Courier New', monospace;
    background-color: #000;
    color: #fff;
}

.trust-container {
    background-color: #000;
    padding: 15px;
    border-radius: 5px;
}

.trust-stage-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.trust-stage-btn {
    padding: 8px 16px;
    background-color: #333;
    color: #fff;
    border: 2px solid #555;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    transition: all 0.3s;
}

.trust-stage-btn:hover {
    background-color: #555;
    border-color: #777;
}

.trust-stage-btn.active {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.trust-canvas-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #111;
    border: 2px solid #333;
    border-radius: 5px;
    margin-bottom: 20px;
}

#trust-canvas {
    display: block;
    width: 100%;
    background-color: #000;
}

.trust-controls {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.trust-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.trust-control-row label {
    min-width: 120px;
    color: #fff;
}

.trust-control-row input[type="range"] {
    flex: 1;
    max-width: 300px;
}

.trust-control-row span {
    min-width: 50px;
    color: #4CAF50;
    text-align: right;
}

.trust-control-row select,
.trust-preset-select {
    flex: 1;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background-color: #2a2a2a;
    color: #fff;
    border: 2px solid #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.trust-preset-select {
    min-width: 200px;
}

.trust-control-row select:hover,
.trust-preset-select:hover {
    border-color: #555;
    background-color: #333;
}

.trust-control-row select:focus,
.trust-preset-select:focus {
    border-color: #4CAF50;
    background-color: #2a2a2a;
}

.trust-control-row select option,
.trust-preset-select option {
    background-color: #2a2a2a;
    color: #fff;
    padding: 8px;
}

.trust-btn {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-right: 8px;
    transition: background-color 0.3s;
}

.trust-btn:hover {
    background-color: #45a049;
}

.trust-btn.secondary {
    background-color: #555;
}

.trust-btn.secondary:hover {
    background-color: #666;
}

.trust-btn:disabled {
    background-color: #333;
    color: #666;
    cursor: not-allowed;
}

.trust-status {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
}

.trust-status-title {
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 10px;
    font-size: 14px;
}

.trust-status-text {
    color: #ccc;
}

.trust-payoff-matrix {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.trust-payoff-matrix table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.trust-payoff-matrix td {
    padding: 8px;
    text-align: center;
    border: 1px solid #333;
}

.trust-payoff-matrix th {
    padding: 8px;
    text-align: center;
    border: 1px solid #333;
    background-color: #2a2a2a;
    color: #4CAF50;
}

.trust-payoff-matrix .cooperate {
    color: #60D394;
}

.trust-payoff-matrix .cheat {
    color: #EF6079;
}

.trust-evolution-chart {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
}

#trust-chart-canvas {
    max-width: 100%;
    background-color: #000;
    display: block;
}

.trust-one-on-one {
    text-align: center;
    padding: 20px;
}

.trust-machine {
    display: inline-block;
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
    border: 3px solid #555;
    margin: 20px 0;
}

.trust-agent-display {
    display: inline-block;
    margin: 0 30px;
    vertical-align: middle;
}

.trust-score {
    font-size: 24px;
    color: #4CAF50;
    margin: 10px 0;
    font-weight: bold;
}

.trust-choice-btn {
    padding: 12px 24px;
    margin: 10px;
    font-size: 14px;
    font-weight: bold;
    min-width: 140px;
    box-sizing: border-box;
}

.trust-choice-btn.cooperate {
    background-color: #60D394;
}

.trust-choice-btn.cheat {
    background-color: #EF6079;
}

.trust-feedback {
    position: absolute;
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

.trust-history {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    max-height: 150px;
    overflow-y: auto;
}

.trust-history-item {
    padding: 5px 0;
    border-bottom: 1px solid #333;
}

.trust-history-item:last-child {
    border-bottom: none;
}

/* Live Leaderboard Styles */
.leaderboard-container {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    transition: top 0.5s ease; /* For sorting animation later if needed */
}

.leaderboard-label {
    width: 100px;
    font-size: 12px;
    color: #fff;
    text-align: right;
    padding-right: 10px;
}

.leaderboard-bar-container {
    flex-grow: 1;
    background: #333;
    height: 18px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.leaderboard-bar {
    height: 100%;
    width: 0%;
    transition: width 0.2s linear; /* Smooth growth */
}

.leaderboard-value {
    width: 50px;
    font-size: 12px;
    color: #fff;
    padding-left: 10px;
    font-weight: bold;
}
