.producer-consumer-container {
    max-width:1200px;
    margin:0 auto;
    padding:20px;
    font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
}

.producer-consumer-header {
    text-align:center;
    margin-bottom:30px;
    padding:20px;
    background:linear-gradient(135deg,#6a11cb 0%,#2575fc 100%);
    color:white;
    border-radius:10px;
    box-shadow:0 4px 15px rgba(0,0,0,0.1);
}

.producer-consumer-title {
    font-size:2.5rem;
    margin-bottom:15px;
    font-weight:700;
}

.producer-consumer-description {
    font-size:1.1rem;
    max-width:800px;
    margin:0 auto 20px;
    line-height:1.6;
}

.visualization-section {
    display:flex;
    flex-direction:column;
    gap:30px;
    margin-bottom:30px;
}

.diagram-container {
    background-color:#f8f9fa;
    border-radius:10px;
    padding:25px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.diagram-title {
    font-size:1.5rem;
    margin-bottom:20px;
    color:#333;
    text-align:center;
    font-weight:600;
}

.process-diagram {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:30px 0;
    position:relative;
    min-height:200px;
}

.buffer-container {
    position:relative;
    width:300px;
    height:150px;
    background-color:#e9ecef;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    box-shadow:inset 0 0 10px rgba(0,0,0,0.1);
}

.buffer-label {
    position:absolute;
    top:-25px;
    font-weight:600;
    color:#495057;
}

.buffer-items {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
    width:100%;
    padding:15px;
    min-height:80px;
}

.buffer-item {
    width:30px;
    height:30px;
    background-color:#007bff;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    color:white;
    font-weight:bold;
    font-size:0.7rem;
    box-shadow:0 2px 5px rgba(0,0,0,0.2);
    transition:all 0.3s ease;
}

.buffer-item.produced {
    background-color:#28a745;
    transform:scale(1.1);
}

.buffer-item.consumed {
    background-color:#dc3545;
    transform:scale(0.8);
    opacity:0.5;
}

.producer-container,.consumer-container {
    display:flex;
    flex-direction:column;
    align-items:center;
    width:200px;
}

.producer-box,.consumer-box {
    width:120px;
    height:120px;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    color:white;
    font-weight:bold;
    box-shadow:0 4px 15px rgba(0,0,0,0.2);
    position:relative;
    overflow:hidden;
    transition:all 0.3s ease;
}

.producer-box {
    background:linear-gradient(135deg,#007bff 0%,#0056b3 100%);
}

.consumer-box {
    background:linear-gradient(135deg,#28a745 0%,#1e7e34 100%);
}

.producer-box.active {
    transform:scale(1.05);
    box-shadow:0 6px 20px rgba(0,123,255,0.4);
}

.consumer-box.active {
    transform:scale(1.05);
    box-shadow:0 6px 20px rgba(40,167,69,0.4);
}

.producer-box::before,.consumer-box::before {
    content:'';
    position:absolute;
    top:-50%;
    left:-50%;
    width:200%;
    height:200%;
    background:rgba(255,255,255,0.1);
    transform:rotate(30deg);
}

.process-label {
    margin-top:15px;
    font-weight:600;
    color:#495057;
}

.arrow-container {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:15px;
}

.arrow {
    width:80px;
    height:40px;
    position:relative;
}

.arrow::before,.arrow::after {
    content:'';
    position:absolute;
    border-style:solid;
    transition:all 0.3s ease;
}

.arrow.producer-arrow::before {
    border-width:20px 0 20px 30px;
    border-color:transparent transparent transparent #007bff;
    left:0;
}

.arrow.consumer-arrow::before {
    border-width:20px 30px 20px 0;
    border-color:transparent #28a745 transparent transparent;
    right:0;
}

.arrow.producer-arrow.active::before {
    border-left-color:#0056b3;
    transform:translateX(5px);
}

.arrow.consumer-arrow.active::before {
    border-right-color:#1e7e34;
    transform:translateX(-5px);
}

.controls-section {
    background-color:#f8f9fa;
    border-radius:10px;
    padding:25px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.controls-title {
    font-size:1.5rem;
    margin-bottom:20px;
    color:#333;
    text-align:center;
    font-weight:600;
}

.simulation-controls {
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    justify-content:center;
    margin-bottom:25px;
}

.control-button {
    padding:12px 25px;
    border:none;
    border-radius:8px;
    font-size:1rem;
    font-weight:600;
    cursor:pointer;
    transition:all 0.3s ease;
    box-shadow:0 2px 5px rgba(0,0,0,0.1);
    display:flex;
    align-items:center;
    gap:8px;
}

.control-button:hover {
    transform:translateY(-2px);
    box-shadow:0 4px 10px rgba(0,0,0,0.2);
}

.control-button:active {
    transform:translateY(0);
}

.control-button:disabled {
    opacity:0.6;
    cursor:not-allowed;
    transform:none;
    box-shadow:0 2px 5px rgba(0,0,0,0.1);
}

.start-button {
    background:linear-gradient(135deg,#28a745 0%,#1e7e34 100%);
    color:white;
}

.pause-button {
    background:linear-gradient(135deg,#ffc107 0%,#e0a800 100%);
    color:#212529;
}

.reset-button {
    background:linear-gradient(135deg,#dc3545 0%,#c82333 100%);
    color:white;
}

.speed-control {
    display:flex;
    align-items:center;
    gap:15px;
    justify-content:center;
    margin:20px 0;
}

.speed-label {
    font-weight:600;
    color:#495057;
}

.speed-slider {
    width:200px;
    height:8px;
    -webkit-appearance:none;
    background:#dee2e6;
    border-radius:5px;
    outline:none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance:none;
    width:20px;
    height:20px;
    border-radius:50%;
    background:#007bff;
    cursor:pointer;
    box-shadow:0 2px 5px rgba(0,0,0,0.2);
}

.parameters-control {
    display:flex;
    flex-wrap:wrap;
    gap:20px;
    justify-content:center;
    margin-top:20px;
}

.parameter-group {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
}

.parameter-label {
    font-weight:600;
    color:#495057;
}

.parameter-input {
    width:80px;
    padding:8px 12px;
    border:2px solid #dee2e6;
    border-radius:6px;
    text-align:center;
    font-size:1rem;
    transition:border-color 0.3s ease;
}

.parameter-input:focus {
    border-color:#007bff;
    outline:none;
}

.statistics-section {
    background-color:#f8f9fa;
    border-radius:10px;
    padding:25px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.statistics-title {
    font-size:1.5rem;
    margin-bottom:20px;
    color:#333;
    text-align:center;
    font-weight:600;
}

.statistics-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:20px;
}

.statistic-card {
    background:white;
    border-radius:8px;
    padding:20px;
    text-align:center;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    transition:all 0.3s ease;
}

.statistic-card:hover {
    transform:translateY(-5px);
    box-shadow:0 4px 15px rgba(0,0,0,0.15);
}

.statistic-value {
    font-size:2rem;
    font-weight:700;
    margin:10px 0;
}

.statistic-label {
    color:#6c757d;
    font-weight:600;
}

.produced-stat {
    color:#28a745;
}

.consumed-stat {
    color:#007bff;
}

.in-buffer-stat {
    color:#ffc107;
}

.multiple-simulations-section {
    background-color:#f8f9fa;
    border-radius:10px;
    padding:25px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.multiple-simulations-title {
    font-size:1.5rem;
    margin-bottom:20px;
    color:#333;
    text-align:center;
    font-weight:600;
}

.simulation-tabs {
    display:flex;
    justify-content:center;
    gap:10px;
    margin-bottom:20px;
    flex-wrap:wrap;
}

.simulation-tab {
    padding:10px 20px;
    background-color:#e9ecef;
    border:none;
    border-radius:6px;
    cursor:pointer;
    font-weight:600;
    transition:all 0.3s ease;
}

.simulation-tab.active {
    background:linear-gradient(135deg,#007bff 0%,#0056b3 100%);
    color:white;
}

.simulation-tab:hover:not(.active) {
    background-color:#dee2e6;
}

.simulation-content {
    min-height:300px;
    background-color:white;
    border-radius:8px;
    padding:20px;
    box-shadow:inset 0 0 10px rgba(0,0,0,0.05);
}

.steps-diagram-container {
    background-color:#f8f9fa;
    border-radius:10px;
    padding:25px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
    margin-top:30px;
}

.steps-diagram-title {
    font-size:1.5rem;
    margin-bottom:20px;
    color:#333;
    text-align:center;
    font-weight:600;
}

.steps-diagram {
    display:flex;
    flex-direction:column;
    gap:25px;
    align-items:center;
}

.step-item {
    display:flex;
    align-items:center;
    gap:20px;
    width:100%;
    max-width:800px;
    padding:20px;
    background-color:white;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    transition:all 0.3s ease;
}

.step-item:hover {
    transform:translateY(-3px);
    box-shadow:0 4px 15px rgba(0,0,0,0.15);
}

.step-number {
    width:40px;
    height:40px;
    border-radius:50%;
    background:linear-gradient(135deg,#007bff 0%,#0056b3 100%);
    color:white;
    display:flex;
    justify-content:center;
    align-items:center;
    font-weight:bold;
    font-size:1.2rem;
    flex-shrink:0;
}

.step-content {
    flex:1;
}

.step-title {
    font-size:1.2rem;
    font-weight:600;
    margin-bottom:8px;
    color:#333;
}

.step-description {
    color:#6c757d;
    line-height:1.5;
}

.step-visualization {
    width:100px;
    height:60px;
    background-color:#e9ecef;
    border-radius:6px;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:0.9rem;
    color:#6c757d;
    flex-shrink:0;
}

.legend-container {
    display:flex;
    justify-content:center;
    gap:30px;
    margin-top:30px;
    flex-wrap:wrap;
}

.legend-item {
    display:flex;
    align-items:center;
    gap:8px;
}

.legend-color {
    width:20px;
    height:20px;
    border-radius:4px;
}

.legend-producer {
    background:linear-gradient(135deg,#007bff 0%,#0056b3 100%);
}

.legend-consumer {
    background:linear-gradient(135deg,#28a745 0%,#1e7e34 100%);
}

.legend-buffer {
    background-color:#e9ecef;
}

.legend-item-text {
    font-weight:500;
    color:#495057;
}

.process-item {
    padding:8px 12px;
    margin:5px;
    background-color:#e9ecef;
    border-radius:4px;
    cursor:pointer;
    transition:all 0.3s ease;
    text-align:center;
    font-weight:500;
}

.process-item:hover {
    background-color:#dee2e6;
}

.process-item.active {
    background-color:#007bff;
    color:white;
    transform:scale(1.05);
}

.process-item.producer {
    background-color:#cce5ff;
    border:1px solid #007bff;
}

.process-item.consumer {
    background-color:#d4edda;
    border:1px solid #28a745;
}

.process-item.producer.active {
    background-color:#007bff;
    color:white;
}

.process-item.consumer.active {
    background-color:#28a745;
    color:white;
}

.buffer-info {
    margin-top:10px;
    font-weight:500;
    color:#495057;
}

@media (max-width:768px) {
    .process-diagram {
    flex-direction:column;
    gap:30px;
}

.arrow-container {
    flex-direction:row;
    margin:20px 0;
}

.arrow {
    width:40px;
    height:80px;
}

.arrow.producer-arrow::before {
    border-width:30px 20px 0 20px;
    border-color:#007bff transparent transparent transparent;
}

.arrow.consumer-arrow::before {
    border-width:0 20px 30px 20px;
    border-color:transparent transparent #28a745 transparent;
}

.arrow.producer-arrow.active::before {
    border-top-color:#0056b3;
    transform:translateY(5px);
}

.arrow.consumer-arrow.active::before {
    border-bottom-color:#1e7e34;
    transform:translateY(-5px);
}

.simulation-controls {
    flex-direction:column;
    align-items:center;
}

.control-button {
    width:100%;
    max-width:250px;
}

.steps-diagram {
    gap:15px;
}

.step-item {
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
}

.step-visualization {
    width:100%;
    height:40px;
}

.legend-container {
    gap:15px;
}


}