/* Stress Test CSS */
/* Styles specific to stress testing functionality */

.stress-container {
    width: 90%;
    max-width: 1200px;
    margin: 48px auto;
    text-align: center;
}

.stress-grid {
    display: none;
    margin-top: 32px;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

.stress-test-area {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.stress-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    align-items: center;
    justify-content: space-between;
}

.stress-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.thread-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.thread-selector label {
    font-weight: 500;
    color: white;
    font-size: 14px;
}

.thread-selector select,
.thread-selector input[type="number"] {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    width: 80px;
    text-align: center;
}

.thread-selector input[type="number"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.3);
}

.thread-selector input[type="number"]::-webkit-outer-spin-button,
.thread-selector input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.thread-selector input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.control-buttons {
    display: flex;
    gap: 8px;
}

.start-btn, .stop-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.start-btn {
    background-color: rgba(76, 175, 80, 0.8);
    color: white;
}

.start-btn:hover {
    background-color: rgba(76, 175, 80, 1);
}

.stop-btn {
    background-color: rgba(244, 67, 54, 0.8);
    color: white;
}

.stop-btn:hover {
    background-color: rgba(244, 67, 54, 1);
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.chart-wrapper {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.chart-title {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.chart-canvas {
    width: 100%;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.performance-stats {
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    text-align: center;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 8px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-bottom: 4px;
}

.stat-value {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

/* Missing metric card styles */
.metric-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.metric-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 500;
}

.metric-value {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.metric-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.metric-bar {
    height: 100%;
    background: linear-gradient(to right, #4caf50, #ffc107, #f44336);
    transition: width 0.5s ease;
}

.stress-visualization {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Container for the two graphs side by side */
.performance-graphs-container {
    display: flex;
    gap: 12px;
    width: 100%;
}

.performance-graph {
    position: relative;
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.stress-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.threads-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    min-height: 30px;
    width: 100%;
}

.thread-info {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    min-width: 120px;
    text-align: left;
}

.info-panel {
    padding: 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .stress-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stress-metrics {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .performance-graphs-container {
        flex-direction: column;
    }
    
    .performance-graph {
        height: 180px;
    }
}
