.container {
    background: white;
    padding: 25px 30px;
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    max-width: 950px;
    width: 100%;
    transition: 0.2s;
}
.matrices-panel {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px 40px;
    margin: 10px 0 20px;
}
.matrix-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.matrix-label {
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}
.matrix-wrapper table {
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.matrix-wrapper table td {
    width: 48px;
    height: 48px;
    text-align: center;
    vertical-align: middle;
    font-size: 1.1rem;
    font-weight: 500;
    color: #0f172a;
    border: 1px solid #d1d9e8;
    background-color: #ffffff;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s;
}
td.row-highlight {
    background-color: #fde68a !important;
    box-shadow: inset 0 0 0 1px #f59e0b;
}
td.col-highlight {
    background-color: #93c5fd !important;
    box-shadow: inset 0 0 0 1px #3b82f6;
}
td.cell-active {
    background-color: #fcd34d !important;
    box-shadow: 0 0 0 2px #b45309;
    transform: scale(1.05);
}
td.cell-done {
    background-color: #dbeafe !important;
}
td.cell-result {
    background-color: #a7f3d0 !important;
    box-shadow: 0 0 0 2px #059669;
}
td.result-matrix {
    background-color: #f8fafc;
    font-weight: 600;
    color: #0b3b5c;
}
.controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 25px 0 8px;
}
button.animation {
    background: #1e293b;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 28px;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
    transition: 0.15s;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #334155;
}
button.animation:hover:not(:disabled) {
    background: #0f172a;
    transform: scale(1.01);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
button.animation:disabled {
    opacity: 0.5;
    transform: scale(0.98);
    cursor: not-allowed;
    box-shadow: none;
}
button.secondary {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}
button.secondary:hover:not(:disabled) {
    background: #cbd5e1;
}
#statusMessage {
    margin: 12px 0 6px;
    min-height: 3.2rem;
    font-size: 1rem;
    color: #1e293b;
    background: #f1f5f9;
    padding: 10px 22px;
    border-radius: 40px;
    display: inline-block;
    text-align: center;
    font-weight: 450;
    min-width: 300px;
    line-height: 1.6;
    transition: all 0.3s;
}
#statusMessage .highlight-prod {
    color: #b45309;
    font-weight: 700;
    background: #fef3c7;
    padding: 0 6px;
    border-radius: 6px;
}
#statusMessage .highlight-sum {
    color: #065f46;
    font-weight: 700;
    background: #d1fae5;
    padding: 0 8px;
    border-radius: 6px;
}
.step-indicator {
    font-size: 0.9rem;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 16px;
    border-radius: 30px;
}
.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.operator-symbol {
    font-size: 1.8rem;
    font-weight: 300;
    color: #64748b;
    padding: 0 6px;
}
@media (max-width: 650px) {
    .matrices-panel { gap: 16px; }
    td { width: 40px; height: 40px; font-size: 1rem; }
    #statusMessage { min-width: 200px; font-size: 0.9rem; }
}